Category: NEAT


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.

 

 

Objective NEAT

I’ve recently put together an implementation of NEAT in Objective C, the preferred language for Apple Mac and iOS devices.  The code is running quite smoothly now, although there are many small improvements and major extensions to be added.

The code can be downloaded from GitHub here, and I’ve put a full documentation up here.

The code is free to use, modify and include within any free or commercial applications, and I hope that it pushes a few more iPhone developers to create some cool applications and games with the technology.  There will be a few more posts on how the algorithms can be used for generating content or working with games in the future.

In 2002 Ken Stanley and Risto Miikkulainen presented an evolutionary method for developing solutions using Neural Networks – NeuroEvolution of Augmenting Topologies, or NEAT. This technique, while relatively new, takes inspiration from natural evolution and has been used in a number of very interesting applications from agent control through to creation of new music and art forms.

It’s an area of research that is highly relevant to my work, and to better understand the topic I’m putting together an implementation in Objective C, the preferred language for Mac and iOS devices.  As an introduction to the topic and for other students I’ve put together a brief presentation on the subject.

Presentation on NEAT

Since then Ken has moved on to the Evolutionary Complexity Research Group (EPLEX) at the University of Central Florida and extended the research in a number of ways, the most interesting to me being in the search for novelty.  Ken has a website that shows some of the directions and algorithms, and to get an idea of where it is heading I’d recommend his Keynote speech from the 2010 SPLASH conference.