HomeAI & Machine LearningQ-Learning Grid World Agent

🧠 Reinforcement Learning: Q-Learning Agent

Watch a Q-learning agent explore a 3D grid world, updating its value function and policy live as it trades exploration for exploitation to find the highest-reward path.

AI & Machine Learning3DAdvanced60 FPS
reinforcement-learning-explained-lab ↗ Open standalone

A robot agent explores a 3D grid world with no map, only trial, error, and reward — building a Q-table of state-action values that reshapes the terrain into a visible value-function landscape as learning progresses.

🔬 What It Demonstrates

The core reinforcement learning loop — agent, state, action, reward — and how the Q-learning update rule propagates value backward from the goal tile through the grid, one visited tile at a time.

🎮 How to Use

Adjust learning rate, discount factor, and exploration rate, then watch the agent's episode reward and value-function heatmap evolve live. Switch to policy view to see the greedy action chosen at every tile.

💡 Did You Know?

Q-learning, introduced by Chris Watkins in 1989, needs no model of the environment at all — it learns purely from experienced (state, action, reward, next state) tuples, which is why it scales to problems far too complex to hand-code, like Atari games and robotic control.

⚙ Under the hood

Watch a Q-learning agent explore a 3D grid world, updating its value function and policy live as it trades exploration for exploitation to find the highest-reward path.

machine learningreinforcementq-learningagentvalue functionpolicyThree.js

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)