Simple Evolution

Single cell organisms battle for surival, using their randomly generated qualities to proove whose best!

Related Tags...

JavaProbability & StatsSimulation
4

Screenshot Gallery...

Creatures

Creatures

The creatures have a simple goal: Gain enough SIZE to be able to split into two.

Moving takes up ENERGY
Creatures must move to the FOOD to gain SIZE & regain ENERGY
Larger creatures require less ENERGY to move the same distance as a smaller creature
Larger creatures require more FOOD than smaller creatures to SPLIT (Thus why they are larger)


Creatures will be spawned with some combination of the following parameters

TRAIT

RANGE

Splitting factor[18, 50]
Speed[0.5, 2]
Size[2, 100]
Energy[0, 1000]

Doubling // Splitting

When a creature reaches its Splitting-Factor Size, it will divide itself into the next generation.
The first draft will maintain the exact genetics of the creatures predecessor
Future drafts will allow for minor mutations

Food Sources

Food Type

Spawn Chance

Size Given

Energy Given

Survival(s_chance %)+1 Size1/4 refill energy
Beneficial(b_chance %)+2 Size1/2 refill energy
Nutrutious(n_chance %)+4 SizeFull refill energy

Energy Drain & Movement Mapping

Energy Drain & Movement Mapping

Each creature is hunting one specific food object.
This object will appear far away to small creatures, and close to large creatures.
This is implemented by creating a Relative Energy Unit to each creature.



Relative Energy Unit

Each creature is assigned their own energy-unit size.

For each creature, the distance between them and the food is converted into "how much energy is needed"
In this situation, energy is a relative percentage drained (larger creatures SHOULD use more to move and have to move less, however that is not taken into account in this version of the program)
One energy unit is the equivalent to the length of the diagonal of a triangle with...

Length ->CREATURE SIZE
Height ->CREATURE SIZE

Therefore, the length of one Energy Unit is the equivalent to SQRT( SIZE^2 + SIZE^2 )

The Enegery unit is the hypotenuse of a creatures hitbox

Creating a hitbox around the creature (a square with length of creature size and a height of creature size),
A diagonal is calculated between the bottom-left & top right corners.
The length of this diagonal is the equivilent of one energy unit.

All distaces between a creature and a food object are converted into these units, and each step drains the appropriate energy from the creature.
If the creature runs out of energy without reaching a food obejct, it will die.

An example of two creatures racing for the same piece of food.

Conclusions

Interestingly, finding the relation between these variables has been odd. Below is a test design to find a connection between the variables.
The intention of this is to find some combination of starting creatures-starting food, energy formula, etc which creates a useful program.
(If everytime the program runs, all animals survive, then the program is essentially null/void)

**DATA IN PROGRESS OF COLLECTION**