Leave a comment

Neural Evolution – Building a natural selection process with AI

Created by Fabio Carbone, Neural Evolution is an experiment created in Processing that trains a neural network through a natural selection process (genetic algorithm) in a scenario where the only survival is food. As it progresses through generations, this world’s inhabitants get increasingly good at getting it, but unfortunately fail short when they realise that their world is limited and there is nothing more for them to learn.

big1The world Fabio created is simple and composed of two main elements: the Bloop and Food. The Bloop (the white balls) walk and eat the food (red dots). The Bloop have an initial health of 1000 points. Every time they eat, the health is increased by 100. If it goes to zero Bloop dies. The Bloop are moved by a neural network shown in the image below. The inputs of the neural network are the distance along the X axis and the distance on the Y axis from the nearest food. While the outputs are the movement commands up, down, right, left. All the weights of the network form the DNA of the individual Bloop, which is his way of interacting with the world. In addition, the bloop’s DNA has a further variable that indicates the magnitude of the Bloop and therefore its speed of movement.

Fabio points out that at first all Bloop are instantiated at random and many do not know how to move or do incorrectly. Quickly they learn and understand they have a small chance to reproduce if they do not eat therefore they get better at it. Reproduction of a Bloop is with the  same DNA but with some mutation of any gene or weight are the work of the neural network.

Project Page | Code on GitHub

neural evolution_02

Leave a Reply

Your email address will not be published. Required fields are marked *