Procedural Evolution
This page or section contains outdated information. This often happens when plans are changed after something has been written.
Auto-Evo is a type of Procedural Generation.
Procedural evolution, also known as automated evolution (or auto-evo for short) is one of the fundamental systems of the first half of the game. The game revolves around the concept of evolution, so creating a working concept of evolution in the game has been of utmost importance. It was clear from early on that the biosphere around the player would need to be produced at a rate that eclipses what any evolution simulators (particularly circa 2010) had done before. Many possible algorithms for accomplishing this have been proposed, although few have ever been implemented. This video breakdown describes the more recent solutions in the game as of 2023.
Early History
During the first and second forums, the idea of an auto-evo concept barely cropped up in conversation. On the Canadaforums, the term "auto-evo" is first used in the summer of 2010. Developers generally assumed that the game would contain a chaotic enough environment that Darwinian evolution would appear naturally. The first concept was that every organism would be unique in its mutations, and those that survived would pass them on, just as in the real world. This was discovered to be too complex.
Alright, Bashinerox and I had a chat discussion about evolution, and we've come to a conclusion: evolution without player interaction simply won't work. There are way too many organisms and different mutations for the computer to keep track of. Basically, Bash posited that he best way to keep a realistic degree of evolution in the game and keep the player interested in playing was to have the player control the evolution of their chosen organism.
Here's a few of the problems we outlined with purely computer driven evolution.
1- overcomplex- to have the computer completely monitor a chaotic environment is a little bit of a tall order. The processor won't be able to handle it.
2-ugly organisms- since the computer cannot completely accurately simulate the environment, natural selection will not work as well, resulting in organisms that just aren't interesting or aesthetically pleasing. This won't be fun for players.
3-rampant evolution- another form of the "ugly organisms" dilemma, if a player cannot control their species's evolution, they cannot possibly be expected to reach ingame goals such as sentience.
~solutions~
1-direct edit- When you want to change the specific organism you control, you can edit it slightly before it is born, much like in spore, but with a limited amount of complexity to use up.
2-guided mutations- coders decide what actions could lead to what mutations, a type of lamarckian evolution that ensures that if a player does a lot of swimming, they will get better at swimming.
No definite solution to these problems was discovered for over a year, although they were discussed almost constantly, and in a myriad number of development threads. Picking out the small good pieces of concept was made difficult by the sheer number of places it was being discussed at once, and the number of repeated ideas form new development team members.
"Chess-based" algorithm
As of July 2011, there was one completely agreed on concept of procedural evolution, known to the development team as auto-evo, which has become official. The path towards a workable auto-evo concept has been rocky, and was the second last major conceptual hurdle to be solved, leaving only the Tech Editor left unsolved. The final concept for auto-evo was achieved by the community in the "NPC auto-evo" thread. The third post on the page explains most of what happens in auto-evo, but it will be condensed and put into an easier-to read form here. There are a few minor issues with this system, mostly due to small gameplay concepts such as disasters and environmentally transient organisms which it has not yet fully taken into account.
Games
Before this final solution was posted, there had been other ideas for evolution set up like games, which should not surprise anyone, because evolution is closely tied to game theory. The final auto-evo concept uses the metaphor of chess- it is turn-based, has different numbers of "pieces" based on their "importance", and supports diversity among species. It is dependent upon the biomes concept, as biomes determine the "game board" in which evolution takes place.
Explanation
In biome-centered evolution, each biome is a self-contained unit, containing a community of species. The community evolves together, based on turns.
Evolution
Many species can evolve at one time. The mutation of various species takes place periodically, and is referred to as a "generation".
Generations
Each generation contains these stages:
- Census
- Retrospective
- Modification of Odds
- Selection
- Mutation
Census- the game determines how many organisms are in the biome, and how many organisms of each species there are
Retrospective- the game determines if there was a mutation in the last generation and if it could affect any species. If the game finds that it did effect a species, it will select those species and move to step 3.
Modification of Odds- the affected species' population counts are multiplied by a factor that depends on their trophic level. Higher trophic levels have less organisms in them, so they are multiplied by larger factor than lower trophic levels so that they stand a chance of evolving. Once the new population counts are created, a new total population is taken.
Selection- The game puts all of the species on a virtual spinner, with a species' chances of evolving equal to its population over the total population of the biome. Then it spins to determine which orgs get to mutate.
Mutation- Species are mutated. If it was one of the species affected by the previous mutation, this is called a "reactionary mutation". In this model, there is no definite chance of evolving, a species can only have lower or higher chances
Generation 1
The computer randomly selects a species to evolve, skipping steps 2 and 3. Whichever species evolves gets a small randomly assigned mutation, which could be anything from a leveled up organ to longer legs to a new set of eyes. Once the first generation of the biome is complete, things get a bit more complicated.
Generation 2 and above
In the second generation, the odds of certain orgs evolving is changed. These are orgs connected to the first one on the food web. The types of connection can be:
- consumer of org
- consumed by org
- competing with org for a resource (both consuming the same third org)
- competing for a niche
The type of mutation in the first generation is important as well. The game will have to look at the new statistics for the mutated creature. These include but are not limited to:
- size
- mass
- movement speed
- types of movement
- toxicity
- toxic resistance
- stamina
- protection from armor
- specialized defensive organs
- specialized offensive organs
- camouflage
Many of these will contain hard-coded possible mutations. For instance, if a prey item becomes toxic, a predator can then mutate to resist that poison. Hard-coded mutation possibilities will have their own odds of occurring once an org is selected to be mutated. If the previously mutated organism from generation one has not changed any of its statistics, no other orgs will get increased chances of evolving, and the system works just like Generation 1.
Once an org is selected to be mutated, it can either mutate the hard-coded way or mutate randomly. It will have slightly better odds of performing a hard-coded mutation, but they are nowhere near definite.
Once the org for Generation 2 is mutated, it is put into the world. when the timer is up, the next generation can start, and will go through the same process as generation 2.
Notes
-In some generations, possibly 1 in 50 (or something similar) the computer can choose randomly to not have any org mutate, effectively returning to generation 1.
-With any mutation, there is a small chance of the species splitting in two instead of evolving.
-The evolution simulation is based off of the biomes concept. Interactions are determined through the biome's food web and the orgs filling its niches
-An organism can evolve in such a way that it no longer fits its niche and/or meets the requirements for another niche.
Early Implementations
The earliest release notes to mention auto-evo is for release 0.4.0, although 0.3.3 boasts "Auto Evo's primitive cousin: Random Evo". A distinct and easy to examine folder for auto-evo, however, would not appear until version 0.4.2. As far as I can tell, this implementation was already an early version of population simulation.
Population Simulation
Prior to the implementation of the food source system in 2021, auto-evo worked by single-category population simulation. All species, including potential new mutants, would be given points for every useful adaptation, with the highest scoring variations selected over lower scoring ones. Species were not differentiated; requirements for fitness were identical for all species in these versions.
Parellel to this system were external effects. An external effect would be generated from events in game, such as an individual reproducing or dieing, and applies a population modifier to the species independent of the calculations from the population simulation.
Current Implementations
Food Source Simulation
Theoretical/Future Implementations
Nick's Auto-evo
https://forum.revolutionarygamesstudio.com/t/nicks-auto-evo-algorithm-episode-1/629
Sentiant's Auto-evo
https://community.revolutionarygamesstudio.com/t/sentiants-auto-evo-algorithm/3867