El-Genesis is a simulation aimed at the exploration of an artificial ecosystem where AI-based creatures interact with their environment and each other. This virtual world models evolutionary dynamics, genetic variation, and natural selection processes. It provides an insightful glimpse into how complex ecosystems can evolve over time under various conditions.
At the heart of the simulation are the animals, which I decided to call AI cubes. Each cube represents a creature with specific attributes that form the basis of the animals’ genetic signature. These attributes are:
- Vision
- Range
- Movement distance
- Speed
- Size
- Diet
- Offspring count
These animals are designed to navigate the simulated terrain, seek out food, avoid predators, and reproduce. Each cube has a unique identifier and can perform a variety of actions based on its programmed behaviors and interactions with the environment and other cubes, allowing for variation in survival strategies.
The way the animals move is simple. Terrain is generated based on Perlin noise with the following equation to simplify things and make the processing less taxing. The equation is then used to calculate the position on the terrain for all three dimensions, allowing the animals to move in a 3D space. The equation:
y = pnoise2(freqx, freqz) × amp
The genetic sequence system is a core component of the simulation, determining each creature’s attributes and influencing its evolutionary potential. Each creature’s genetic makeup is encoded as a hex string representing RGB color values, which translate to specific traits. The genetic sequence is constructed by mapping various attributes such as diet, vision range, movement distance, and speed to RGB values. For example:
- Herbivores might have specific ranges for red, green, and blue values indicating their genetic traits.
- Carnivores and omnivores have different mappings, reflecting their evolutionary adaptations.
The genetic sequence is crucial for simulating inheritance and mutation. When creatures reproduce, their genetic sequences are passed on to their offspring, potentially with mutations that can introduce new traits. This mechanism allows for the simulation of natural selection and genetic drift, leading to the emergence of new subspecies over time.
The breeding system is another critical aspect of the simulation, ensuring the continuity and evolution of the creature populations. Creatures reproduce by producing offspring that inherit their genetic traits, with a chance of mutation. Breeding occurs when a creature has sufficient energy and has reached a certain maturity level. The process involves:
- Evaluating the parent’s genetic traits and determining the offspring’s attributes.
- Introducing mutations with a certain probability, which can alter traits like vision range, movement distance, speed, size, and diet.
- Generating a new genetic sequence for the offspring, incorporating inherited and mutated traits.
The offspring are then introduced into the simulation, where they interact with the environment and other creatures. Over time, successful traits are propagated through the population, while less advantageous traits may disappear, mimicking the natural evolutionary process.
The simulation provides a rich dataset on how AI-based animals evolve over time in a dynamic environment. By tracking each animal’s genetic sequence, diet, behavior, and interactions, the simulation generates valuable insights into the principles of evolution and natural selection. Key findings from the simulation include:
- The emergence of distinct subspecies with specialized traits adapted to specific environmental conditions.
- The impact of genetic mutations on the survival and reproductive success of different species.
- The role of environmental factors, such as food availability and terrain, in shaping evolutionary pathways.
Leave a Reply