The Maze Generator

Read full text
Authors: Valentyn Kolesnikov
Cited by: 0

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