https://github.com/jabraham17/evo
https://github.com/jabraham17/evo
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jabraham17/evo
- Owner: jabraham17
- Created: 2022-06-13T02:09:10.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-31T14:03:39.000Z (about 2 years ago)
- Last Synced: 2025-02-06T06:27:07.881Z (4 months ago)
- Language: C
- Size: 6.79 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# README
This project simulates the evolutionary life cycle. Creatures have small neural network brains that are randomly created. The simulator lets from live for a certain period of time, split into 'ticks'. In each tick a creature uses its brain to decide upon an action. At the end of each period of time (generation), creatures are 'selected' based on a specific criteria. Currently, the only criteria is that they are on the left half of the screen. Those that are selected live, mutate, and reproduce. Those that are not selected die and do not reproduce. Then a new generation begins with the offspring of the previous generation.
## Example

Start of generation 1

End of generation 10

End of generation 50

A randomly generated brain

## Building
The build requires a standard C11 compiler, I strongly prefer clang but gcc should work. The simulator uses 2 libraries, popt and zlib. popt is used for command line option parsing, and will eventually be replaced with a hand written version. zlib will be used to compress images, it is not currently used but it is required to build.
linux install
```
sudo apt-get install popt zlib clang
```macos install
```
brew install popt zlib llvm
```If you have installed everything to their default directories, just running `make` from the project root should properly build everything. IF you do not have everything in the default directories, I expect that you know how to modify the Makefile to make it work for your system. All the configuration is done in `options.mk`, it should be trivial to make it match your system.
## Running
Executing `./build/bin/evo` will run a simulation with default parameters. Running `./build/bin/evo --help` will show all the options to customize the simulator.
### WARNING
If you tweak the settings too high, the simulator will take a very long time to run and will likely consume all available storage.
## NOTE
This project is under heavy active development and is not in a stale state yet, but I have lots of requests to make it public. Furthermore, past this point in the README is my silly notes to myself, read them if you wish but understand them in that context.
## FFMPEG Experimenting
```
./build/bin/evo -g 2 -o /Volumes/Evo/test --callback-tick=1 --callback-tick-freq=1 -w 256 -h 256 -n 10000 -g 30 -t 300 -c 20
./build/bin/evo -g 2 -o /Volumes/Evo/test --callback-tick=1 --callback-start=0 --callback-end=0 --callback-tick-freq=10 -w 256 -h 256 -n 3000 -g 50 -t 300 -c 20
ffmpeg -y -r 30 -f image2 -s 256x256 -pattern_type glob -i "/Volumes/Evo/test/gen_*_tick_*.bmp" -vcodec libx264 -crf 25 -pix_fmt yuv420p test.mp4
```view compressed file
```
./build/bin/zpipe -d