Download the python script here: ga8queens.tar.gz
How it works:
This is my first attempt on trying to understand how Genetic Algorithms work, so hopefully I can use them for music releated stuff later on. The system first generates 10 random boards and choses the best 4 one based on the fitness function(lowest number of queens threatening each other). Then they are scrambled in order, crossed over from random indexes and evaulated for fitness again. The weakest offspring dies and is replaced by a mutated duplicate of the fitter ones. The algorithm runs until a result is found.
You can find a definition of the original problem here:
http://en.wikipedia.org/wiki/8_queens_puzzle

