In this assignment I refined the genetic image filter breeding system I wrote for problem set four and applied it to the problem of breeding a specific kind of filter, rather than simply any filter that produced cool results.
This is a much harder problem, because one of the constraints I set myself is that I would not tinker directly with the filter DNA; I would rely on selective breeding only, and not genetic engineering. Further, I wanted to see if I could start from the initial filters I had generated from the previous assignment, rather than writing a new batch of custom filters to begin from.
The images below document a single sequence of filter breeding, with interesting results at each step of the way shown separately along with their genetic code.
The initial filters.
Source images.
The first interesting results
The second generation.
The third generation.
The fourth generation.
The fourth generation.
The last generation.
When two parents are selected and the "combine" button is pressed, the applet generates seven new image filters which are the genetic descendents of the two parent filters. These child filters are a combination of the genetic code for the parent filters with possible additional code introduced by mutation. The new filters are then applied to the selected source image and the user is shown the results. The cycle of filter selection, recombination, and display is repeated as many times as desired. In this way, the aesthetic sense of the user acts as the fitness function for the genetic evolution of the system. Once an image is created which the user likes, a larger version may be rendered in a new window and captured from the screen, as these example images were.
The filter results shown here were the results of four generations of filter evolution.