Two years ago, I embarked on a weird pet project: a simulated microscope dish populated with randomly generated, bacteria-like creatures. When I added reproduction and genetic mutations to my code, the creatures started to evolve. I was expecting that they’d eventually learn how to swim, and become accurate and fast in their search for food.
It looked like a fun project. It became an obsession, and a very insightful coding experience. I watched these mindless creatures evolve towards unexpected direction: they developed surprising strategies to survive, exploiting every bug and shortcoming in my code, stubbornly refusing to match my expectations.
I was expecting competing species of elegant swimmers. Instead, I got zombie swarms, spider-legged monsters and huge plant-like creatures. I learned that playing god is hard, as I refined and re-wrote my simulation’s code to steer evolution in the direction I thought it was supposed to go.
I failed, and failed again. Until, one day…