Blubbs
This processing applet is my first attempt to create a Cellular Automota. The CA, called Blubbs, are each represented by an every growing and fading colored ellipse. A Blubb contains
'genetic material', which is stored as a color value. A Blubb's genetic color value is used as the its display color, and
its inverse as its outline. As the Blubb ages, it gets larger and moves faster (a random walk) until it encounters
another Blubb. When two Blubbs encounter, they examine each other's genetic material to find if the other would be
a suitable mate. If so, they move towards each other. Otherwise, they repel. Blubbs' attractivness to one another
is based on an overall difference in color values. The formula is as follows:
Attractivness(Blubb a, Blubb b) = | a's red - b's red | + | a's green - b's green | + | a's blue - b's blue |
The current threshold is Attractivness > 200 attracts. If two Blubbs' centers collide, they mate by producing four offspring
containing random compositions of the parents' genes. i.e. if a pure red Blubb (with genetics of 255, 0, 0) encounters a pure green Blubb (0, 255, 0), each offspring has a 50% chance of having either 255 or 0 for it's red value, 50% of having 0 or 255 for its green value, and because both parents have 0 for their blue value, a 100% chance of having 0 for its blue value. The two parents die after mating and are removed from the simulation. By 'selective breeding', genetic diversity is
rewarded by multiplicity of offspring with diverse color values, and genetic similarity is discouraged. Also, for each of the offsprings' color values, there is a .5% chance that it will mutate to a random color. This may or may not benifit the organism, depending on the
potential mates it encounters, but allows for randomness in the system. There are also a
limited number of Blubb souls, and if two Blubb's mate while there are no souls left to give, the offspring are not
introduced to the system, preventing overpopulation. The world that the Blubb's live in is an initial gradient
containing all shades of gray (and therefor the potential for 2^24 or 16 million different Blubbs). Initially, 25 Blubbs are
spawned by incarnating 25 random pixels into Blubb's with the pixel color as its genetic material and initial location of the pixel.
If all Blubb's die, the simulation is reset.
Back to the work
Source code: blubbs
Built with Processing