Neural Network

How Do Neural Networks and Neuroevolution Work?

Super Mario Neural Network

I was researching some topics around neural networks for the blog and stumbled upon this interesting and informative video by Seth Bling. Seth created a computer program called ‘MarI/O’, which helped a machine learning brain finish a level in the Super Nintendo computer game – ‘Super Mario World’.

The program itself is a made up of lots of neural networks and genetic algorithms that helped Mario on his quest to save Princess Toadstool – yes I’m a Mario fanboy as well.

During the initial first training simulations of the program, the brain appears to be severely limited in what it can do – which at the start is nothing, it just stands there not moving. If Mario stands in the same place too long, it simply terminates the simulation and tries the next neural network. Due to the random nature of the algorithms, occasionally it will press the right button which causes Mario to move along the platform to the right.

The neural networks use green lines (positive connection), red lines (negative connection) and neurons to help Mario move across the platform. At the start of the training simulation, there are only a tiny number of these connections. So the question is, how does the machine learning brain build complex neural networks to allow it to complete the level?

Well, the answer lies in ‘Neuroevolution‘. Neuroevolution, or neuro-evolution, is a form of artificial intelligence that uses evolutionary algorithms to generate artificial neural networks parameters, topology, and rules.

Seth’s machine learning brain uses these genetic or evolutionary algorithms to learn how to finish the game, which is similar to how biological evolution works in nature.

When Mario runs to the right by pressing the right button, his fitness level goes up. This not only measures how far he moved but also the speed at which he got there. Only the neural networks with the high fitness levels get selected to be bred, thus creating the next generation. Through this selective breeding program, the machine learning brain took only 34 generations to actually finish the game.

Despite getting stuck on a few occasions, through the genetic breeding of the networks the program was always able to find a way around each problem. However, I’ll let Seth explain the specifics, as he does a much better job than me. Check out the video below:

We’d love to hear your thoughts, so please drop us a line in the comments below.

Be the First to comment.

Leave a Comment

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