I have an idea: genetic algorthims


Richard Jones from Symplectic Ltd has spent much of Dev8D helping people play with an array of plastic creepy crawlies. Here he explains why.

“What we’re doing here is using genetic programming to look at the unexpected results of simple rules. It’s similar to the way that ant colonies work – nothing in the individual ant tells the ant colony how to behave.

Essentially what we’ve done is create a population of programmes, which are basically strings of characters interpreted as programmes by another piece of software.

We set the 500 programmes – or ‘ants’ – a task: to try and solve maze. How well the ants performed was measured by another programme, which ranked the ants in order from most to least successful.

We took the best ants and ‘bred’ them to create the next generation, which was then better at solving the maze. If we did the same again, the third generation would be better still.

‘Breeding’ in this context is actually fairly true to the biological version – each programme contains 16 ‘genes’, and we select 50% of each ‘parent’ to create the ‘child’. Each gene also goes through a lengthening, shortening or mutating process, so that no child is exactly 50% of both parents. It contains something unique, just as with life.

What’s really interesting is looking at the properties that arise that haven’t been programmed in – the behaviour of the colony that emerges from the behaviour of each ant. Nothing in the individual ant tells us how the whole colony works.

We can take this idea and expand it. It’s how something like Celebrity Big Brother emerges from the given rules of the universe. There is a causal connection from one to the other, but you would never expect it.

To bring it down to a more manageable level, we can use the philosophies of genetic programming to look at something like project management within an institution.

In big organisations there’s sometimes a temptation to work out every element of a project. But what we’re learning from genetic programming is that it’s better to allow these things to emerge naturally out what is needed. What is needed will emerge, what isn’t will die – it’s the basic principle of natural selection.”

Richard Jones is on Twitter at @richard-d-jones.