// Development journal

How to make a procedurally generated maze race feel fair

Updated 4 November 2026
Image of Outplay logo

Start with a connected maze

A good maze race begins with a course both competitors can finish. Recursive depth-first search connects every cell and leaves a route to the goal, even when the course is generated seconds before the race starts.

Give the opponent a route

The AI searches the grid using A* and estimates distance by counting horizontal and vertical moves. The path becomes a set of waypoints for the bot’s movement controller.

Balance the race around decisions

Power-ups and penalties give the player room to recover from a wrong turn or press an advantage. The generator, route planner and race rules stay separate so each system can be tuned on its own.

Related project

AI Maze Game