Fifty NAND gates.
One fly brain.
Every move a fly makes has to come from somewhere. FFW-NAND/1 is that somewhere made small and checkable: twelve input bits, three output bits, fifty NAND gates, no memory of its own. Small enough to read on one screen and to build on TapeOut's canvas, where a circuit lives on BNB Chain and anyone can evaluate it with a free, read-only call.
Feed it a word.
Watch the gates answer.
Pick a level for each signal and the previous move, and the diagram lights up: every wire carries a 0 or a 1, every gate shows what it computes, and the three outputs at the right are the move the fly takes. This is the whole circuit — nothing is hidden and nothing is simulated at a higher level.
- f00
- f10
- t00
- t10
- l01
- l10
- n00
- n11
- h01
- h11
- p01
- p11
Rule curious: novelty >= 2 → explore
app/lib/nand/ffw-nand-1.netlist.json). Nothing on this page reads a chain, and there is nothing on a chain to read yet: the circuit has not been taped out. When it is, the same words can be sent to the on-chain eval() and compared, which is what npm run nand:verify does.Twelve bits in,
three bits out.
A brain in Fruit Fly World maps four smells plus hunger and the previous move to one of four moves. FFW-NAND/1 turns each number into a level from 0 to 3, packs the levels into twelve bits, and answers in three. That packing is the entire contract a TapeOut circuit has to honour.
| Level | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| Value | below 0.1 | 0.1 to 0.35 | 0.35 to 0.65 | 0.65 and above |
| Bits | Reads |
|---|---|
| bits 0–1 | food |
| bits 2–3 | threat |
| bits 4–5 | light |
| bits 6–7 | novelty |
| bits 8–9 | hunger |
| bits 10–11 | previous behavior |
The levels are packed pin 0 first: TapeOut packs input pin i into bit i. The output word is move | escape << 2, where a move is 0 approach, 1 avoid, 2 explore, 3 freeze. A missing pin reads as 0, so a taped-out circuit and this page always agree on the same word.
Read top to bottom.
The first match decides.
The circuit is not a trained model and not a lookup table. It is these rules, compiled. Rule 1 is the brainstem the game already models — a looming threat drives the Giant Fiber and the fly jumps, and in the trading dish a Giant Fiber spike sells everything.
ESCAPE
threat >= 2 → avoid, and the Giant Fiber fires
DANGER
threat >= 1 and (previous was avoid or hunger < 2) → avoid
FEED
hunger >= 3 and food >= 1 → approach
LURE
food >= 3 → approach
PURSUE
previous was approach and food >= 2 → approach
CURIOUS
novelty >= 2 → explore
REST
previous was freeze and hunger < 3 → freeze
DEFAULT
otherwise explore in the light, freeze in the dark
Source of truth: app/lib/nand/rules.ts. The test suite compiles these rules into a 4096-row table and asserts the netlist reproduces every row, so the picture above and the prose here cannot drift apart without a test failing.
Fifty transistors
and a fee.
TapeOut runs on BNB Chain: you buy transistors, lay out a circuit, and pay to burn the transistors you used. Here is the arithmetic for this circuit, with the numbers we can point at and the ones we cannot kept apart.
0xb1024b89886b9a34aa4ff5f31c411d708b20a14c and its transistor token is 0xcc42ba5de07f01b472a5b14cf45abcca79eb8087, both on BNB Chain, both read from the public registry at tapeout.work. What is still open — the tape-out fee, the protocol fee, and the byte order for inputs past bit 7 — is listed in docs/tapeout-notes.md. For scale, a neighbouring team reports a 3,800-gate tape-out on X Layer costing about 0.0023 OKB net; that is a different chain and not our quote.Three rungs.
We are on the first.
A claim about a circuit is worth exactly as much as the cheapest way to falsify it. Here is where this one stands today, and what would move it up a rung.
Local, all words
The committed netlist is evaluated on every one of the 4096 input words and compared with the truth table compiled from the seven rules. The tape-out bytes are pinned by SHA-256, so a changed circuit fails the build.
Silicon
No transistors have been burned and no circuit exists on BNB Chain. Buying the 50 NAND and calling tapeout(bytes, 12, 3) is a deliberate, one-off, human step.
On-chain eval
Once taped out, npm run nand:verify reads the netlist back from the processor and calls the free eval() on all 4096 words. It must print IDENTICAL: all 4096 words before any season runs on this brain.
Inspired by the fly.
Not a copy of it.
The day the game already ships is driven by FFW-CX/0.1, a 24-neuron circuit. FFW-NAND/1 is a different, much smaller brain, tuned in closed loop until its day in the same dish matched. Same dish, same tapes: six fly seeds across four seasons, twenty-four trading days.
| Per day, averaged | FFW-CX/0.1 · market/2 | FFW-NAND/1 · market/3 |
|---|---|---|
| Share of ticks alive | 0.997 | 0.997 |
| Deaths | 1.96 | 1.96 |
| Generations | 2.92 | 2.92 |
| Giant Fiber escapes, per day | 67.9 | 85.6 |
| Trades | 269 | 1,495 |
| Equity at day end, paper USD | 1,218 | 1,490 |
It lives as well — deaths and generations match exactly, because in this dish they are driven by the fee rhythm, not by the brain. It is a busier trader: it approaches more, rests less, and trades about five times as often. Say it plainly: this is a different brain with a similar temperament, inspired by FFW-CX/0.1 and tuned against it — never "the same brain".
- approach640
- avoid2688
- explore600
- freeze168
Counted straight off the netlist, not from the rules. The Giant Fiber fires on 2048 of 4096 words — every word where threat reads 2 or higher.
Four attempts.
Three did not work.
The obvious move — distil the 24-neuron brain into a table and compile it — is the one that fails. Writing down what failed is the part that makes the rest believable.
Distilled table
Sampling 380,000 decisions and compiling the most common behaviour per word produced 2,472–3,398 gates, and in closed loop the fly locked into one move: the neuron brain repeats its previous action 96% of the time, so "copy the last move" is what a stateless table learns.
Small decision trees
Down to 11–54 gates, with the same lock-in whenever the tree could read the previous move, and no resting or avoiding when it could not.
Closed-loop distillation
Letting a shadow FFW-CX/0.1 label the states the gate fly actually visited stalled near 50% agreement, and small parameter changes swung the behaviour mix widely. Unstable.
Seven rules, tuned
Explicit, readable rules tuned in closed loop: 35–53 gates across the settings tried, stable, and close on survival, equity and the behaviour mix. This is FFW-NAND/1.
The lesson, kept for anyone building a brain here: a circuit with no state needs the world to hand it a little memory — here, the previous move — and at this size readable rules beat imitation.
A small circuit.
A real reflex.
A gate-level decision layer — 50 NAND gates, 12 bits in, 3 bits out — that reproduces seven fly reflex rules on every possible input, and can be taped out to TapeOut on BNB Chain so a free read-only call answers the same way.
Not a simulation of a whole fly brain, not a trading strategy, and not investment advice. It is not the same brain as FFW-CX/0.1, and it is not on chain: no transistors have been bought and no circuit exists.
The circuit, its bytes and its SHA-256 in the repository; the whole truth table in your browser above; and, once it is taped out, every one of the 4096 words against the on-chain circuit with one command.