This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

trimil
trimil presents ...

2016/3/12

Genetic Simulation

Note: I am not yet finalised with this and I am still working on perfecting all the values. The documentation may be unfinished or incorrect.

This program simulates creatures in a habitat where the creatures can eat food, die, fight and reproduce. At the start, 7 creatures are created with random DNA. The color of the creature is dependent upon the DNA. These creatures can move around and contain an internal clock that tells them to turn every so often. Once the creatures are old enough, they can reproduce. If two creatures come in contact, they have a 8% chance of fighting, in which case the faster, bigger, and more well-fed one wins. If they don't fight, they will breed. A random number of eggs are chosen to be produced, and then each egg is given DNA. Each genome will have a 50% chance of being taken from either parent. The genomes also have a slight chance of mutating. The creatures involved in this will then each loose some food due to the work involved in reproduction. All creatures have 3 ways of dying: old age, starvation, and being killed in a fight. Once a creature is dead, a piece of creature meat is left on the ground for other creatures to consume. Creatures can eat 4 things: food, super food, dead creatures, and eggs. A creature will only eat an egg if it is very hungry. A popup box shows statistics, including average size, total number of mutations, and number of creatures in the world.

To use it: press Start, watch it, and click to produce a new creature. Simple.

Have fun :D

2453 views / 657 in the last 7 days

Tags: mouse simulation with-source evolution genetic evolve gene creature

This scenario is a member of: Natural Selection


open in greenfoot
Your browser is ignoring the <APPLET> tag.
HTML5 version not available | Scenario not running?
A new version of this scenario was uploaded on 2016-03-12 16:44:25 UTC Note: I am not yet finalised with this and I am still working on perfecting al the values. This program simulates creatures in a habitat where the creatures can eat food, die, fight and reporduce. At the start, 8 creatures arre created with random DNA. These creatures can move around and contain an internal clock that tells them to turn every so often. Once the creatures are old enough, they can reporduce. If two creatures come in contact, they have a 8% chance of fighting, in which case the faster and more well-fed one wins. If they don't fight, they will breed. A random number of eggs are chosen to be produced, and then each egg is given DNA. Each genome will have a 50% chance of being taken from either parent. The genomes also have a slight chance of mutating. The creatures involved in this will then each loose some food due to the work involved in reporduction. All creatures have 3 ways of dying: old age, starvation, and being killed in a fight. Once a creature is dead, a peice of creature meat is left on the ground for other creatures to consume. Creatures can eat 4 things: food, super food, dead creatures, and eggs. A creature will only eat an egg if it is very hungry. To use it: press Start, scroll using the scroll bars, and click to produce a new creature. Simple. Have fun :D
A new version of this scenario was uploaded on 2016-03-12 18:05:22 UTC Shrunk world so it can be shown in browser Changed screenshot
A new version of this scenario was uploaded on 2016-03-13 16:05:54 UTC This was a big update! +Added colors to bugs, depending on DNA +Added sizes +Added a Statistics popup *Updated the fitness function *Messed around with numbers to improve -Documentation may be invalid or incomplete Have Fun :D
A new version of this scenario was uploaded on 2016-03-14 20:26:27 UTC +Documentation is all correct! *Changed more values Enjoy :D

Want to leave a comment? You must first log in.

Who likes this?

No votes yet.