The Maze Generator
Abstract
๐ฐ The Maze Generator An interactive maze generator and solver built with vanilla JavaScript, HTML5 Canvas, and CSS. Generate mazes of various sizes, solve them with AI algorithms, play manually, or watch an automated demo โ all in your browser. โถ Live Demo https://mazegenerator.github.io โจ Features ๐ Maze Generation Recursive backtracker algorithm for perfect maze generation Configurable sizes from 10ร10 to 50ร50 Instant generation with visual rendering ๐ค AI Solvers DFS โ Depth-First Search with randomized neighbor exploration BFS โ Breadth-First Search for shortest path guarantee A* โ A-Star with Manhattan distance heuristic for optimal pathfinding Adjustable animation speed (1โ100) Real-time visualization of visited cells, current position, and solution path ๐ฎ Manual Play Navigate the maze using keyboard (Arrow keys / WASD), touch swipe, or click/tap on adjacent cells Automatic backtrack detection โ retracing steps removes them from your path Live timer and step counter Victory modal with stats (time, steps, path length, maze size) Confetti celebration on completion ๐ ๐ฌ Demo Mode Automated showcase cycling through all sizes (10ร10 โ 50ร50) Rotates between DFS, BFS, and A* solvers 2-second pause between each maze for viewing the solution Loops continuously until stopped ๐ Zoom & Pan Pinch-to-zoom on touch devices Mouse wheel zoom on desktop Drag/pan to navigate large mazes Auto-fit and center on generation and window resize ๐ฑ Responsive Design Fully adaptive layout for phones, tablets, and desktops Fluid typography with clamp() scaling Dynamic viewport height (100dvh) for mobile browser compatibility Touch-optimized controls and interactions ๐พ Persistent State Maze state saved to localStorage automatically Restores maze, player position, path, and timer on page reload
Fields of Study & Subjects
Artificial Intelligence in Games
Mobile and Web Applications
Robotic Path Planning Algorithms
Publication details
- Journal / source
- Zenodo (CERN European Organization for Nuclear Research)
- Publication date
- 13 March 2026
- Language
- EN