REINFORCEMENT LEARNING · RUNS IN YOUR BROWSER

Build the brain
of a self‑driving car.

A one-hour, hands-on reinforcement learning workshop that runs entirely in your browser. Write Python. Train a real Q-learning agent. Watch it measurably improve — nothing to install.

5 Steps 60 Minutes Q-Learning No Install
LIVE DEMO
training.log ● LIVE
Ep 001  Reward −82  Dist 14m
Ep 010  Reward −21  Dist 38m
Ep 050  Reward +132  Dist 124m
Ep 100  Reward +287  Dist 312m
Ep 300  Reward +641  Dist 748m
Ep 500  Reward +1204  Dist Complete
agent improving_
Agent XP 2,847 / 5,000

Four missions.
One trained agent.

Each mission builds on the last. Start with two lines of Python — finish with a self-trained autonomous agent.

01 Entry

Control the Car

Return one action string. Watch the car move. Understand that your code is the agent's entire brain.

Write choose_action()
Return "ACCELERATE"
See the car respond
XP Reward +50 XP
02 Sensor

Read the Sensors

Use distance readings and track angle to make decisions. State → Action in its purest form.

Read front_distance
Write conditional logic
Avoid walls, reach checkpoints
XP Reward +150 XP
03 Reward

Design Rewards

Define what "good" and "bad" mean for your agent. The AI optimises for exactly what you reward.

Edit reward.py
Tune checkpoint bonuses
Watch behaviour change
XP Reward +300 XP
04 Final

Train and Compete

Run hundreds of episodes. Watch reward charts climb. Replay before vs after. Top the leaderboard.

Run 500 episodes
Compare before vs after
Top the leaderboard
XP Reward +500 XP

The loop that drives every AI.

Every autonomous agent — from your Q-learning car to the latest language model — runs this same cycle. You'll experience it live.

1

Observe State

Speed, distances, track angle — 6 numbers

2

Choose Action

Your agent decides: ACCELERATE, TURN, BRAKE

3

Environment Changes

The car moves, physics update

4

Receive Reward

+1 per meter, +50 checkpoint, −100 crash

5

Learn and Improve

Q-table updates, policy gets smarter

student/agent.py only file you edit
# ── STUDENT AREA ──────────────────────
# Write your agent logic here

def choose_action(state):

    speed = state["speed"]
    front = state["front_distance"]
    left  = state["left_distance"]
    right = state["right_distance"]

    if front < 30:
        return "BRAKE"
    if left < 15:
        return "TURN_RIGHT"
    if right < 15:
        return "TURN_LEFT"

    return "ACCELERATE"

Train the best agent.
Top the leaderboard.

At the end of the workshop, every team's trained agent is scored on track completion, reward, and driving efficiency. The leaderboard updates live.

  • Scored on completion, reward, collisions, and time
  • Local leaderboard — no accounts, no internet required
  • Replay any team's agent to see what it learned
Leaderboard Live
1 Team Alpha 100% 982
2 Team Beta 91% 914
3 Team Sigma 87% 887
4 Your team...

Score: completion 40% · reward 35% · collisions 25%

Ready to begin?

Open the workshop in your browser and you're training your first agent in under five minutes. No accounts. No installs. Just Python.

Get Started