Skip to content

A spatial, agent-based evolutionary simulation where predators, scavengers, and niches emerge from noise, energy, and constraint — not rules.

Notifications You must be signed in to change notification settings

mmbrooks114/EvoSim

Repository files navigation

EvoSim

EvoSim is a spatial, agent-based evolutionary simulation designed to study how behavior, strategy, and ecological structure emerge from probabilistic interaction and environmental constraint — without predefined species, roles, objectives, or fitness functions.

The system is explicitly non-teleological.
Organisms do not optimize toward goals, solve tasks by design, or maximize abstract rewards.
Instead, behaviors stabilize through relative ease of success under local environmental pressure.

EvoSim treats evolution as habit formation under constraint, not convergence toward optimality.

This repository contains EvoSim v1, a locked reference system.
All future development proceeds via additive phases without retroactive modification.


Core Design Principles

  • No predefined roles or species
    • No predator/prey flags
    • No trophic levels
    • No diet constraints
  • No global fitness function
    • Survival and reproduction are indirect outcomes of energy flow
  • Probabilistic decision-making
    • Actions are biased, never forced
    • Risk is encoded statistically, not deterministically
  • Local interaction only
    • No global knowledge
    • No planning or foresight
  • Spatial and environmental grounding
    • Organisms exist in a 3D grid (ground / water / air)
  • Inference-first architecture
    • Behaviors are intended to be measured, not prescribed

EvoSim v1 — Locked Feature Set

Spatial World

  • Discrete 2D grid with Z-axis (ground / water / air)
  • Per-tile attributes:
    • ground height
    • water depth
    • terrain roughness (noise amplification)
  • Strict occupancy rule:
    • one organism per (x, y, z) cell

Organisms

Each organism maintains:

  • Position (x, y, z)
  • Energy with basal metabolic drain
  • Age and lifespan
  • Generic evolvable feature vector
  • Action success EMA (experience-based bias)
  • Medium time budgets:
    • air
    • water
    • ground
  • Disease state and resistance
  • Optional parasite state

No organism has a fixed identity, role, or purpose.


Energy & Medium Constraints (Phase 4)

  • Being airborne or submerged consumes a finite budget
  • Budgets regenerate when not in use
  • Exhaustion causes:
    • increased energy drain
    • reduced action success
    • increased noise emission

Noise Ecology (Phase 4)

  • Every action emits noise
  • Noise is modulated by:
    • action type
    • terrain roughness
    • medium (air / water / ground)
    • exhaustion
    • stealth and hiding
  • Noise influences:
    • encounter probability
    • predation likelihood
    • avoidance behavior
    • spatial clustering

Noise is not a penalty — it is a structuring environmental signal.


Stealth & Hiding

  • Probabilistic hiding behavior
  • Stealth reduces noise and detectability
  • Stealth decays naturally over time

Reproduction

  • Asexual and sexual reproduction
  • Age-based reproductive windows
  • Energy investment required
  • Population cap enforced
  • Spatially constrained offspring placement
  • Feature inheritance via blending + stochastic drift

Predation (Phase 5)

  • Predation is an action, not a role
  • Success depends on:
    • proximity
    • relative noise exposure
    • stealth
    • exhaustion
    • feature mismatch (attack vs defense)
  • No guaranteed kills
  • Energy transfer is probabilistic

Carcasses & Scavenging (Phase 6)

  • Death produces carcasses (matter persistence)
  • Carcasses:
    • store decaying energy
    • emit ambient noise
  • Scavenging is opportunistic
  • Feedback loop:
    • predation → carcasses → scavenging → noise → predation

Integrated Phase Extensions

Phase 7 — Disease & Parasitism (Locked)

  • Multiple transmission pathways:
    • environment
    • carcasses
    • predation
    • vertical inheritance
    • parasite ↔ host
  • Disease effects are:
    • stochastic
    • non-lethal by default
    • expressed as metabolic burden and action suppression
  • No immunity flags
    • only statistical resistance and recovery tendencies

Phase 8 — Mutualism & Behavioral Bias (Locked)

  • Voluntary, probabilistic mutualistic coordination
  • Energy pooling with:
    • reduced individual cost
    • shared reward
  • Participation governed by:
    • shyness
    • aggression
    • parasite efficiency
  • Mutualism amplifies environmental noise
  • Disease probabilistically inhibits cooperation
  • Noise-aware action policy:
    • organisms bias toward lower-risk behaviors under high noise

Observed dynamics:

  • Initial population pruning
  • Oscillatory stabilization
  • Adaptive efficiency improvement
  • Persistent diversity without static equilibria

Phase 9 — Seasons, Weather & Environmental Stress (Locked)

  • Discrete seasons with temporal progression
  • Weather fields with spatial extent
  • Weather effects include:
    • energy drain multipliers
    • noise amplification
    • carcass decay modulation
    • forced displacement
  • Weather can:
    • injure organisms
    • directly cause death
    • restructure ecological niches
  • All effects are:
    • probabilistic
    • locally applied
    • fully logged

Phase 9 introduces exogenous pressure without introducing objectives or scripted crises.


Phase 10 — Lineage, Phylogeny & Post-Hoc Structure (Locked)

  • Event-derived parent–child lineage graphs
  • Generation inference via BFS
  • Founder-based lineage roots
  • Lineage summaries:
    • size
    • depth
    • lifespan
    • extinction status
  • Visualization support:
    • lineage trees
    • cluster-colored descendants
    • extinct vs surviving sublineages
  • Post-hoc clustering enables:
    • inferred “species”
    • trait drift analysis
    • evolutionary pathway reconstruction

Phase 10 completes EvoSim v1 as an inference-ready evolutionary system.


Output & Instrumentation

EvoSim is visualization-agnostic.

Outputs include:

  • World snapshots (JSON)
  • Organism state logs
  • Carcass state
  • Irreversible event logs
  • Per-tick aggregate metrics:
    • population
    • energy
    • noise statistics
    • disease prevalence
    • behavioral distributions
    • cooperation diagnostics
    • weather impact metrics

All outputs are structured for downstream analysis.


EvoSim v1 Status

Locked.

EvoSim v1 is a stable reference system with:

  • Enforced architectural invariants
  • Fully instrumented logging
  • No goal structures
  • No teleological assumptions
  • Clear phase boundaries (1–10)

All future development proceeds via versioned, additive extensions.


Philosophy

EvoSim models evolution not as optimization,
but as pattern stabilization under constraint.

Traits persist not because alternatives are impossible —
but because they are less costly, less noisy, or more locally successful.


License

MIT License


Author

Developed by Michael Middlebrooks
Conceptual design, system architecture, and implementation.

About

A spatial, agent-based evolutionary simulation where predators, scavengers, and niches emerge from noise, energy, and constraint — not rules.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages