Motor AI 01 draft (last updated: 6 May 2005)

 

This simulation gets the computer to learn how to balance a stick using a simple feedforward neural network.  The learning is done with genetic algorithms.

The programme has two modes of operation - recall (default) and generation.  Recall displays each previously saved generation for 10 seconds of simulation time.  Generation generates a new set through GA trial and error.

When generating, the fitness function is specified to favour the stick being upright (its top being at maximum height) and central to the system.  Because each trial takes time to simulate (as it is done with the physics package) the length of simulation starts small and increases for every generation.  This thinking behind this is to allow sorting of radically different solutions in the beginning over a short period of time, and then extend the testing time as solutions become ever more refined.

Each simulation has 3 tests. Once starting in the middle, one half way to the left, one half way to the right.

This programme uses Newton for the physics and Irrlicht for the visualisation

Download programme (create a folder and unzip into that)