cadence / tron / helpBack to the demo

Tron

A light-cycle game in your browser. You ride the blue cycle, a Cadence brain rides the pink one, and each leaves a wall of light behind it. Beside the arena you see every neuron of the brain settle on each of its moves.

What it shows about CadenceCadence brains play strong games. This brain sees the whole arena and answers every move with one settle of the whole brain, in your browser, in real time. On its own it beat a bot that looks one move ahead in 102 of 128 games. The page shows how it reaches each answer: every neuron, sweep by sweep, until the whole brain agrees.

What you see

TRONvsMAKO DEEP 2:5 BRAIN+SEARCHALONE FLAT DEEP HELP the arena: you are blue, the brain pink ANATOMY LAYERS visual cortex L1 L2 L3 trace, off motor strip ← ↑ → look-ahead selection settling, sweep by sweep the brain, every neuron, live
The page, drawn by hand. The amber arc over the motor strip marks a move the look-ahead overruled. Every part of the real page carries a question mark that explains it.

Why it matters

Strong play from a brain that settles. A Cadence brain does not compute its move in one pass from input to output. All its neurons adjust to one another, sweep after sweep, until the whole brain agrees; the move is read from that agreement. This brain plays well that way: on its own it wins most games against a bot that looks one move ahead, and the page runs it in your browser at about 11 ms a move, well inside the game's 120 ms tick.

You can watch it think. The page draws every neuron of every settle. Point at a neuron and it tells you what it tracks, such as a wall within two cells ahead or your head close by on the right, and whether silencing it changes the move.

The depth is real. The deep brain's deeper layers decide its moves: with their pathway cut, it changes 82% of its moves and loses every game against the same bot.

A conventional network could also learn to play Tron well. This demo shows that Cadence brains play strong games, and lets you see how they reach each move.

What you can do

How it works

What it sees
2,470 inputs: the whole arena turned so that its own heading points up, as four sheets (walls and trails, your trail, its head, your head), a 9 by 9 close-up around its head (walls and trails, your head), and your heading.
The brain
Deep: three layers of 256, 128 and 32 neurons, 2,921 neurons and 708,806 synapses in all. Flat: one region of 256, 2,985 neurons and 699,398 synapses.
One move
The brain starts from rest, settles on the arena, and its strongest motor neuron is the move. It keeps nothing from one move to the next.
The look-ahead
A search over the game's rules, four rounds deep: each of its moves, your best reply knowing it, and so on. It scores positions by the cells each rider reaches first and by who crashes first, and gives the brain's pick a head start of 8 cells, so it keeps the brain's move unless another is clearly better. It contains no neural network.
How it learned
Offline, before the page: by imitating a search bot, then from positions a search labelled along its own games, and by playing against its own earlier generations and other bots. The deep brain grew its layers from the flat one, then learned from its own brain guiding a tree search. While you play it learns nothing.

The brain runs on the released cadence-net 0.95.2 library, in Python inside your browser (Pyodide), in its own thread. The look-ahead runs in a second thread.

The numbers

Playervoronoivoronoi2voronoi3ab5
Deep brain alone0.800.130.200.08
Deep brain + look-ahead (the page)0.930.700.700.45
Flat brain alone0.800.200.250.14
Flat brain + look-ahead0.910.660.650.51

The share of points in 128 games against each bot (64 arenas, each played from both seats; a draw counts half): evidence/search-readings.json. The deep brain alone won 102 and lost 26 against voronoi. The bots: voronoi moves to the cell that leaves it the most cells it reaches first, one move ahead for both riders; voronoi2 and voronoi3 look two and three rounds ahead; ab5 is the look-ahead itself at five rounds, with no brain.

ReadingValue
Deep pathway cut: moves that change82%
Deep pathway cut: score against voronoi (64 games)0.80 → 0.00
On the page: the brain's time per move, median (deep)11.1 ms
On the page: the look-ahead's time per move, median and largest (deep)11.6 ms, 31.5 ms
On the page: the deep brain plays the native brain's moves, every moveyes
On this page, 32 scripted games against voronoi, the brain in its page seat: brain alone25 won, 7 lost
The same 32 arenas: brain + look-ahead (it overruled 462 of 4,639 moves)29 won, 2 lost, 1 draw

The cut: evidence/deep-ablation.json. The times and the move check: evidence/page_check.json. The scripted games: evidence/promise-20261113.json, made by tools/promise_test.py on the page in a headless browser; its first four games match the native brain move for move. All files are in the tron folder of the repository.

Limits

Keys

Space or EnterStart a round (or ride again) ← ↑ → ↓ or W A S DSteer MSound on or off EscLet go of a neuron's card