Grid World Explorer Game

Build grid worlds, tune learning strategies, compare policies, and watch intelligent agents improve through rewards, penalties, obstacles, exploration, and interactive reinforcement learning challenges instantly.

Interactive environment

World canvas

Choose a preset, edit cells, or start training.
Performance

Learning dashboard

Not converged
Episode0
Total reward0
Current steps0
Success rate0%
Average reward0
Best route
Visited states1
Exploration0.20
Estimated policy stability0%
Episode history

Recent results

EpisodeRewardStepsResultEpsilon
No episodes yet.
Scenario

World setup


Agent

Learning controls

0.20
0.95
0.20
0.995
Medium
Rewards

Environment rules

0.80
Manual play

Move the explorer

Use arrow keys or WASD. Click any cell to inspect or edit it.

Map editor

Paint cell types

State inspector

Selected cell

Coordinates0, 0
Cell typeStart
State value0.000
Best action
Q up0.000
Q right0.000
Q down0.000
Q left0.000
Understanding the update

Formula and decision explanation

Q(s,a) ← Q(s,a) + α [r + γ max Q(s′,a′) − Q(s,a)]

The explorer has not moved yet. Start an episode to see each learning update explained.

Blue arrows show the current preferred action. Cell shading represents estimated state value.

Data tools

Save, export, and report

How to use

Explore, train, compare, and improve

  1. Choose a preset or paint your own map.
  2. Select an algorithm and tune its learning parameters.
  3. Move manually, train one step, or run many episodes.
  4. Inspect policy arrows, Q-values, rewards, routes, and convergence.
  5. Test the learned policy and export your results.
Frequently asked questions

Grid world learning questions

What is a policy?

A policy selects an action for each state. The arrows display the explorer's current policy.

Why does the agent explore?

Exploration discovers routes that greedy choices might miss. Epsilon controls how often random actions occur.

What does the discount factor do?

Gamma controls how strongly future rewards affect current decisions. Higher values encourage longer-term planning.

How is Q-learning different from SARSA?

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

What does convergence mean?

Convergence means preferred actions stop changing significantly. The stability meter estimates that behaviour.

Can the world be stochastic?

Yes. Enable stochastic movement to make intended actions occasionally drift sideways.

Why can a longer route be better?

A longer path may collect useful rewards or avoid severe penalties. Total discounted return determines value.

What are terminal cells?

Goals and traps end an episode. Their rewards strongly shape learned behaviour.

Can I save custom maps?

Yes. Custom maps and full learning sessions use browser storage.

Related Calculators

Maze Learning AgentRobot 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.