/ant_trails

Implementation of ant algorithms in Stage

Primary LanguageC++BSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

ant_trails

Implementations of an embodied ant algorithm for foraging in Stage. Includes an implementation of LOST and SO-LOST.

Install (Ubuntu)

Install Stage

# Install dependencies
$ sudo apt-get install git cmake g++ fltk1.1-dev libjpeg8-dev libpng12-dev libglu1-mesa-dev libltdl-dev git
# Clone Stage in home directory
$ cd && git clone https://github.com/rtv/stage.git
$ cd stage
$ mkdir build && cd build
$ cmake -DCMAKE_INSTALL_PREFIX=$HOME/stage-lib ..
$ make
$ make install

To set up environment add the following to the file ~/.bashrc:

STG=$HOME/stage-lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$STG/lib64  # note: may be 'lib'
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$STG/lib64/pkgconfig
export PATH=$PATH:$STG/bin

Make sure to source: $ source ~/.bashrc

Install ant_trails

# Clone this repository
$ cd && git clone https://bitbucket.org/jacobperron/ant_trails.git
$ cd ant_trails
$ mkdir build && cd build
# Build
$ cmake ..
$ make

Run

By default the code is configured to use the SO-LOST algorithm.

# Go to the worlds directory
$ cd ../worlds
# Run example world file
$ stage ant.world

Press 'P' to start/pause and '[' and ']' to decrease or increase the rate at which time passes.