This is a program designed to simulate the behavior of ants using Python 3.
Simulation Modes: The program offers two simulation modes: "theory" and "reality." In the "reality" mode, ants consume energy, and new ants are generated if there is enough food.
Movement and Energy: Ants move based on predefined movement patterns and have energy levels. Ants lose energy over time, and their movement is influenced by their energy.
Ant Behavior Simulation: The program simulates the behavior of ants in an environment, where ants move around randomly, search for food, and return to the nest.
If the scout (also refered to as an ant) discovers a food source, it returns somewhat directly to the nest, leaving a trail of pheromones on it's way
When two paths lead to the same food source, the shorter one is used by more scouts compared to the longer path.
ⓘ Note
At the moment this program can't run, it seems that the current dependencies prevent the program from launching.
To Install the program, use the following command.
git clone https://github.com/riiswa/colony-ant-simulator
cd ~/colony-ant-simulator/
To launch the program, use the following command. By default, the game starts in "Theory" mode, think of it as "Arcade" mode:
python3 colony_ant_simulator.pyYou can switch to "Reality" mode with the following command, think of "Reality" mode as "Realism" mode:
python3 colony_ant_simulator.py -m realityFor help with the options use the -h flag:
usage: python3 colony_ant_simulator.py [-h] [-m [{theory,reality}]] [n_ants]
Simulation of ants colony in python.
positional arguments:
n_ants Number of ants (recommended: 10-100; default: random number between 10 and 100)
options:
-h, --help Show this help message and exit
-m [{theory,reality}] Simulation mode (default: "theory")The Algorithm in action:

pip install -r requirements.txt