Skip to content
← Back to work
Reinforcement learning lab2026

Ghostline

A deterministic 2D racer where I trained an RL driver from wall-stalls to a sub-4 second lap, then built the replay and analytics stack to prove how it learned.

Outcome

3.948s

final RL lap

Stack

  • Reinforcement learning
  • Deterministic sim
  • PPO
  • Reward design
  • Replay tooling
  • Python

Links

Replay viewer

The same deterministic runs, played back in the browser. Step through the RL driver's progression to the 3.948s line on Track 1 against the human reference.

Loading replay viewer

Open the full viewer ↗

Overview

Ghostline is a deterministic top-down time-trial racer and the tooling built around it: action-stream replays, reward-versioned training runs, and analytics that explain why a policy improved or stalled. The best policy runs a clean 3.948s lap on Track 1, and every gain is backed by a saved run, so the progression can be checked step by step.

Benchmarks

Reference laps on Track 1, both clean with no wall contact. The RL driver holds the line; the dev keyboard lap is the human mark it was chasing.

DriverLap timeWalls
Ghostline AI3.948s0
Michi/dev3.959s0

Ticks count whole simulation steps; lap time is measured to the sub-tick moment the car crosses the line, so two laps can share a tick count and still differ by a fraction of a tick.

Playable challenge

Playable on desktop

The challenge is playable on desktop with keyboard controls. Open this page on a laptop or desktop to race Track 1; the replay viewer and benchmarks stay available here.

Visitor Attempts

Laps submitted by visitors, each recomputed on the server from the recorded inputs before it lands here. Fastest first. The benchmarks above stay separate.

Loading visitor attempts.