research · 2026–present
Flyweight
A deterministic browser fighting game where the opposing controller isn't hand-tuned — its wiring comes from the FlyWire fruit fly connectome, trained with the Cross-Entropy Method instead of hand-authored rules.
early — one full training run complete, results still being interrogated, no public deployment
What it does
A FastAPI + WebSocket brain service runs the connectome-derived recurrent controller against a from-scratch, replay-verified fight simulation shared by the renderer, a headless trainer, and replay playback — so any match can be bit-for-bit re-simulated from its seed and action log. The frontend never fabricates a 'brain activity' display: an offline or rule-based fallback says so explicitly and shows zero active neurons. A first full CEM training run (20 generations, population 12, all three difficulties) took a controller from 0% to a 100% held-out win rate against baseline opponents in the project's own evaluation suite — reported alongside an open, unresolved question about whether that policy actually generalizes or just converged to seed-insensitive behavior, rather than presented as a finished result.
Why I built it
I wanted to know what happens if you take a real biological wiring diagram, wrap it in sensory and motor adapters it was never designed for, and ask it to fight. Mostly I wanted an honest answer, including if the answer was 'it doesn't really work.'
Technical problem
The FlyWire FAFB connectome (v783) maps roughly 138,000 real neurons and about 15 million synaptic connections in a fruit fly brain — not a game controller. Flyweight reduces that into a deterministic 1,536-neuron, 170,489-edge subgraph, attaches artificial sensory input and motor output adapters around it, and trains the result with the Cross-Entropy Method (a gradient-free evolutionary optimizer) rather than backprop, since the network's structure is fixed by biology, not designed for learning.
My contribution
Sole builder — data pipeline, simulation, controller training, and frontend.
Evidence and limitations
Re-verified 2026-09-14 directly against the local repository (not just GitHub). Neuron/edge counts, data provenance (FlyWire FAFB v783, hash-recorded downloads, Zenodo/Nature citations), and the 0%→100% training result are all documented in the repo's own README/BUILD_REPORT with specific numbers (20 generations, population 12, mean reward 45.0, 9-episode eval suite) and an honestly-flagged caveat about seed-insensitive convergence. The repo's own test/lint/audit pass counts (Vitest, pytest, Playwright, ruff, bandit, pip-audit, npm audit, secret scan) were read from BUILD_REPORT.md but not re-executed by this portfolio session — self-reported, not independently re-run.
Technologies
Python, NumPy, SciPy, FastAPI, WebSockets, React, TypeScript, FlyWire connectome data, Cross-Entropy Method
1,536 neurons — as of 2026-10-08. FlyWire subgraph; reported in Flyweight's README, as of 2026-10-08. Source: https://github.com/mukndd/mukndd/blob/master/stats/data.json
170,489 edges — as of 2026-10-08. hash-verified; reported in Flyweight's README, as of 2026-10-08. Source: https://github.com/mukndd/mukndd/blob/master/stats/data.json
100% held-out win rate — as of 2026-10-08. 9-episode suite; reported in Flyweight's README, as of 2026-10-08. The 9-episode evaluation still carries the unresolved seed-insensitive convergence caveat; this is not evidence of generalization. Source: https://github.com/mukndd/mukndd/blob/master/stats/data.json



Project links
Separate fighting experiments
Proposed only: compare direct game-state input with screen-only observations in a common browser fighting environment under controlled, reproducible evaluation. Game choice, controller details and feasibility remain unresolved. No integration or comparison results exist.
Read the separate unfinished Jax experiment