Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles

Evolution

Create creatures and let them evolve to see how they master various tasks. · By Keiwan

survival and replication and other questions

A topic by huepenbecker created Jul 17, 2018 Views: 259 Replies: 1
Viewing posts 1 to 2
(1 edit)

Hello, first off I would like to thank you for making this game/simulation free to play, it's really great and I've spent countless hours on it.


I would like to understand more of what is going on in the background and maybe you could help me with some questions I have (or somebody else?)

1. How does the evolution process take place? (The fitness score is a percentage, is it also the probability that this individual creature will reproduce and have offspring in the following generation? Does this mean creatures with a fitness percentage of 0 won't reproduce?)

2.  Does the winner of the generation get a special probability of reproducing compared to e.g. second place? (Like the alpha male in the animal kingdom who gets to mate exponentially more than his second in command)

Also, this is propably a little difficult for me to understand but 

3. What what does a note do in the neural network? (I understand what input and output is, but what does the note in between do? Is there maybe an educational video or something that you could recommend for me to understand what the brain does?)

4. Also, I read somewhere that it makes most sense to stack your layers from big to small, e.g. 100-20-5. Can you confirm this?


I really apreciate how active you are on this board, and again, thank you for making this game! You really did an amazing job there

Developer

Thanks! 

1. + 2. The distance to reach 100% fitness is set by me pretty arbitrarily. I just decided on distances that would be quite hard to reach with most creature designs (that aren't glitched out). So the fitness is just the percentage of this arbitrary distance that your creature managed to travel in the given time (where the max distance is also scaled by how much time you give the creature - so if you give them twice as much time, they would need to travel twice as far to get the same fitness score). 

The selection probability is proportional to the fitness (Fitness Proportionate Selection - Wikipedia). So if you have 4 creatures that all reach a 1% fitness score, they are each going to have a 25% chance of being selected for each necessary recombination step. 

3. The brain is a simple feed-forward neural network. Each node takes all of its inputs, multiplies each one with a weight (the weights are the things that are optimized during the simulation and they determine the behaviour), adds them all together and runs that result through a so-called activation function (1 / (1 + exp(-x)) which calculates the output of this particular node. 3Blue1Brown (on YouTube) made some really good videos on Neural Networks recently, so I'd definitely recommend to check them out. The whole topic is pretty math-heavy though.

4. I've definitely seen better results that way than having it the other way around (e.g. 5-20-100) but I've seen even better results with a more balanced node distribution. You're right, there are lots of deep neural networks, for example for pattern recognition, that are setup with decreasing weights per layer but in this case that doesn't seem to be the optimal solution. Maybe it can actually produce better results but only after a very long simulation.