Skip to content
This repository was archived by the owner on Apr 12, 2026. It is now read-only.

ConnAALL/MinimalRingSpeciation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ring Speciation in a Minimal Agent-Based Model

Developed by the Autonomous Agent Learning Lab (AALL) at Connecticut College.

Building

Requires C++20 and CMake 3.16+. GUI builds also require SDL2; to build without it, configure with -DEVOSIM_ENABLE_GUI=OFF.

mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)

Usage

./build/evosim configs/default.toml

CLI Overrides

Any config parameter can be overridden on the command line:

./build/evosim configs/default.toml \
    --seed 15 \
    --total-ticks 100000 \
    --inner-radius 0 \
    --phenotype-traits 0 \
    --output-dir results/control_flat \
    -q

Output

Each run produces:

  • summary.json — Configuration, metrics, transplant test results
  • stats.csv — Per-tick population statistics
  • sector_matrix.csv — N×N reproduction matrix (ring mode)
  • Console progress (suppressed with -q)

Configuration

All parameters can be modified in the configuration file. Key parameters:

Parameter Default Description
grid.width / grid.height 300 / 300 Grid dimensions
grid.topology "ring" Topology mode: "rectangular" or "ring"
ring.inner_radius 60 Inner impassable radius for ring topology
ring.num_sectors 32 Number of angular sectors used for markers and ring analysis
food.per_tick 40500 Food generated each tick
food.gradient_amplitude 1.0 Strength of the ring food gradient (0.0-1.0)
reproduction.active_phenotype_traits 4 Number of phenotype traits used in mate filtering (0-4)
reproduction.fixed_phenotype_tolerance 3 Fixed phenotype tolerance override; -1 keeps evolved tolerance
reproduction.hybrid_fitness_cost 0.0 Per-unit phenotype-distance penalty on child starting energy
simulation.total_ticks 50000 Total number of simulation ticks

Repository Structure

src/
  core/           Grid, agents, chromosomes, food, barriers, config, simulation loop
  controller/     Main agent controller
  reproduction/   Mate compatibility, crossover, mutation, child placement
  analysis/       Speciation tracking (marker matrix, hybrid counting), statistics output
  topology/       RectTopology, RingTopology (annular with central obstacle)
  viz/            SDL2 visualizer and headless fallback
third_party/
  toml.hpp        toml++ single-header config parser
  doctest.h       doctest single-header test framework
tests/
  test_main.cpp   Unit tests (chromosomes, grid, agent pool, energy, RNG)
configs/
  default.toml    Example configuration file

Tests

cd build && cmake .. -DCMAKE_BUILD_TYPE=Debug && make -j$(nproc) && ./evosim_tests

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Contributors