An evolution simulator written in Rust. Each organism is represented as a tree of different nodes with different jobs, and can use those nodes to sense events in the world and react to them with a neural network. The evolution of plants, detritivores, and herbivores has been observed.
Inspired by and based on:
git clone https://github.com/Ashwagandhae/mutable.git
cd mutable
cargo run --release
Note: I hope to support WebAssembly at some point, but for now you'll need to run it locally.
Plenty of evolution simulators exist, but most make an arbitrary distinction between plants and animals, usually manifesting in circles of "food" spawning around the world for the evolving animals to eat. I wanted to make a simulator where the distinction between plants and animals is blurred, allowing both to evolve both together in a single world.
- Download Microsoft C++ Build Tools.
- Install Rust.
- Install CLang and macOS Development Dependencies.
xcode-select --install
- Install Rust.
- Install a C compiler, depending on the distro.
- Install Rust.
To start a new world with a random population:
cargo run --release
To start a new world from a file:
cargo run --release --input path/to/file.json
The example-worlds
folder contains some worlds with interesting creatures.
To start a new world with the option to save it to a file:
cargo run --release --output path/to/file.json
You can save the current state to the file by pressing S
at any time.