I have a new side project: keeping a digital fruit fly on my Mac and trying to teach it something.

The first lesson is simple. See a 1, lift the left front leg. See a 0, stay still. Six legs; we can start with one.

I want a small lab where I can observe behavior and gradually teach new abilities. Lifting a leg is the first stage of testing the learning setup: connect input, action, feedback, and persistence before trying more complicated behavior.

Close-up in the English interface: the screen shows 1 and the left front leg, L1, is raised

After the response: the screen shows 1 and the left front leg, L1, is raised. I used the English interface and a closer camera, hiding decorative plants that obstructed the view.

Why start with such a small movement?

“Teach it something” is an appealing goal and a difficult thing to verify. A single leg gives me specific things to measure: what image went in, what action was selected, and whether the foot actually reached its target position.

It also gives me a useful failure case. Lifting is only half the task. The fly must stay still on a 0. A fly that always raises its leg would look clever on half the questions.

So I fixed the lesson around one visual condition and one action. Once the loop is repeatable and inspectable, I can add more.

What it sees, and what actually learns

The experiment builds on Fly / Wirehead’s scene and simulation code, using MaleCNS v1.0 fruit-fly connectivity data. The retained local network contains 166,700 neurons and 25,582,938 directed connections. The wiring comes from real data; neural activity is computed by a simplified model, and the body uses animation and kinematic control.

For a lesson, I render a 0 or a 1 as an image and send it through the model’s visual input. An external action module reads simulated neural activity and chooses whether to lift the leg. It does not receive the answer label.

There is a deliberate simplification in this first stage: the fly network’s synaptic weights stay frozen. Learning happens in the external action readout. Feedback changes how that module maps neural activity to an action. This lets me check the complete loop without trying to diagnose vision, internal plasticity, and body control all at once.

Precisely speaking, I am training an action decision module attached to a fly neural simulation. That is not yet evidence that the fly brain itself has learned digits.

Show it a question, wait, give feedback

The teaching interface has a few direct controls: show 0, show 1, wait for an action, then mark it right or wrong. Feedback updates the action parameters once and saves a skill version.

Before the lift: the screen already shows 1, with the left front leg still lowered

Before the lift: 1 is visible on the screen and the left front leg is still lowered. The GIF below shows the movement that follows.

Saving matters to me. One correct movement might be luck. Keeping the parameters, loading them later, and asking more questions makes a continuing experiment possible. Older versions remain available for comparison.

For now, this “memory” stores action parameters for the fixed leg-lift lesson. Open-ended teaching, arbitrary skill combinations, and retaining old skills while learning new ones are questions for later experiments.

Slowed capture of an actual trial: the screen shows 1 and left front leg L1 rises and holds

Actual interface capture, cropped, slowed, and looped. Recorded on September 18, 2026 using the saved skill with 104 cumulative parameter updates. No feedback or further training was applied. This is a later demonstration, not footage from the 40-trial test below.

The first run: 34 right, 6 wrong

The first complete course used 20 random-action baseline trials, 80 feedback-training trials, and 40 frozen test trials. Testing provided no rewards or parameter updates, with small changes to digit size and horizontal position.

  • On 1: the leg lifted correctly in all 20 trials.
  • On 0: it stayed still in 14 trials and incorrectly lifted in 6.
  • Overall: 34/40 correct, or 85%.

The six errors interest me. The system made a useful distinction between these inputs, but it did not reliably get both halves of the rule right.

This was one small engineering test. It may have relied on shape or brightness differences. It does not establish an understanding of numbers or an advantage over a simple image classifier. The 20-trial random-action baseline is also too small to carry a strong learning claim on its own.

The leg lift is the starting point

Next come harder questions. Does it still work with a different font, a new position, or an unfamiliar pattern? Does the result hold across random seeds? What happens if I shuffle the neural features or the feedback? Those controls can help reveal what the system is actually using.

After that, I want to add actions gradually and test whether further learning preserves earlier skills. Plasticity inside the neural model and a more realistic body also need their own validation.

That is where this first entry ends: a small lab that can present a task, accept feedback, and save action parameters, plus a first result with both successes and mistakes. One raised leg gives me somewhere concrete to go next.

Credits

This project builds on Fly / Wirehead and Stonkfly. Connectivity data comes from the MaleCNS collaboration (v1.0, CC BY 4.0). Screenshots show my local adaptation. The reported test is the first complete course, finished on September 17, 2026.