Emojis
Information
This is a yet another simulation of the evolution by natural selection. It involves a world with rules (explained here), and actors (Emojis and Food) evolving together.
Be ware! Running this simulation can become CPU heavy in some cases, make sure you do not need to spare your battery before running it.
1. Shortcuts
To ease controls, shortcuts have been added to the simulation:
space: Pause / resume the simulation1: Toggle Emoji's energy display2: Toggle Emoji's velocity display3: Toggle Emoji's sight4: Toggle Emoji's target
In addition, user can click on the map to select a Emoji or a Food and get live details.
2. World
Measurement units:
- The World is made of a rectangle of 1900 by 800 length unit. For simplicity, it corresponds to pixel on your screen.
- Time is represented by the age of the world (visible in the top left corner). Each unit of time is a frame.
Processing
On each unit of time is calculated the state of the next one. Since the unit of time is small enough, everything looks like smooth movements.
On death, entities (food or Emojis) are removed from the world.
Initialization
The first core principle of natural selection simulation is the population Initialization. Here population is randomly created at start (position and attributes) and let to live.
3. Food
Food appear randomly in the world according to the creation rate setting. At each unit of time (i.e. frame) there is this rate of chance that a food pops somewhere.
Food always have a mass of 2 units of mass.
4. Emoji
Actions
Emoji have a limited set of possible actions: they can wander, move towards or away from a target, stop, search for something, eat, sleep, and hit another moji.
Behaviors
Behavior tell how moji does act, depending on their state and what they see around.
DNA
Each moji has its own DNA, describing how and when they have the previous mentioned behaviors. These parameters are actually those who are going to be selected through natural selection: if a Emoji is well adapted to the world (i.e. has a "good" DNA), he will most propably survive. On the contrary, if he has a "bad" DNA, he will die. This is the second principle of evolution: Selection.
Reproduction
Once the selection is made, and the Emojis validates conditions (i.e. have a sufficient mass to reproduce), Emojis can reproduce themself (just like cells would do in our body), and duplicate their DNA. It is the third evolution principle: Reproduction.
Mutation
On reproduction, each DNA gene is allowed to mutate. There is a lot of possibility of applying mutation, but each gene will be updated by a small random amount (depending on the settings). It is the fourths and last principle of natural seleciton: Mutation.