STOCK

'Earn a reward, take a loss' — teaching crypto to a fruit fly brain led it to just stop trading

by
Jang Yun-woo
Published : Oct. 4, 2026 - 11:10:00
    • Copy Completed!

View Korean Original

Fruit Fly Trader (2): What happens when dopamine is injected into a virtual fruit fly brain's bitcoin trades

Since the complete wiring diagram of the fruit fly brain was made public, attempts to build "virtual fruit flies" inside computers have been proliferating abroad — running games and simulations on them has become something of a trend. The Herald Business is publishing a series documenting one reporter's experiment in which a publicly available fruit fly brain was put in charge of cryptocurrency trading. All trades were conducted as simulated transactions, and this series is not intended as investment advice. [Editor's note]

[AI-generated image]
[AI-generated image]

Domestic research confirms what many investors already suspect: the more frequently you buy and sell — whether shares or cryptocurrency — the worse your returns. A Korea Capital Market Institute analysis of stock trading records from 204,004 retail investors at four major Korean brokerages, covering March through October 2020, found that higher turnover rates, more intraday trades, and more frequent position changes all correlated with lower returns relative to the market.

Retail investors with assets of 10 million won ($7,380) or less posted a daily turnover rate of 29.7 percent, and their returns fell from minus 2.5 percent before transaction costs to minus 13.3 percent after. Investors in their 20s and younger paid transaction costs equivalent to 8.1 percent of returns — a direct consequence of overtrading.

The fruit fly brain produced a result entirely unlike that of human investors. When a virtual fruit fly brain was trained on bitcoin trading by feeding profits back as rewards and losses back as penalties, the brain did not learn to make more money — it learned to trade less.

The mushroom body — the learning and memory center of the fruit fly brain — rendered using actual connectome coordinates: 5,177 Kenyon cells (orange), 331 dopamine neurons (purple), and 96 output neurons (red).
The mushroom body — the learning and memory center of the fruit fly brain — rendered using actual connectome coordinates: 5,177 Kenyon cells (orange), 331 dopamine neurons (purple), and 96 output neurons (red).

Under identical conditions, the brain that had made 66 trades cut that number to 8 after learning. Losses shrank, but returns still fell far short of what a simple buy-and-hold strategy would have earned.

The fruit fly brain used in the previous installment trailed a simple one-line rule that bought and sold based solely on price differences. While that rule returned 7.86 percent, the fruit fly brain lost 16.42 percent.

At that stage, the fruit fly brain was little more than a mechanical lookup table — buying or selling based on price differences according to a fixed chart, with no ability to learn which signals were profitable and improve over time.

The fruit fly brain's neural network. [FlyWire]
The fruit fly brain's neural network. [FlyWire]

Fruit flies can learn

The fact that fruit flies can learn which odors signal danger was established by experiments more than 50 years ago. William Quinn and William Harris, working in the laboratory of Seymour Benzer at the California Institute of Technology, published results in 1974 showing that fruit flies could be conditioned by pairing specific odors with electric shocks.

The researchers exposed groups of fruit flies to two alternating odors, delivering electric shocks only when one of the two odors was present. When the flies were then given a choice between the two odors, they consistently avoided the one that had been paired with the shock.

Photo is unrelated to the article's content. [Getty Images Bank]
Photo is unrelated to the article's content. [Getty Images Bank]

The standard experimental protocol used by most laboratories today was devised in 1985 by Tim Tully in Quinn's lab. About 100 fruit flies are placed in a tube and exposed to a first odor for one minute, during which they receive 12 electric shocks through wires on the floor. They are then exposed to a second odor with no shocks.

After training, the flies are released into the center of a T-shaped junction. The first odor is piped down one arm, the second down the other. By counting how many flies go to each side, researchers can measure how well the flies learned.

Flies that learned correctly cluster toward the second odor, avoiding the arm carrying the first odor that had been paired with the shock.

A reconstructed diagram showing Kenyon cells that respond to each of six odors, based on the connectome wiring structure.
A reconstructed diagram showing Kenyon cells that respond to each of six odors, based on the connectome wiring structure.

This learning takes place in a structure inside the fruit fly brain called the mushroom body — so named because of its mushroom-like shape. It is the region responsible for learning and memory in the fruit fly.

Odor signals detected by the fly's antennae are relayed to Kenyon cells inside the mushroom body. Different odors activate different combinations of Kenyon cells, functioning like a kind of "odor barcode."

The mushroom body reads these barcodes and transmits the signals to other parts of the brain. Depending on the signal sent by the mushroom body, the fly either approaches or avoids the odor. When dopamine neurons that signal reward or penalty are added to this circuit, the fly begins to remember which behavior to associate with each odor.

How trading results are fed back to the fruit fly brain: odor-sensing cells → Kenyon cells → output cells → trade execution → profit or loss → dopamine neurons → connection strength adjustment.
How trading results are fed back to the fruit fly brain: odor-sensing cells → Kenyon cells → output cells → trade execution → profit or loss → dopamine neurons → connection strength adjustment.

Teaching crypto to a fruit fly

The mushroom body of the virtual brain running on a PC is connected to 331 dopamine neurons. Those neurons were linked to the outcomes of each trade.

Whenever the virtual fruit fly brain bought and then sold bitcoin at a profit, reward-signaling dopamine was sent; whenever it posted a loss, penalty-signaling dopamine followed. In effect, the brain was being trained to approach market conditions that had previously yielded gains and to avoid those that had produced losses.

The range of odors the brain could detect was also expanded. Price volatility, trading volume, and other variables were encoded into six distinct odor categories representing different market conditions.

With more odors available, the Kenyon cell barcodes activated for each market condition diverged accordingly. Similar market conditions produced barcodes that overlapped by 28 percent, while dissimilar conditions overlapped by only 10 percent — confirming that the fruit fly brain had no trouble distinguishing and recording different market states.

Signal strength changes recorded with each learning iteration.
Signal strength changes recorded with each learning iteration.

Avoiding penalties, not chasing rewards, meant trading less

The first learning experiment used 15-minute bitcoin candlestick data from July 1 to Sept. 22, 2025. An untrained fruit fly brain and a learning fruit fly brain were run in parallel under identical conditions.

The untrained brain made 66 trades (combined buy and sell orders) over the period and posted a loss of 5.37 percent. The learning brain made only 8 trades and cut its loss to 1.13 percent. By contrast, simply buying and holding bitcoin over the same period would have returned 9.49 percent.

The smaller loss did not reflect better judgment. The learning brain received only four trading signals in total — one profitable, three at a loss.

[Getty Images]
[Getty Images]

The number of trades fell to one-eighth of the original. The brain's buy decisions had originally sat just barely above the threshold between acting and not acting. Even a slight weakening of the buy signal was enough to push it below that line and into inaction.

Varying the learning parameters produced the same outcome. Across seven experiments — with six odor categories, different learning rates, and configurations that preserved the previous state between decisions — every version of the trained brain traded less than the untrained one.

Not one experiment produced returns that simultaneously beat buy-and-hold, the top 5 percent of random trading strategies, and the single-line rule.

Buying and selling bitcoin at market price costs 0.116 percent of the transaction amount in combined fees and bid-ask spread. The potential gain from correctly predicting whether the price would rise or fall 15 minutes later amounted to only about one-tenth of that cost.

What the fruit fly brain arrived at after all its learning was a single conclusion: trade less. Rather than selectively avoiding only the odors associated with losses, it had, after a handful of losing trades, stopped approaching almost any odor at all.

Photo is unrelated to the article's content. [Getty Images Bank]
Photo is unrelated to the article's content. [Getty Images Bank]

The dopamine-based learning in the virtual brain is, however, a simplified model drawn from actual fruit fly research, and it would be a stretch to say real fruit flies learn in exactly the same way. The first experiment also produced only four learning events — too few to draw statistically meaningful conclusions.

In a simulated live-trading run using real-time market prices, no learning occurred at all. Over three days starting Sept. 22, the fruit fly brain made 272 decisions and executed one buy order — but never sold. Without a completed trade, there was no profit or loss, no reward signal, and no learning.

Meanwhile, it remains unclear whether the brain's retreat from trading reflects a limitation of the fruit fly brain itself, or simply the absence of any exploitable edge in the 15-minute bitcoin market to begin with.

In the next experiment, the fruit fly brain was set aside, and human- and AI-designed trading strategies were sent into the same market instead.

A four-week Saturday and Sunday series documenting an experiment in which a publicly available fruit fly brain was turned into a "virtual fruit fly" and put in charge of cryptocurrency trading.

초파리 트레이더

dbsdn1110@heraldcorp.com
This content was produced with the assistance of AI translation services.

MOST READ