I am writing a program that uses a genetic algorithm to 'evolve' a randomly generated image in to a template image that I provide. Here is what it looks like:
Every generation it creates (by default) 150 copies with random mutations (ellipse color/shape), and then compares them all to the template picture to see which is most similar, and that one moves on to the next generation. The current method I use to compare them is a pixel by pixel Euclidean Distance measurement. This takes about 8-9 seconds to evaluate the 150 children. Which might not seem like much, but to get a decently evolved image it can take at least 40,000 generations (about 4 days at given speed). This is too slow to test the results of different mutation rate / children / etc combinations.
What faster methods of comparing the two images are there? Or what other ideas do you have to make this more efficient?
My only thought so far is to reduce the dimensions of the images but that takes the fun out of creating a high quality replica ;)







