Simulating and Studying Ecosystems, Genetics & Neural Networks (Part 3)

Let’s talk about GENETICS! This’ll be a fairly condensed post, as compared to the others, because it’s actually a lot simpler than it seemed originally!

So, what’s it all about? Well, life on this planet uses a few kinds of what amount to molecular code structures to guide the chemical and biological processes that cells to grow and function!
The interesting part is that due to the inexact nature of chemical reactions, radioactive decay, and other kinds of weird life stuff, the code is susceptible to tiny but important changes. We call the changes mutations, and it’s this key feature that will allow my little ecosystem simulator to be more than just brains firing neurons madly and blobs moving randomly.

The entire genetic sequence that makes up a particular creatures is called a Genome, and Genomes are made up Genes. So, for my little neural-network critters, there’s a Gene that controls how many neurons are in the brain. Then, for each neuron in the brain, there’s a Gene that controls what its type is, a Gene that controls its initial value, and so on. The same goes for the number of axons, and the connections each axon makes!

So, with this system in place, we can describe a brain with a Genome! This means we can build a Genome given a brain, and build a brain given a Genome. So, we can take one of our creatures, get a Genome from its randomly-generated brain, mutate it slightly, and then make a new creature and give it that brain.

It’s mutating!

Then, if we throw a load of these blobs in a pit together, make it so that they can eat eachother, and take the best 50% of creatures after there’s only one left… we can progressively trim out the blobs that are not good at survival! The blobs best at survival will be the ones that have a brain structure that is most likely to lead them away from danger and towards food.

How do they detect danger? How do we know which ones are the “best” at survival? Well, that’s for my next post! In the meantime, here’s a little teaser!