Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Evolution

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

Thankyou + Request for a brief explanation

A topic by dannii created Sep 15, 2017 Views: 484 Replies: 1
Viewing posts 1 to 2
(1 edit)

Firstly I'd like to say thank you. Thank you for creating an extremely fun and mesmerising 'game'.

I have noticed a few anomalies here and there in line with what some of the other users have mentioned regarding the 'best of' strains being selected so I'm looking forward to hearing what your response on the reason behind it was, when and if you find it. As well as of course testing new creatures when you release a new build that fixes the issue.

One thing I played around with was the settings for the brain. I was wondering if you might be able to provide a brief explanation of the changes that we can make with those settings and what they mean with respect to one another (layers, input, per muscle). I read the in game help section and I think I kiiiind of understand what the variables mean but I wouldn't say I'm certain.

I find it fascinating that such small changes can sometimes lead to such vast improvements, and as you mentioned in the help, it's watching the evolution that is so interesting. You have an expectation of how a build might turn out and it doesn't always quite get there... you have these moments when you see your 'baby' literally teetering on the edge of growing up to be what you hope it will be (and then that variation gets lost and you end up with another Mexican Waving Caterpillar ;)

I will be sure to pass this game many others.

Gratefully,

Dannii

PS. Created this account just so I could say thanks

Developer

Thank you very much, Dannii! I really appreciate the support and I'm glad you like the simulator so much!

The "brain" of the creatures is an (artificial) neural network. The concept is loosely based on the biological neural network, where you have lots of neurons that are connected to each other by synapses. Neurons can receive signals and send out new signals based on the ones they received. In an artificial NN (ANN) the synapses (connections) are represented by weights. They essentially determine how important the incoming signal through the synapse is for the final result, aka. the outgoing signal that's going to be produced by this neuron.

In our ANN we have multiple layers of neurons. All of the neurons between two layers are connected to all of the neurons in the respective other layer. The information flows from left to right (with respect to my visual network in the settings). The information starts out as all of the input values that describe the creature's current state (height, velocity, number of points touching the ground, rotation...). These inputs then get passed into the neural network - each of them into one neuron. This is why I wrote "One per Input" in the visual network, just to simplify it a bit. The number of inputs depends on the task and you can see the exact number of inputs neurons if you look at the stats of the best creatures. 

After the information has filtered through the network it reaches the output neurons. We have one of these per muscle. Each output value controls the amount of contraction/expansion of exactly one muscle.

Mathematically the network weights are represented by matrices so most of the calculations boil down to simple (but not very efficient) matrix multiplications. The number of nodes (neurons) in two consecutive layers determines the dimensions of the weight matrix. If you have two layers with 10 nodes each, the weight matrix between those two layers is going to have the dimensions 10 x 10, so it's going to contain 100 entries. If you have two layers with 100 nodes each (which I wouldn't recommend) that would result in a 100 x 100 matrix with 10000 entries. This can have a pretty severe performance impact relatively quickly.

The matrix weights are the things that ultimately determine the behaviour of your creature. The brain is going to "make it's decisions" based on the weights between the individual nodes. The genetic algorithm therefore tries to optimize these weights to find the best possible creature behaviour. If you have a very large network, then you're going to have lots of different weights that all need to be optimized through trial and error. The more weights you have the more likely it is that they might counteract each other and the longer it's going to take for the brains to become optimized. I've never actually run a simulation with a very complicated network for long enough to see if the creatures learn to behave significantly better than the ones with a smaller brain or whether they both converge towards the same behaviour. I'm leaving that to everybody using the simulation to maybe play around with.

I hope that I was able to clear things up a little bit :)

Keiwan