"Ocean Ecosystem" demonstrates natural and sexual selection with genetic algorithms. Fish DNA codes for color, agility, and whether or not each fish has an impressive display of green stars on their back (a secondary sexual characteristic).
Paler fish are genetically more anemic/unhealthy and lack the speed and agility of darker fish. Competing for food and avoiding predators is much more difficult for these fish and natural selection tends to weed them out in favor of the more robust darker colored fish.
Fish with green stars on their backs have a quadrupled chance of reproducing at any given moment compared to fish that lack this characteristic. This is meant to simulate 'peacocking' or the development of features that serve no other purpose than to attract mates.
The user can interact with the simulation in a few ways:
- increasing/decreasing the amount of prey, which increases/decreases the environmental carrying capacity of fish
- adjusting the DNA mutation rate of children fish, anywhere from an exact clone of a fish's parent's DNA to completely random DNA.
- increasing/decreasing the amount of predators
- clicking or dragging the mouse to manually add more fish to the ecosystem
- instantaneously exterminating the population of fish with the push of a button