Skip to content
Tech News
← Back to articles

Engineer turns simulated fly brain into a crypto day trader, posts downloadable sim to GitHub — 166,700 virtual neurons read candlestick charts for dopamine hits

read original get Models of the Mind" by Grace Lindsay → more articles
Why This Matters

A Coinbase engineer wired a full connectome-based simulation of a fruit fly brain — 166,700 neurons and 25.6 million synapses — to candlestick charts, rewarding profitable trades with simulated dopamine. It's a vivid demonstration of how accessible whole-brain simulations have become now that connectome data and open-source tooling are public. The author is explicit that it proves nothing about trading skill, which makes it a useful test case for how quickly novelty AI demos get misread as investment signal.

Key Takeaways
Worth a Look

Models of the Mind" by Grace Lindsay — If watching a simulated fruit fly brain read candlestick charts makes you curious how neuroscience and computation actually fit together, this book is a great next step. Grace Lindsay walks through how mathematical and computational models are used to explain real brains, from single neurons to whole networks — exactly the ideas behind projects like Stonkfly.

See Models of the Mind" by Grace Lindsay on Amazon → Affiliate link — we may earn a commission on purchases, at no extra cost to you. Product picked by AI based on this article; it is not a tested recommendation.

Simulating animal brains seems to be the latest buzz. Hot on the heels of teaching a fly to play Doom, an engineer from the Coinbase cryptocurrency service has elected to turn one into a day trader with Stonkfly. If you want to see Stonk trade live, you can watch here.

The open-source project has a simulation of a male fruit fly brain and eyes, and shows it a standard-issue candlestick graph with historical pricing. The fly can choose to buy, sell, or hold any given currency — although they get shown to the fly in round-robin fashion — and gets rewarded for profitable trading.

A rising portfolio value triggers a dopamine rush as a positive reinforcement signal to 15 cells, while a loss lights up two aversive cells. Trading fees count as losses. The author notes there are no pain or emotional mechanisms at play. Displaying far better judgement than most human traders, the fly cannot use leveraged positions (trading multipliers) or shorts (betting on drops).

Latest Videos From Tom's Hardware Watch full video here:

The brain has 166,700 neurons and 25.6 million connections. The virtual fly sees the graph as a 320x180 display across its left and right eyes, with an intersecting center portion. The simulated photoreceptor cells get fed the RGB pixel values rather than pricing information. By default, the fly "thinks" and acts every 500 ms, and the market data gets refreshed every 60 seconds, and it can bet up to $10 on any one order, up to 24 times a day.

The author notes that this small project doesn't prove anything other than the connection between the input mechanisms, visual signals, and synapse changes. Naturally, he warns users against assuming that said changes are any indication of actual trading ability, especially in the face of a general rise in crypto prices that "can make any buyer look skilled." You can bet that some fly-brained investor will still infer meaning from the experiment, though.

If you're interested in getting your own Stonkfly, you need only download the repository on macOS (it's definitely a fruit fly) or Linux, have 16 GB of RAM available, and Python 3.11 and a C++ 17 compiler. The simulation defaults to using paper trades and $100 in virtual balance, but it uses real BTC-to-USDC data. There are instructions on how to set up a live account to see if your trading skills are a match for an insect.

Follow Tom's Hardware on Google News, or add us as a preferred source, to get our latest news, analysis, & reviews in your feeds.