16
SFML projects / NEAT Visualizer
« on: December 06, 2012, 03:03:29 am »
Hello,
I have recently been experimenting around with some AI, and ended up writing an implementation of the Neuro-Evolution of Augmenting Topologies (NEAT) algorithm. This algorithm uses a genetic algorithm to evolve neural network structure and weighting simultaneously. The resulting network uses integrate-and-fire neurons and can be recurrent.
The NEAT algorithm itself does not use SFML, but I wrote a visualization system that uses another genetic algorithm to organize images of otherwise dimensionless neural networks using SFML to draw them. The demo evolves a network that mimics a XOR, and then gives you an image of it.
The NEAT implementation and the visualizer are both pretty generic, so feel free to use it in any of your own projects. The source code for the demo is included (Main.cpp).
Download link: https://sourceforge.net/projects/neatvisualizers/
Here is the paper I followed to write this algorithm: http://nn.cs.utexas.edu/downloads/papers/stanley.ec02.pdf
An example:
- Green nodes are inputs
- Black nodes are hidden
- Yellow nodes are outputs
- The red side of a connection is the side where it acts as an input to the connected node
Here is a video of this NEAT package used in a game to control the limbs of a mech for a fluid, natural looking animation:
I have recently been experimenting around with some AI, and ended up writing an implementation of the Neuro-Evolution of Augmenting Topologies (NEAT) algorithm. This algorithm uses a genetic algorithm to evolve neural network structure and weighting simultaneously. The resulting network uses integrate-and-fire neurons and can be recurrent.
The NEAT algorithm itself does not use SFML, but I wrote a visualization system that uses another genetic algorithm to organize images of otherwise dimensionless neural networks using SFML to draw them. The demo evolves a network that mimics a XOR, and then gives you an image of it.
The NEAT implementation and the visualizer are both pretty generic, so feel free to use it in any of your own projects. The source code for the demo is included (Main.cpp).
Download link: https://sourceforge.net/projects/neatvisualizers/
Here is the paper I followed to write this algorithm: http://nn.cs.utexas.edu/downloads/papers/stanley.ec02.pdf
An example:
- Green nodes are inputs
- Black nodes are hidden
- Yellow nodes are outputs
- The red side of a connection is the side where it acts as an input to the connected node
Here is a video of this NEAT package used in a game to control the limbs of a mech for a fluid, natural looking animation: