RBE595 - Swarm Intelligence (Spring 2023)
Master of Science in Robotics Engineering at Worcester Polytechnic Institute
In this exercise, the threshold model of Theraulaz et al. is implemented. The model is based on the assumption that the probability of a robot switching its state from inactive to active is proportional to the number of active robots in its neighborhood. The model is implemented in ARGoS simulator using Buzz language.
- OS : Ubuntu 20.04 LTS
- ARGoS Simulator : 3.0.0-beta59
- Programming Language : Buzz
- Buzz Wiki
- Buzz Cheatsheet
- ARGoS-Buzz Integration
- Khepera IV Robot
- Khepera IV Robot Commands
-
To compile the code, run the following commands in your terminal:
cd threshold_model mkdir build cd build cmake .. make
-
Launch the ARGoS simulator using the terminal (make sure to be in the
threshold_model
directory) with the following command :argos3 −c threshold_model.argos
The swarm of robots will be initialized in the arena with the obstacles.
-
Open Buzz script file
threshold_model.bzz
in ARGoS Script Editor and run the script using theExecute
button.
For the first experiment, thresholds and spontaneous switching probability are initialized to fixed value of 500 and 0.2 respectively. Some robots specialize towards task 0 while the remaining robots tend to converge towards task 1. The robots tend to converge within simulation time of 1500 units. However, there is an exception as seen in Time vs Threshold1 graph where one of the robots does not specialize even in 1500 units. This is because the robot is not able to find any active robot in its neighborhood and hence it does not switch its state from inactive to active. The robot is stuck in inactive state and hence it does not specialize towards any task.
For the second experiment, uniform probability distribution math.rng.uniform()
is used to spontaneous switching probability P
and observed the following graphs which vary a little bit from the above initial graphs. Here, it can be observed that the some of the robots that were initialized with thresholds less than 500, tend to converge towards task 0 with the threshold decreasing from initial value and then suddenly increasing towards 1000 in a simulation time of 1700 units. Also, none of the robots specialized in task 1 and the task 1 threshold reduced to 0 as the simulation ended.
For the third experiment, the task thresholds were initialized uniformly between 0 and 1000 using math.rng.uniform()
. Some robots that were initialized with threshold greater than 700 for task 0, immediately tend to specialize in task 0, whereas the other robots initialized with threshold less than 300, has their threshold reduced to 0 immediately. Also, 2 of the robots specialized in task 0 initially with threshold increasing towards 1000 and dropping to 0 as the simulation ended in time of 1600 units. Also, 1 of the robots took a longer time to reach the highest threshold and specialize in that task. Similarly, some robots that were initialized with threshold greater than 900 for task 1, immediately tend to specialize in task 1, whereas the other robots initialized with threshold less than 200, has their threshold reduced to 0 immediately. Very few robots (5) specialized in task 1 with their threshold reaching highest value in stipulated simulation time.