Archive for January, 2012

Neuro Evolving Robot Operatives

One of the interesting applications of the NEAT algorithm is to generate artificial brains via the use of Artificial Neural Networks.  These are approximations to the way that our brains are wired up, consisting of a bunch of neurons that have firing thresholds, and synapses that link the neurons together.  When you add in some sensor neurons that feed the network with location, sight, sound etc, the artificial brain can, by modification and distortion of the signals across the network, fire signals to effector neurons, which can control an agents behavior, movement, speech etc.

Of course if you randomly wired together a set of neurons and synapses, real or artificial, the ‘brain’ created would most likely do nothing or work itself into a crash state.  However if you start with a very small amount of neurons and links, then slowly add more under a training regime, you can get some startlingly intelligent behavior – in precisely the same way as nature develops embryos to thinking creatures.

Another correlation between real world and artificial embryo development is that the artificial neural networks are stored as a DNA string, which is unpacked to create the network.  The most interesting behavior is shown when individuals with successful brains reproduce with other fit individuals.  In this manner it is possible to create networks that have the best of both parents, and over enough generations it’s possible to create networks displaying highly complex behavior.

The video game N.E.R.O. (Neuro Evolving Robot Operatives) has been created to show how these neural networks can create individual and team behaviors in a virtual world.

The general idea is to take untrained robots (which will make generally random actions) and reward individuals which display promising behavior.  These then are more likely to reproduce in the next generation, and over time the promising behavior gives way to the operatives taking actions which could easily be mistaken for human play.

The NERO engine has been open sourced, so it’s possible for anyone to develop their own AI’s, or present new challenges for existing agents.

This technique has not, to my knowledge, been used in any commercial games to date, although given that it allows characters to develop over time could be used to create games that are able to endlessly adapt to the players style, presenting new challenges within every game.


ObjectiveNEAT Posted

As a learning exercise I recently wrote an implementation of NEAT (Neuro Evolution of Augmenting Topologies) in Objective C, the language of choice for iOS devices.

The godfather of NEAT and many derived AI techniques, Ken Stanley, has picked this up and published the project to the NEAT AI groups here and here.

It’s always nice for something you’ve created to be passed on to a wider group, my hope is that other developers may build upon the code and create some iPhone or iPad games or apps that make use of the AI technique to develop around the user, presenting new challenges or being able to interpret a users intentions through learning over time (like SIRI).

The original source can be found here, with documentation here.