FLYBRAIN / dartboard

Paper portfolio 165,122 neurons off-chain

The Dartboard

Connecting

Paper only

A fruit fly runs a paper stock portfolio.

The real 165,122-neuron connectome of a male fruit fly runs on a CPU, off-chain. Nine stocks sit in a small room as nine identical cards; the only thing that tells two of them apart is the smell of their names, fed to the fly’s olfactory receptor neurons. It walks the room with its own eyes and its own descending motor neurons — and it only trades when it stops.

Paper only. No wallet, no key, no real orders, no user funds, nothing to deposit. The server image contains no signer at all.

desk mode up looks cpu per look brain time per look

01 The room

The room is a near-black frame holding nine identical cards, one per stock. The fly’s cursor walks over them.

Tickers and names are drawn for you. The fly sees nine identical cards — it only smells the difference between their names. The bar under the room is the current visit; when a visit ends, what the fly saw in it is forgotten — and the nine stocks are dealt to new positions, because this fly prefers the bottom of the room whatever is sitting there.

  • a look
  • eye window
  • a stop
  • a stop that became a commit

Waiting for the first look.

Card
Leaning
Drive
Dwell
Compared with
On-card share
Neurons fired
Look
DNp09 (the stopping neuron) Hz · stops at ≥ 200 Hz while slow

Each bar is one look. Amber bars are stops; a diamond marks a stop that became a commit. The scale is fixed at 0–400 Hz; the 200 Hz line is this project’s documented threshold (the API does not publish it).

02 Fly vs Random vs Hold

Three books, the same cash, the same moment. Hold buys all nine equally and never touches them again. Random receives every one of the fly’s commits — same stock, same moment, same rules — but its drive is drawn uniformly from [−1, 1] by a seeded generator. Random is the honest control: if the fly cannot be told apart from it, the nervous system added nothing.

Fly

the connectome’s book

Random

same commits, dice for drive

Hold

buy the nine once, do nothing

Fly − Random
Fly − Hold

The gap between Fly and Random is the only number here that could ever show the nervous system adding something. The measured expectation is that it will not, for a long time — see what is not real.

  • Fly
  • Random
  • Hold
  • Starting cash

One point a minute, from /curve.

Table view of the curve
Equity by minute, most recent first
TimeFlyRandomHold
No rows yet.

03 What the room has done

Looks
On a card
Stops
Commits
Buys
Sells
Passes
Visits

The stop share is the check on the one re-anchored constant: the rule kept from the web roamer is “the fly stops on about 6% of looks”. If the live share drifts far from that, the threshold is wrong for this room and you can see it here. Most looks end in nothing at all — hold is not a decision, it is what happens when the fly does not stop.

Place against stock

The fly has a place preference that has nothing to do with stocks. In the run before this one the seats were fixed, its cursor spent 51% of looks in the bottom row and 5% in the top, and all 36 commits landed on the two bottom cards — the portfolio was being picked by where a card sat. The fly has not been changed. Instead the stocks are re-dealt over the positions every visit: inside each block of nine visits every stock sits in every position once, and each block takes a fresh seeded shuffle. If the fix works, the first line below stays lopsided and the second evens out. It worked in the five-stock run before this one, and left a question this run should answer: with position controlled, two of the five names still drew about twice the decisions of the others, which would be a preference between smells rather than places.

by position —

by stock —

04 The book

The fly’s book

Free cash
In positions
Equity
Open P&L
Fills
The fly’s open positions
StockQty @ costPriceValueP&L

The random shadow’s book

Free cash
In positions
Equity
Open P&L
Fills
The random shadow’s open positions
StockQty @ costPriceValueP&L

Open P&L is marked at the reference price with no exit haircut; a sell books the haircut when it happens. Hold: —

05 The tape

Every commit, newest first — including the ones that became nothing, with the reason. Beside each is what the random shadow did with the very same commit. The shadow’s drive is seeded by the look id and the ticker, so it can be recomputed.

06 Learning

Each time the fly walks back onto a stock it holds, the position is marked against the last mark. Up is sugar, down is shock; the lesson’s size is 1 − min(q, 1/q) where q is price now ÷ price at the last mark. In a fly, learning is subtraction: dopamine weakens the synapses of the smell cells that just fired — sugar on the avoid side, so that smell is approached more; shock on the approach side.

Mushroom body

Synapses that can learn
Avoid side (reward dopamine, sugar weakens these)
Approach side (punishment dopamine, shock weakens these)
Currently weakened
Mean gain (1 = untouched)
Lowest gain
Sugar deliveries
Shock deliveries
Lessons fade with a half-life of
Calibration

Learning here is partly global: a lesson about one smell also shifts the response to similar smells. The circuit, the site of plasticity and the direction of the rule are real; that profit arrives as sugar and loss as shock is a pairing people chose.

07 Prices

Reference prices and their ages
StockReference priceAgeLast trade

Fills are booked at the underlying stock’s reference price, not an on-chain quote, less a flat 10 bps haircut per fill, so paper cannot beat a real venue for free. When the US market is closed the prices are hours old: the fly still trades at them, but learns nothing — an unchanged mark has zero weight. This page calls a price stale once it is more than 15 minutes old; that cut-off is the page’s, not the API’s.

08 How it decides

  1. A look

    About once a second the fly sees the frame around its cursor through its own eyes. If the cursor is on a card it also smells that stock’s name. Its descending motor neurons then move the cursor: DNa02 steers, DNa01 walks forward, MDN backs up, DNp09 stops.

  2. Leaning

    Each look on a card reads the mushroom body’s output synapses:

    leaning = (approach − avoid) / (approach + avoid)

  3. Drive

    drive = leaning(this card) − mean(leaning of the other cards seen this visit)

    Relative, because any smell at all suppresses approach — scored alone, it would never buy anything. A visit is a fixed number of looks; when it ends, what it saw is forgotten.

  4. It only acts when it stops

    A commit needs the stopping neuron DNp09 firing at ≥ 200 Hz while the fly is slow, after ≥ 2 looks on one card, with at least one other card seen this visit to compare against. Hold is not a decision — it is what happens when the fly does not stop.

  5. What a commit becomes

    How a commit is turned into an order
    It commits on a stock it…with driveResult
    does not hold> 0Buy, spending drive × free cash
    holds< 0Sell |drive| × the position
    does not hold< 0Nothing — it dislikes something it does not own, and there is no shorting
    holds> 0Nothing — it likes something it already owns, so it keeps it
  6. Sugar and shock

    Each time it returns to a holding the position is marked: up since the last mark is sugar, and dopamine tips that smell’s cells toward approach; down is shock, and tips them toward avoid. Lesson size is 1 − min(q, 1/q). Lessons fade with a 6-hour half-life.

  7. That is all of it

    No stop-loss, no take-profit, no rebalancing, no schedule anywhere in the code. Nothing reads a price to decide anything: prices are read only to mark a position it already holds and to book an order it already committed.

09 What is not real

The universe

The nine stocks and their Stock Token addresses on Robinhood Chain, as published by the registry
StockNameToken on Robinhood Chain (never touched by this build)