Skip to content
This repository has been archived by the owner on Mar 17, 2020. It is now read-only.

Results

Diogo Cruz edited this page Nov 17, 2018 · 1 revision

Complexity of implementation

Varying size of board

We start by varying BOARD_DIM keeping fixed the remaining parameters, namely, we use 1 obstacle and 5 agents of each type.

The results suggest that our model has a quadratic complexity as a function of size. This makes a lot of sense since the Soldiers have to traverse the entire board and their area is equal to the square of the side length.

Varying number of obstacles

The results of the second experiment, in which we varied the number of obstacles, keeping the constant size at 30 and 5 agents of each type suggest linear complexity of our model as a function of the number of obstacles. It makes sense that this is so, since to remove an obstacle is spent at most the time of going back and forth plus the time of extraction, which is equal to the amount of obstacles, which in turn, although not always the same, always varies between the same values that we have maintained throughout the experiments.

Percentage of use of agents

We begin by varying the number of Soldiers, keeping constant size at 30, obstacles at 20, and Captains at 5.

It is curious to note that the total average number of steps plus inactivity only lowers from 1 to 2 soldiers, from the going up and down very slightly from 5 to 10 soldiers. This is essentially due to inactivity, since when the soldiers complete the exploration of the entire area, the remaining agents are expected to finish their tasks. In any case, it is not useful to use a very large number of soldiers, because as soon as the first obstacles are detected, the remaining agents begin to be occupied and the rapid detection of obstacles does not translate into greater speed of the model as one all. For this configuration, the ideal number of soldiers appears to be 2, since it has the best steps and inactivity relation.

Another interesting observation, is that the total of steps plus inactivity increases consistently with the number of soldiers, although the number of steps goes down. Everything indicates that this happens due to negotiations between the soldiers to choose the one that will aid in the removal of the obstacle. In fact, these negotiations are especially relevant in this scenario.