## Viva La Evolution!

Score:
rated 2.92 / 5 stars
Views:
5,625 Views
Genre:
Simulation - Other
Tags:
evolutionsciencesimulator

## Credits & Info

Dec 12, 2008 | 9:48 PM EST

#### If you liked this, check these out!

I was originally inspired to create this program by cdk007 on YouTube, who created a similar program to prove a point about evolution. (http://www.youtube.com/w atch?v=SeTssvexa9s) However, he used MatLab to create his program, and his program was only in black and white. Therefore, I decided to rebuild his program from scratch in Flash.

This is the result. Basically:

25% of the creatures who stand out the most against the background are eaten by predators.
25% of the creatures are unlucky and die.
The remaining population mates randomly.
Each offspring inherits "traits" (a.k.a. the red, green, and blue components of their color codes) from either parent, along with a 50% chance of a mutation. (You can set the mutation level.)

When you first open the program, it's running at full speed, with automatically-changing background color (when the average creature color gets close to the background, it changes automatically to a random color), and in Generation 0 all of the creatures are assigned random colors. As you can see, the diversity in color variation is quickly contained, and the average color distance (in the lower-left corner) drops quickly.

Color distance from the background is calculated based on an extension of the Pythagorean theorem. (See a great explanation here: http://betterexplained.co m/articles/measure-any-di stance-with-the-pythagore an-theorem/)

---------------

What does this mean? This program takes 64 creatures and applies the principles of evolution to them. The result is that the creatures better fit to hide against the background are the ones that get to pass on their good hiding traits. After a few generations, the creatures are much harder to spot.

It's evolution.

## Reviews

#### outbreaktion

##### Rated 0 / 5 stars2010-07-25 22:18:16

sucks

i hate it, its pointless really

#### ProdigalFlashMaster

##### Rated 5 / 5 stars2009-11-28 17:19:03

proof!

thats a pretty nice simulation of natural selection at work! its proof of evolution! :D also, your a good coder, nice effort!

#### ShortMonkey

##### Rated 1.5 / 5 stars2008-12-13 05:29:13

Heh

Pretty pointless really and with crappy graphics... if you added pictures of the creatures or helped us understand what was going on, it would have been a lot better.

scikidus responds:

I can't give you "pictures" of the creatures because the creatures are being dynamically created, and they don't actually exist, they're just rectangles with a certain color.

I wasn't concerned with graphics, because the only graphics that actually matter are those of the background and of the creatures. Plus, any further graphics would have slowed the engine, something which I wanted to prevent.

If it makes you happy, I could potentailly change out the rectanges for some other shape, like a butterfly.

#### thelittleemo

##### Rated 5 / 5 stars2008-12-12 22:05:43

hmm..

pretty nice dude...although i didnt really expect this it was a nice little experiment show