MCPcopy Index your code
hub / github.com/andrinr/evo

github.com/andrinr/evo @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
250 symbols 508 edges 37 files 134 documented · 54%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Evolutionary Neural Network Simulation

[!NOTE] This project was developed with extensive use of agentic AI coding tools with a clear priority of speed over quaility.

UI

Overview

A high-performance evolutionary simulation where organisms with neural network brains (MLPs or Transformers) compete for survival. Organisms perceive their environment through vision, scent, and proprioception, then decide actions like movement, attacking, and energy sharing.

Key Features: - Brain architectures: MLP or Transformer networks with targeted mutation - Parallel simulation: Multi-threaded updates with Rayon, BLAS-accelerated matrix ops - Evolution mechanisms: Asexual/sexual reproduction, genetic pools, fitness-based selection - Rich interactions: Vision raycasting, projectile combat, energy sharing, reproduction - Dynamic environment: Drifting food and spawn clusters - Real-time visualization: Interactive UI with camera zoom, organism tracking, performance plots

Quick Start

# Install Rust from rustup.rs
cargo run --release

Controls: - Mouse wheel: Zoom in/out - Click organism: Select/deselect - Hover: View organism details - Ctrl+S/L: Save/load simulation

Development

make all      # Format, lint, test
make fmt      # Format code
make clippy   # Run linter
make doc      # Generate documentation

Inspiration: Based on concepts from this video

Extension points exported contracts — how you extend this code

Locatable (Interface)
Trait for entities with a position that can be updated over time. Any type that implements this trait: - Has a position [3 …
src/simulation/locatable.rs
ToScreenRelative (Interface)
Trait for converting relative vectors (like vision directions) to screen space These should only be scaled by zoom, not [1 …
src/graphics.rs
Sense (Interface)
Trait for different sensory modalities that organisms can use to perceive their environment. Each sense processes envir [3 …
src/simulation/organism/sense.rs
ToScreen (Interface)
(no doc) [2 implementers]
src/graphics.rs

Core symbols most depended-on inside this repo

clone
called by 47
src/simulation/ecosystem.rs
push
called by 38
src/simulation/events.rs
to_screen
called by 12
src/graphics.rs
crossover
called by 12
src/simulation/dna.rs
mutate_with_params
called by 9
src/simulation/brain/mod.rs
consume_energy
called by 9
src/simulation/organism/organism.rs
step
called by 8
src/simulation/ecosystem.rs
forward
called by 8
src/simulation/brain/mlp.rs

Shape

Method 132
Function 88
Class 21
Enum 5
Interface 4

Languages

Rust100%

Modules by API surface

src/simulation/ecosystem.rs19 symbols
src/simulation/evolution.rs18 symbols
src/simulation/organism/organism.rs16 symbols
src/simulation/brain/mod.rs13 symbols
src/graphics.rs13 symbols
src/simulation/spatial.rs11 symbols
src/simulation/actions.rs11 symbols
src/main.rs10 symbols
src/ui/ui.rs9 symbols
src/simulation/reproduction.rs9 symbols
tests/ecosystem_tests.rs8 symbols
src/ui/stats.rs8 symbols

For agents

$ claude mcp add evo \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact