Why I Put a Genetic System in a Turtle Racing Game
Someone mentioned NEAT can also be used for genetic mapping. That was its own interesting thought.
I was already using NEAT for PyPongAI, teaching neural networks to play Pong through evolution. The idea that the same algorithm could map genetic traits — not for neural network weights, but for actual biological traits — stuck with me.
So I built TurboShells. Turtle racing with a 20-trait genetic system. Mendelian inheritance, blended inheritance patterns, RGB/discrete/continuous mutations. The Rust core handles the compute-intensive genetics operations, with Python bindings via PyO3 for integration.
The honest part: I didn’t know if the genetics would actually matter for the gameplay. Racing games are usually about speed and reflexes. Would genetic traits actually make a difference, or would it just be a fancy layer on top of the same basic mechanics?
The breakthrough was the terrain system. Different terrain types favor different genetic combinations. Speed matters on flat terrain, but recovery and climb stats matter on rough terrain. The genetics became genuinely strategic — you’re not just breeding for “fast,” you’re breeding for the specific conditions of the tracks you race on.
What didn’t work: Trying to make the Python bindings handle everything initially. The performance was terrible for batch operations. I had to move the genetics core to Rust and only use Python for the orchestration layer. That 10-100x speedup made batch genetics operations actually practical.
The lesson: Sometimes the most interesting technical choice comes from a random conversation, not a grand plan.