Settings
Auto & Physics
Traffic
Neural Network
Visual & Simulation
Presets:

Self-Driving Car Simulator

Cars learn to drive by themselves using a neural network β€” a simple artificial brain inspired by how real neurons work.

How it works

  1. Sensors β€” Each car has yellow rays that detect obstacles and road edges. These are the brain's "eyes".
  2. Brain β€” The neural network (shown on the right) takes sensor data and decides: go forward, turn left, turn right, or reverse.
  3. Selection β€” The car that gets the furthest without crashing is the "best" (shown in full color). All others are transparent ghosts.
  4. Evolution β€” Save the best brain, restart, and all new cars get slightly mutated copies. Over generations, they learn to drive!

Training workflow

  1. Watch cars drive. The best one is highlighted automatically.
  2. When you're happy with one, click πŸ’Ύ Save to remember its brain.
  3. Click πŸ”„ Restart β€” new cars spawn with mutations of the saved brain.
  4. Repeat! Each generation should get better.
  5. Click πŸ—‘οΈ Discard to start completely fresh.

Neural network display

The black panel on the right shows the best car's brain in real-time:

  • Bottom nodes β€” sensor inputs (how close obstacles are)
  • Middle nodes β€” hidden layer (the "thinking" part)
  • Top nodes β€” outputs: ↑ forward, ← left, β†’ right, ↓ reverse
  • Yellow lines β€” positive connections (encouraging)
  • Blue lines β€” negative connections (inhibiting)
  • Dashed circles β€” neuron bias (activation threshold)

Buttons

πŸ’ΎSave the best car's brain
πŸ—‘οΈDelete saved brain, start fresh
πŸ”„Restart simulation (keeps saved brain)
βš™οΈOpen settings panel
❓This help screen