🤖 Reinforcement Learning

Train My Robot

Watch a robot learn to navigate a maze through trial, error, rewards, and penalties — just like real AI agents learn!

🗺️ Meet the Maze
🎮 Manual Play
🤖 Watch Robot Learn
📊 Learning Curve
🏆 Badge

How Reinforcement Learning Works

🌍

Environment

The maze is the world the robot lives in — walls, open paths, a goal, and traps!

Actions & Rewards

The robot tries moves. Reaching the goal = +10 points. Hitting walls or traps = penalty.

🧠

Q-Learning

Robot builds a "Q-Table" — a cheat sheet of which action is best from every position.

📈

Getting Smarter

Over hundreds of episodes, the robot improves — fewer steps, more rewards each run!

🤖
Wizzy the AI Tutor
Welcome, young AI scientist! 🎉 This is our robot's world — a maze. The robot starts at the green cell and must reach the gold star ⭐ without hitting red traps. Think: if you were blindfolded, how would you learn to navigate this maze?

Choose Your Maze

🟩 Start ⭐ Goal (+10) 🟥 Trap (−5) ⬛ Wall

📋 Maze Info

Grid size5 × 5
Open cells
Traps
Walls
States (cells)
Q-Table size
🤖
Wizzy the AI Tutor
Your turn to be the robot! 🕹️ Use the arrow buttons (or keyboard ↑↓←→) to navigate the maze. Try to reach ⭐ in as few steps as possible. Notice how you already know the map — the robot starts with zero knowledge. That's the challenge!

Manual Navigation

🎮 Ready to play!

🎮 Your Score

Steps taken0
Total reward0
Tries0
Best steps
// Use arrow keys or buttons to move...
🤖
Wizzy the AI Tutor
Now watch the robot learn using Q-Learning — a famous RL algorithm! It starts random, makes mistakes, and slowly builds a map of "good moves" called a Q-Table. The colour of each cell shows how confident the robot is about moving there. Can you spot when it finds the shortcut?

Robot Training

🐢 🚀

🤖 Training Stats

Episode0 / 300
Steps this ep.0
Reward this ep.0
Best reward
Exploration (ε)1.00
StatusReady
0.3
0.9
300
// Ready to train. Press Start Training!

📈 Learning Curve — Reward per Episode

🗂️ Q-Table Heatmap (hover cells to inspect best action)

🤖
Wizzy the AI Tutor
Amazing! Look at that learning curve! 📈 The robot started off terrible but got better and better. This is called "convergence" — the robot found the best policy. Now watch it follow its learned policy perfectly — the arrows show its best moves!

Trained Robot — Best Policy

↑↓←→ Best action at each cell
Episodes Trained
Best Reward
Policy Steps
% Improvement

📊 Full Learning Curve

🤖
Wizzy the AI Tutor
🎊 Incredible! You've just trained a real Q-Learning agent! You understand agents, environments, rewards, penalties, exploration, exploitation, and convergence. That's what AI researchers at Google DeepMind do every day! You're officially a Reinforcement Learning Scientist! 🚀
🤖

RL Scientist Badge Unlocked!

You trained a Q-Learning robot to navigate a maze. Enter your name to get your certificate!

🤖 WhizzStep AI Lab
This certifies that
Student Name
has successfully trained a Reinforcement Learning Robot
Q-Learning Expert
Maze Navigator
RL Scientist
Trained for — episodes · Best reward: — · whizzstep.in

Key Concepts You've Mastered

Agent

🤖 The Robot

The learner that takes actions in the environment to maximise reward over time.

Environment

🗺️ The Maze

The world the agent lives in. It responds to actions with new states and rewards.

Q-Table

📋 The Cheat Sheet

A table that stores the expected reward for every (state, action) pair. Updated after every step.

Exploration vs Exploitation

🎲 Try New vs Use Best

Epsilon (ε) controls this. High ε = explore randomly. Low ε = use learned knowledge.

Bellman Equation

🧮 The Update Rule

Q(s,a) ← Q(s,a) + α[r + γ·max Q(s',a') − Q(s,a)]. The heart of Q-learning!

Policy

🗺️ The Best Path

After training, the optimal policy selects the best action from every state — the arrows you saw!