C++ Maze Navigator
I built a rule-based C++ agent that navigates a multi-stage maze with limited visibility. It chooses each move using the tiles it can see, the movement rules, and the penalties it needs to account for
Local view · A vector<vector<char>> represents the tiles visible to the agent on its current turn.
Decision rules · The agent uses the visible tiles and movement constraints to choose its next move.
Penalties · The maze’s penalties affect which moves the agent should take.
Multi-stage navigation · The agent repeats the process as it progresses through the maze.
I came back to this project with a question I could test in code. How much of my decision logic depended on the input being a maze? I rewrote the engine to work with randomized inputs outside the maze, which let me see which rules carried over and which depended on the grid.
Turn 01 • Choose a move at a junction
The agent uses the tiles visible on this turn to choose its next move
VieTurn 02 • Reevaluate after moving
The agent uses the new view tiles visible from the previous move on this turn to choose its next move
This example shows my C++ agent navigating a maze one move at a time. The full maze is displayed so you can follow its progress, while the agent makes decisions using its limited local view. Each move applies the navigation rules to the information currently available
On each turn, the agent receives a two-dimensional grid representing its visible surroundings. It evaluates that information against the movement constraints and penalty rules, then selects its next action. As it moves, its local view changes, providing the input for the next decision.
What the agent sees
<vector<vector<char» grid
What the agent does
Current vision > evaluate position > return direction call > move