Skip to Content

Free Neuroevolution Lab · No Sign-Up

Watch a Neural Network Learn to Drive

No rules, no human driving data. Just dozens of tiny brains that improve through evolution, while you follow every sensor reading, decision, and line of code.

5 free training runs a day · Works on phone, tablet, and desktop

What You Can Explore

Everything the Algorithm Does, Out in the Open

Most AI demos hide the interesting part. Here, every stage of learning is visible and explained.

A Live Track

Dozens of cars share the road at once. Crashes, the leader, and the finish line are drawn as they happen.

The Network Inside

See the leading car's neural network light up, including every neuron evolution has added along the way.

The Real Code

Read the actual Python functions that run each step, next to the numbers they are producing right now.

Evolution in Numbers

Track best and average fitness, species, and network size for every generation, and keep your history.

Thirty Times a Second

How a Car Learns to Drive

Each car repeats the same five steps on every tick. Scroll through them to see what happens inside.
  1. 1. Sense

    Eight Rays Measure the Road

    Every car casts eight rays around itself, like a simple lidar. Each ray reports how close the nearest wall is. The car also knows its own speed, which makes nine numbers in total.

  2. 2. Think

    A Tiny Neural Network Processes Them

    The nine numbers flow into the car's own neural network. Every connection has a weight that strengthens or weakens a signal. Out come four numbers, one for each possible action.

  3. 3. Decide

    Numbers Become Driving Actions

    An action only happens if its number passes 0.5 and beats its opposite. So Accelerate competes with Brake, and Left competes with Right. Nobody wrote a rule like “turn when a wall is close.”

  4. 4. Move

    Simple Physics Moves the Car

    Turning changes the heading by two degrees. The pedal speeds the car up while friction slows it down. The car then moves forward along its heading, thirty times every second.

  5. 5. Score

    Distance Becomes Fitness

    The further a car drives, the higher its fitness. Hitting a wall, falling far behind, reversing, or stalling ends its turn. Fitness is the only feedback evolution gets.

Between Generations

How Evolution Picks the Winners

When every car has stopped, NEAT turns their scores into a better next generation in five moves.
  1. 1

    Evaluate

    Every car gets a fitness score for how far it drove.

  2. 2

    Select

    The top 20% of each species become parents, and the best two in each species survive untouched.

  3. 3

    Crossover

    Two parents combine their connections into a child network.

  4. 4

    Mutate

    Weights get nudged, and sometimes a new connection or neuron appears.

  5. 5

    Speciate

    Similar networks are grouped, so new ideas aren't wiped out too early.

Real Code, Not a Mock-Up

Read the Exact Function Making the Choice

This is the real decision function from the simulation engine. In the simulator, it sits next to the live numbers it receives, so you can check every choice a car makes by hand.

  • Nine steps cover the whole learning loop
  • Highlighted lines follow each step as it runs
  • Pause and Step to freeze one tick and inspect it
Open the Code Walkthrough
app/simulation/engine.py · line 85
def decide(outputs: np.ndarray) -> Decisions:
accelerate, brake, left, right = outputs.T
active = outputs > ACTIVATION_THRESHOLD
return Decisions(
accelerate=active[:, 0] & (accelerate > brake),
brake=active[:, 1] & (brake > accelerate),
turn_left=active[:, 2] & (left > right),
turn_right=active[:, 3] & (right > left),
)

By the Numbers

The Numbers Behind Every Car

8
Distance Sensors per Car
9
Inputs to Every Network
4
Possible Actions
30
Decisions per Second
50
Cars per Generation by Default
5
Free Runs a Day

Questions

Frequently Asked Questions

Do I Need an Account?

No. Open the simulator and press Start Training. Your runs are linked to an anonymous trial ID that lives in your browser, so there is nothing to sign up for.

How Many Runs Can I Start?

Each network (IP address) can start 5 training runs per day and 20 per week. The daily count resets at midnight UTC and the weekly count resets on Monday. A run that fails because of a server error before finishing its first generation is not counted.

Is This Real Machine Learning or an Animation?

It is real. Every car is driven by its own neural network, evaluated on the server with the NEAT-Python library. The code panel shows the actual source that runs, together with the real numbers from the leading car.

What Is NEAT?

NEAT stands for NeuroEvolution of Augmenting Topologies. It is a genetic algorithm introduced by Kenneth Stanley and Risto Miikkulainen in 2002 that evolves both the weights and the structure of neural networks, starting simple and adding neurons and connections only when they help.

Why Do the Cars Crash So Much at First?

The first generation's networks are random, so most cars steer into a wall within seconds. Evolution keeps the few that got a little further and breeds from them. Within a handful of generations you usually see cars holding the road.

Why Does Starting a Run Sometimes Take a Few Seconds?

The simulation server goes to sleep when nobody is using it, which keeps this free project affordable. Pressing Start Training wakes it up, which usually takes 5 to 30 seconds.

What Data Do You Keep?

Your trial ID, your IP address, when you started each run, and the results of your runs. That is what the limits and your run history need. You can export or delete your runs at any time in Settings.

Start Your First Generation

It takes one click. Within a few minutes, cars that could barely leave the start line are usually taking corners on their own.

Start the Simulator