Stung Eye
Stung Eye

GA Images


View Source Code

***

I've long been fascinated with the idea of Genetic Programming.

From the above link: [Genetic Algorithms] are basically algorithms based on natural biological evolution. [...] A GA functions by generating a large set of possible solutions to a given problem. It then evaluates each of those solutions, and decides on a "fitness level" (you may recall the phrase: "survival of the fittest") for each solution set. These solutions then breed new solutions. The parent solutions that were more "fit" are more likely to reproduce, while those that were less "fit" are more unlikely to do so. In essence, solutions are evolved over time. This way you evolve your search space scope to a point where you can find the solution. Genetic algorithms can be incredibly efficient if programmed correctly.

When I discovered this article on a Genetic Algorithm that "evolves" a text string, I knew I would have to port the code to Processing.

The above applet uses a Genetic Algorithm to evolve a 625 pixel image from a gene pool of 1024 randomly seeded image cells. Click the image to reset the gene pool.

Related: GA Words and GA Image (Large)

Comment

Sketched using Processing; Java For The Desktop is required to view all Processing sketches.

Creative Commons License Valid CSS!