Pretty Pictures from Genetic Algorithms

About this project

Select the pictures to breed together and click "Next generation". Double-click on a picture to see a larger version. You can load the function of an existing picture in the "Details" section below.


About this project: This project is a reimplementation of my final COMP 314 project, pretty pictures (via genetic algorithms). (originally by Dan Wallach) Each picture is produced from a tree of functions (listed below), acting on x and y coordinates in [-1,1], and mapping the results to RGB values 0-255. Breeding two pictures together involves taking a random subtree from one and splicing it in a random place in the other. The backend script that draws the pictures is written in C++, and the function tree is passed in a modified version of JSON (using single quotes instead of double quotes, so they don't have to be URL encoded).

Try these pretty pictures!

Source files:

Old source files:

I was also working on a version in Haskell; here are the source files:

Here's the list of functions. Ones with a * can take their values outside [-1,1], and so must be followed by "-clip" or "-wrap" (describing how they return their values to [-1,1]).