Maze Learning Agent Game

Design mazes, tune rewards, train intelligent agents, compare algorithms, inspect Q-values, and master exploration through animated reinforcement learning challenges and experiments inside your browser.

Environment setup

Enable the editor, then click or drag across maze cells.

Learning parameters
Rewards and penalties
Ready
Episode 0 Action — Mode training
Wall Start Exit Trap Bonus Agent Best route
Display and interaction
Manual keys: W A S D or arrow keys.
Episode0 / 150
Total reward0.0
Success rate0.0%
Current steps0
Average reward0.0
Best route
Unique explored1
Convergence0%
Wall collisions0
Trap encounters0
Explore / exploit0 / 0
Training time0.0s
Testing and challenge modes
Standard training

Test result: No test completed.
Generalisation: Not measured.
Shortest path: Not calculated.
Score: 0
Decision inspector

Click an open maze cell to inspect its learned action values and policy.

State: none selected
ActionQ-valuePolicy
Select a state.
Q(s,a) ← Q(s,a) + α[r + γ max Q(s′,a′) − Q(s,a)]
Reward and steps history
Success and exploration
State visit heatmap
Algorithm comparison
Experiment history and achievements
TimeAlgorithmMazeSuccessBestScore
No saved experiments.
Live training log
Save, import, and export
How reinforcement learning works here
  1. The agent observes its current maze cell as a state.
  2. It chooses an action through exploration or exploitation.
  3. The environment returns a reward and next state.
  4. The selected algorithm updates an action value.
  5. Repeated episodes gradually produce a stronger policy.
Exploration versus exploitation

Exploration tries uncertain actions. Exploitation chooses the strongest learned action. Epsilon controls their balance.

Q-learning and SARSA

Q-learning learns toward the best possible next action. SARSA learns from the next action actually selected.

Reward design

Large exit rewards encourage completion. Step penalties encourage shorter routes. Excessive trap penalties can reduce useful exploration.

Knowledge check

Related Calculators

Grid World ExplorerRobot Navigation ChallengeTreasure Hunt AgentTraffic Light ControllerMulti-Armed Bandit GameCart Balancing ChallengeEnergy Management AgentWarehouse Robot GameAdaptive Game Opponent

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.