A fast-paced AI vs. Human maze escape game — can you beat the algorithm?
MazeScape is an open-source browser-based maze escape challenge where both AI and humans compete.
The AI finds the optimal escape path, and on the /record page, a human performs the same movements — replicating the AI’s path to test human precision, reaction time, and efficiency.
Built using modern web technologies, MazeScape demonstrates how AI consistently outperforms humans in decision-making and execution speed, proving how automation can be both cost-effective and highly scalable.
- 🤖 AI Pathfinding: The AI calculates the most efficient path through the maze.
- 🧍♂️ Human Replay System: Humans manually execute AI-found paths on
/record. - 🕒 Time-Based Scoring: Every second you take reduces your total score.
- 🧀 Dynamic Mazes: Collect cheese for bonus points in procedurally generated maps.
- 🏆 Leaderboard: Compare human and AI scores to see who escapes better.
- 🔍 AI Review Mode: Watch how perfectly the AI completed the maze.
- Adaptive AI – Tom (AI) uses optimized pathfinding algorithms to chase or escape.
- Scoring System –
Final Score = 100 (base) + (Cheese × 10) - Time (seconds) - Lose Condition – If Tom catches you before reaching the exit, your score becomes:
Cheese Collected - Time Taken
- Next.js 16 – Modern React framework with App Router
- Phaser 3 – Game engine for real-time maze rendering and physics
- TypeScript – Strong typing and predictable behavior
- Tailwind CSS – Clean and responsive design
- Local Storage – Persistent leaderboard and user data
- Node.js 18+
- npm, yarn, or pnpm
Clone the repository
git clone https://github.com/adyanthm/mazescape.git
Navigate to the project folder
cd mazescape
Install dependencies
npm install
Run the development server
npm run dev
Then open http://localhost:3000 in your browser.
- WASD / Arrow Keys: Move the player
- Mouse: Navigate menus
- Start from the entry dock
- Collect cheese scattered through the maze (+10 points each)
- Reach the exit before Tom (AI) catches you
- Every second reduces your score by 1 point
After your run, visit the /record page to watch how the AI completed the same maze.
You can see its path, timing, and performance versus your own.
MazeScape isn’t just a game — it’s a human vs. AI performance benchmark.
It showcases how AI’s optimized movement, reaction time, and decision-making give it an advantage, reinforcing the efficiency and cost-effectiveness of intelligent automation.
- Every part of MazeScape — from maze generation to AI logic — is open for review.
- No hidden algorithms: All AI logic is public and inspectable.
- Built for education, research, and innovation.
- Hosted on GitHub for open collaboration and contributions.
→ Transparency builds trust.
→ Collaboration drives innovation.
This project is licensed under the MIT License. See the LICENSE file for details.
Made with ❤️, logic, and cheese 🧀