
Here's my idea: an interactive environment/game for breeding flowers using genetic algorithms. "Genetic algorithm" is liberally interpreted here: the flowers' genotype is image data (32x32 pixels), and the genotype is expressed by displaying that data to the screen. Crossovers and mutations are performed as image filtering and manipulation. The flowers exist in on a virtual "island" whose properties determine how crossovers and mutations are performed.
This applet demonstrates how the flowers look, breed, and mutate (press 0-9 to increase the likelihood of the corresponding flower to produce offspring, then press the spacebar to create the next generation of flowers). Here's a mockup of what the virtual island looks like (click and drag to move around or press 'n' to generate new terrain; there aren't any flowers there yet).
Here's the basic ruleset:
- Flowers must be watered, or else they'll die. (Their amount of thirst will be reflected by a slowdown in swaying and a droopy demeanor.)
- There are a number of different types of water; the type of water determines what mutations the flower's genotype will undergo when it breeds with another flower. Possible mutations include:
- hue/saturation/brightness
- transparency (alpha channel)
- vertical and horizontal mirroring
- skew/stretch/scale/rotation
- The probability that a particular flower will breed with another flower is determined by the proximity of the two flowers in question. The resulting child flower will appear next to one of the progenitor flowers (perhaps after a growth period?).
- The island is composed of several types of terrain. The terrain type determines the crossover method for flowers in that terrain. Possible crossover methods include:
- "spots" of one flower overlaid on top of the other
- even blending
- stripes
- iteration over each pixel
- Users can transplant flowers (in order to move them closer to desired breeding partners, or to a new terrain), or throw them out (in order to remove them from the gene pool).
The eventual goal I have in mind is to create an Animal Crossing-esque game in which points are awarded for growing flowers with particular characteristics; players could use these points to unlock new kinds of mutations or terrain, or to purchase custom flowers (e.g., a flower with Alan Alda's face on it). Each player would have his own garden, but could trade flower "seeds" online with friends. (Maybe the terrain types are not evenly distributed between players, so you have to send your seeds to a friend in order to get crossover types normally unavailable to you! A lot of possibilities here.)
My final project will be a "proof of concept" for this game/environment. I want to implement the basic ruleset in the list above in order to see if I can make it intuitive and interesting.