Skip to content

Predator-prey simulator - project made for System Modeling and Simulation class at AGH University.

Notifications You must be signed in to change notification settings

piotrek-szczygiel/predator-prey-simulator

Repository files navigation

Icon

Predator-Prey simulator


screenshot

Population plot created with run_and_plot.py

plot

Building

Required programs:

  • C++ compiler
  • cmake

Downloading submodules

git submodule update --init --recursive

Installing Ubuntu dependencies

sudo apt install \
    build-essential git cmake libasound2-dev mesa-common-dev libx11-dev \
    libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev libluajit-5.1-dev

Running CMake

mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .

Running Predator-Prey simulator

./sim # Launch graphical interface

./sim 1000 # Run simulation 1000 times and output CSV statistics to stdout

# Helper script to create 10 plots of 1000 tick simulations and launch them as 4 parallel processes
python run_and_plot.py sim.exe 1000 default.lua 10 4

Used libraries

Attributions

Textures by Franuka.

Icons made by Freepik from Flaticon.