EvolutionBox 1.2.0


EvolutionBox Overview

EvolutionBox is a Unity-based simulation where I explore evolution as the key mechanism for learning. The first steps focus on creating agents that interact with their environment and evolve over time. In future updates, I’ll dive deeper into pattern recognition and self-learning.


How It Works

The simulation mimics three core principles of evolution:

  1. Variation: Each agent has unique internal traits (defined by their genes).
  2. Mutation: When agents reproduce, their offspring inherit their genes with slight changes (mutations).
  3. Natural Selection: Only agents with the most suitable traits survive and reproduce, passing their genes to the next generation.

Agent Goals:
Every agent starts with the same set of traits and two main objectives:

  • Survive (by finding food).
  • Reproduce (by mating and having offspring).

Each new generation carries mutated traits, and the agents best adapted to their environment are more likely to survive and pass on their genes.


Genetic Traits

Agents inherit the following traits:

  1. Food Priority: How important food is for survival.
  2. Mating Priority: How much the agent prioritizes reproduction.
  3. ChillOut Priority: A measure of laziness or energy-saving behavior.
  4. Survival Level: How brave the agent is (e.g., risking survival for other goals).
  5. Energy Transfer: How much energy a parent willingly gives to its offspring (think “good parenting”).

How Agents Choose Actions

Agents decide what to do based on their priorities and current needs. They calculate the “weight” of each possible action and choose the one that feels most urgent. For example:

  • Find Food: When hungry, agents look for food.
  • Find a Mate: Agents search for mature partners when ready to reproduce.
  • Chill Out: Rest and save energy when they’re not in immediate need.
  • Death: Agents die if they run out of food or grow too old.

Passing Traits to Offspring

While agents’ decisions change depending on their situation, their core priorities are set at birth. Each new offspring inherits priorities from their parents, with a mutation factor that adds variability.

  • Food, mating, and chillOut priorities are linked, so when one increases, the others may decrease.
  • Survival and energy transfer traits mutate independently.

Over time, this process creates agents better adapted to their environment.


This simulation demonstrates how simple rules of evolution can create complex behaviors

.

————————————————————————–

Results:image (1)

After 200,000 cycles of evolution under default parameters, here’s what the data shows:

  1. Mating vs. Food Priority:
    Agents gradually prioritize mating over food and transfer more energy to their offspring over time. This behavior leads to shorter lifespans, as agents are more likely to starve to death. However, they produce more offspring, passing these traits to the next generation. Essentially, the survival of their genes becomes more important than their own survival.
  2. Laziness (ChillOut Priority):
    Traits associated with laziness are not favored by evolution, as they decrease survival chances and reproductive success.
  3. Energy Transfer vs. Natural Death:
    The relationship between energy transfer and natural death is evident in the data. As energy transfer increases, more agents die of starvation. However, their offspring are better equipped to survive and reproduce, ensuring the continuation of their genetic line.
  • image

Next Steps

1. Adding Pattern Recognition:

Currently, agents have basic pre-programmed knowledge about categories like “self,” “other agents,” and “food.” For example, if an object is labeled as “food,” the agent inherently knows it can eat it.

In the next version, I aim to integrate a neural network system for each agent. This system will allow agents to:

  • Learn and classify objects in their environment without prior knowledge.
  • Identify patterns like:
    • “If the object is green, being near it increases my food level, so it must be food.”
    • “If the room is green, there’s likely food nearby. If it’s red, there’s a higher chance of encountering danger.”

Over time, agents will draw conclusions from these patterns, improving their survival skills. Some of this learned knowledge may even be passed down genetically, resulting in smarter agents overall.


2. Introducing More Interaction:

The current version focuses on instinctive behaviors like searching for food and mating. Future updates will introduce:

  • Cooperation vs. Competition:
    Agents could develop cooperative or competitive behaviors based on resource availability. For example:

    • Cooperation may be driven by oxytocin-like hormones, leading to energy-sharing behaviors and small social groups.
    • Competition could stem from testosterone-like hormones, encouraging territorial aggression and dominance.
  • Selective Mating:
    Male agents could compete for mates, while females may prioritize selecting partners with the best genetic traits. This behavior would refine the gene pool, ensuring stronger, more adaptable offspring.

Some nice references:

http://www.vice.com/read/sorry-religions-human-consciousness-is-just-a-consequence-of-evolution

http://faculty.philosophy.umd.edu/pcarruthers/Evolution-of-consciousness.htm

http://www.independent.co.uk/news/science/insects-are-conscious-claims-major-paper-that-could-show-us-how-our-own-thoughts-began-a7002151.html

http://spectrum.ieee.org/automaton/robotics/robotics-software/bizarre-soft-robots-evolve-to-run

http://www.huffingtonpost.com/the-conversation-us/evolving-our-way-to-artif_b_9183434.html

Leave a comment