Skip to content

Installation

EverardoG edited this page Sep 7, 2021 · 2 revisions

Linux

Setting up the simulator (C++)

First, you'll need to make sure that you have SFML installed. It should be as simple as the following command. This should install the latest version of SFML on your machine. If you want to learn more about SFML, click here.

sudo apt-get install libsfml-dev

That's it for external dependencies! Now, just download the simulator from github, and build it with the following commands.

git clone https://github.com/melindamalley/ArmyAntSim.git    # Download the repository from github
cd ArmyAntSim      # Navigate into the project's root folder
mkdir build        # Make a build folder (for cmake)
cd build           # Change directories into the build folder
cmake ..           # Set up cmake
cmake --build .    # Build the project using cmake

Hooray! The simulator should be all set up now. To actually run the simulator, just navigate into the ArmyAntSim folder, and run the following.

./build/ArmyAntSim

You should always run the simulator from the ArmyAntSim folder because of the assumptions the simulator makes about the directory structure of the project. The binary will likely run fine from just about anywhere on your machine, but it won't save the images from your experiments and may come riddled with other small errors.

Setting up processing scripts (Python)

First you'll want to make sure you have everything downloaded. You can download all the code with the following command.

git clone https://github.com/melindamalley/ArmyAntSim.git    # Download the repository from github

You'll also want to make sure you have all the python dependencies installed. You can simply use pip like so.

python -m pip install -U numpy
python -m pip install -U matplotlib

That should be all you need to be ready to go!