Install
- Open PolyModLoader (the community mod loader for PolyTrack), or its desktop app.
- Open Mods, choose Add URL and paste:
https://jacktheone0.github.io/flyvis-web/polytrack
- Pick latest, click Load, then Apply. A ๐ชฐ Fly driver panel appears on the right of the game.
Built for PolyTrack 0.6.3. A game update may break it until the mod is updated.
Teach, train, race
- Start a race. Summer 1 is a good first track: it has walls and plain curves.
- Teach. Press I drive and drive 3โ5 clean laps (stop and start again between laps if you like; everything adds up). Include a few recoveries: drift toward a wall on purpose, then steer back.
- Train. Press Train the fly. It says how much of your steering it predicts on driving it didn't train on.
- Race. Restart the race and press F. The fly drives in slow motion.
While it drives, everything happens in the game
- Correct it: just press the arrow keys. You take over at once; let go and the fly takes back over about half a second later. Your corrections count double, and the fly retrains in the background.
- Reward it: G (๐, "dopamine") when it did well, B (๐, "pain") when it did badly. Passing a checkpoint is an automatic reward; crashing or getting stuck is an automatic punishment.
- Pick its brain: Route memory recalls what you did where the view looked the same (how ants and bees follow routes). It's best for repeating one track. Decoder is a learned rule that can generalize, and responds to rewards directly.
Everything it learned is saved in your browser. Forget everything it learned starts over. If the car stops for 1.5 seconds, a helper presses "return to last checkpoint". That helper isn't the fly.
What's really happening
The fly's part
Each frame the game draws is sampled by the fly's 721 eye facets and fed to the same 45,669-neuron flyvis network as the other demos. The decoder reads only the 34 output cell types, the signals the optic lobe sends to the rest of the fly's brain, averaged over a 6 ร 3 grid of the visual field.
How it learns
The fly's own wiring never changes. On top of its output neurons it learns three ways. It imitates you: a decoder fitted to your laps and corrections. It remembers: stored views from your laps. It is reinforced: it wobbles its steering slightly, and a reward strengthens whatever it did in the last 1.5 seconds, the most recent moments most (like dopamine acting on an eligibility trace), while a punishment reverses it. Its features include a slowly fading trace of the last half-second, a little short-term memory.
Slow motion and fair play
The mod patches the game's physics clock so game time waits for the fly's brain: 20 ms of racing per brain step. That's why leaderboard submissions, record verification and multiplayer are switched off while the mod is loaded. Slow-motion laps aren't real laps.
How well does it drive?
Honestly: unproven. In testing, the mod, the slow motion and the whole teach, train and race loop work, but the built-in autopilot I first tried was too poor a teacher, so it's gone. A decoder trained on its laps couldn't predict steering on track it hadn't seen. Clean laps from a human are the experiment. The accuracy shown after training (how much of your steering the fly predicts on driving it didn't train on) tells you whether it has a chance. Well above 50% is promising; near zero means it hasn't learned to drive.
PolyTrack is by Kodub. PolyModLoader is a community project; this mod doesn't include or redistribute any game files. Blocking online writes follows the approach of poly-bot. This project isn't affiliated with Kodub, PolyModLoader or the flyvis authors.