REINFORCEMENT LEARNING SIMULATION

The robot gets no map and nobody tells it which move is right; every step hands it a single number, a reward or a penalty. From that alone a Q-table records the value of each cell-and-direction pair, updated by δ = r + γ·max Q(s′,·) − Q(s,a) with a discount factor around 0.9, and value seeps backwards from the goal cell across the whole grid. Keeping ε high leaves the robot wandering everywhere, slow to learn but rarely trapped in a poor route; a low ε glues it to the first path it stumbles onto. On a slippery grid where roughly one step in five slides sideways, the best policy is to stay clear of the edges of the pits.

▸ Building the gridworld & placing goal / traps…
▸ Initializing the Q value table to 0
▸ Loading the ε-greedy policy (explore ↔ exploit)
▸ Setting the Bellman update: Q ← Q + α[r + γ·maxQ′ − Q]
▸ Seeding the deterministic RNG (mulberry32)…
▸ Ready — Online. ✅
0%
⌂ Mind & Machine

Simulation room Reinforcement learning

Reinforcement Learning · Q-learning
Online
trial & error · reward · optimal policy
Learning progress
🎮 Simple grid
Episode—
Episode reward—
Steps this episode—
Exploration ε—
Success rate—
Best value—
Notes
Reinforcement learning: an agent acts in an environment, gets a reward then adjusts to maximize cumulative reward. No one teaches the right move — it learns by trial & error over many episodes. This is how AI plays Go (AlphaGo) & Atari games.
—
Pick a "Scenario" to change the environment (traps · slippery · cliff…) · 🔀 new grid · ↺ relearn from scratch · click a structure/concept for details · bright cell = high value, arrow = best move.
Your browser has canvas disabled.
Reward & exploration ε per episode reward (smoothed)exploration ε
About Reinforcement Learning

The robot gets no map and nobody tells it which move is right; every step hands it a single number, a reward or a penalty. From that alone a Q-table records the value of each cell-and-direction pair, updated by δ = r + γ·max Q(s′,·) − Q(s,a) with a discount factor around 0.9, and value seeps backwards from the goal cell across the whole grid. Keeping ε high leaves the robot wandering everywhere, slow to learn but rarely trapped in a poor route; a low ε glues it to the first path it stumbles onto. On a slippery grid where roughly one step in five slides sideways, the best policy is to stay clear of the edges of the pits.

Related topics in Mind & Machine