I want to share a research problem I have been working on for a number of weeks. I created artificial lifeforms that live in a simple world, and gave them capacity to reproduce, recombine, and mutate. After I started getting some pretty fun results, I decided to build a JavaScript visualizer which you can use to run the simulations in your own browser.
I’m interested in creating social intellects with the capacity to autonomously generate models to handle novel situations, and with the ability to learn from observation. Both of these problems are difficult to describe a cost function for, so I’m instead leveraging life itself as the cost function and generating environments that will encourage development of the desired traits. Before I run off and make virtual dogs though, I thought it would be prudent to build some simpler life forms.
Introducing the Uckeleoid (Pronounced like nucleoid without the ‘n’). The Uckeleoid has only a few pieces of information available to itself: Its gender, whether it’s facing another Uckeleoid, whether it’s facing food, whether it’s facing a wall, and how well fed it is.
I originally wrote this code to run in Java at many thousands of simulation ticks per second, but the JavaScript visualizer here (which is still running the full simulation math) simulates a single tick per second.
Uckeleoids live for 20,000 simulation ticks, or 5 and half hours at 1 tick per second. They have a gestation period of 2,000 simulation ticks (half an hour) and assuming restful behavior can survive without food for 2,000 simulation ticks (again half an hour). Red Uckeleoids are male and blue Uckeleoids are female.
I have saved some files snapshotting the development of the prototype Uckeleoids over the course of a few hundred generations. Let’s take a look at those now, you’re free to load each of these snapshots in your browser and observe the differences in behavior. It is worth noting that because the simulations are not deterministic and because the full simulation code will run in a browser, you could run these in your browser and achieve similar results if you left your computer on for long enough, but details would of course be different.
Tick 0 ( load snapshot ): The world starts with 87 Uckeleoids in a 25×25 world. Each Uckeleoid has an age of 0 to start, so the first deaths due to old age will be in 5 1/2 hours. Their neural networks are all initialized to give an equal chance of each action (rest, turn left, turn right, move forward, eat, and breed). The random initialization is not at equilibrium yet, and the population would grow to around 200 even if mutations were turned off.
Tick 18,000 ( load snapshot ): 5 hours into the simulation, 17 of the original 87 Uckeleoids are still alive. These remaining progenitors will die within half an hour if starvation doesn’t claim them first. The population has swelled to 200, despite very little change in the average neural networks of the Uckeleoids.
Tick 80,000 ( load snapshot ): After the simulation has been running for almost a full day, the oldest members of the population are roughly 15th generation. The population is beginning to show biases against turning away from food, resting, and … turning right. What? Yeah, the population has a consistent bias against turning right.
Tick 280,000 ( load snapshot ): Three days in and more than 50 generations, and the bias against turning right has become an ironclad rule. Uckeleoids simply don’t turn right anymore. Strangely, the population still hovers around 200. It seems that while individuals might be more fit, they haven’t tuned themselves enough to eek much extra efficiency out of the environment.
Tick 2,000,000 ( load snapshot ): Our last snapshot is slightly after 23 days. This is 100 Uckeleoid lifetimes, and the eldest members are approximately generation 350. Uckeleoids never rest, never turn right, and no longer attempt to eat when not facing food. The population holds stable at over 250 Uckeleoids.
Okay, what did we learn? I think my favorite piece about this is that the population will always develop a turning preference. Always. You can run this a hundred times, and each time a turning preference will be apparent by 300K ticks. I didn’t expect to see this behavior, but when you think about it, a Uckeleoid sees very little of the wide world around it, and remembers even less, so turning left and then right just means aging by two ticks. Turning left and then left again means aging by two ticks still but also potentially having new food / breeding partners / a new direction to travel ahead. For such a simple life form, indecision about which way to turn is wasteful, so the entire population will always develop a single minded turning preference. Individuals don’t exhibit non-standard turning preferences, because then their children will turn both ways, or worse, not turn.
Where to next? Code exists give Uckeleoids a few bits of memory, but the meta-analysis code isn’t powerful enough to show what if any impact these memory units are having. This means my next step is going to be to write additional data analysis tools, so I can demonstrate what if any impact a few bits of memory have. It’s quite possible that memory will not be helpful to the Uckeleoids without a more powerful set of sensors or a more stimulating world.
