Re:What problems have you solved using genetic algorithms/ge...
by cubicle67 on Saturday September 11, 2010 @08:38PM
(#1682730)
Solving magic squares
I wrote a solver (conventional style) in Ruby that could solve squares in about 30 minutes, and I was pretty pleased with that, so I challenged a friend of mine to beat me.
He came back an hour later claiming he had code that could solve it in under 10s. He'd written a genetic algorithm that solved squares on my machine in about 6s and in only about 30 lines of Java (less than my Ruby). I was pretty humbled
I wrote a solver (conventional style) in Ruby that could solve squares in about 30 minutes, and I was pretty pleased with that, so I challenged a friend of mine to beat me.
He came back an hour later claiming he had code that could solve it in under 10s. He'd written a genetic algorithm that solved squares on my machine in about 6s and in only about 30 lines of Java (less than my Ruby). I was pretty humbled