# Effect of Formation Size on Flocking Formation Performance for the Goal Reach Problem
## 3 Results
### Experimental Results
#### 3.2.2 Experimental Results in an Environment with Obstacles
\begin{table}
\begin{tabular}{l c c c c c} \hline \hline  & & \multicolumn{4}{c}{**Flock Size**} \\ \hline
**Performance Metric** & **10** & **20** & **30** & **40** & **50** \\ \hline Localization Time & 900.14 & 749.98 & 715.60 & 685.07 & 590.01 \\ Distance to center of mass & 6.15 & 5.46 & 5.15 & 4.95 & 4.94 \\ Collisions & 0.04 & 0.18 & 0.01 & 0.03 & 0.13 \\ Separations & 3.24 & 11.09 & 19.29 & 33.46 & 44.22 \\ Alignments & 934.81 & 767.37 & 729.91 & 684.20 & 580.33 \\ Cohesions & 28.64 & 33.57 & 42.15 & 42.39 & 63.13 \\ Task completion time & 0.45 & 0.74 & 1.01 & 1.42 & 1.47 \\ Speed matching time & 48.05 & 95.4 & 44.25 & 57.8 & 36.00 \\ Localization window & 73.25 & 58.1 & 64.9 & 65.2 & 66.5 \\ \hline \hline  & & \multicolumn{4}{c}{**Flock Size**} \\ \hline
**Performance Metric** & **60** & **70** & **80** & **90** & **100** \\ \hline Localization Time & 634.24 & 743.43 & 787.13 & 1126.95 & 1441.14 \\ Distance to center of mass & 4.94 & 4.92 & 4.92 & 4.97 & 4.96 \\ Collisions & 0.20 & 0.27 & 0.36 & 0.93 & 1.31 \\ Separations & 74.50 & 126.63 & 168.83 & 364.80 & 561.03 \\ Alignments & 595.10 & 658.57 & 665.22 & 821.15 & 947.17 \\ Cohesions & 55.24 & 66.48 & 76.03 & 125.26 & 159.10 \\ Task completion time & 1.91 & 2.53 & 3.20 & 5.34 & 7.39 \\ Speed matching time & 30.45 & 33.45 & 39.50 & 39.50 & 34.20 \\ Localization window & 71.5 & 83.55 & 94.7 & 119.85 & 135.9 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Performance metric results averaged over twenty simulations for flock sizes in 10–100, in an environment with obstacles. associated with these models can only explain the variation in no more than 8.5% of the number of alignment steps due to the change in flock size. Finally, the average speed matching time values reported in Table 4 do not show a clear relationship with the flock size. However, the \(p\)-value for all the curve estimation functions in Figure 6h for this measure show strong evidence to reject the null hypothesis. Notably, the highest \(R^{2}\) value obtained from these functions can explain no more than 6.5% of the change in the speed matching time due to the change in flock size. The environment had five obstacles, which were added manually to ensure they were distributed along the route to the goal, with random sizes, as illustrated in Figure 7. We applied the same methodology as in the simulation with no obstacles--3 randomly selected experiments of 100, 50, and 30 agents simulation output are shown in Figure 7a-c, respectively. In the upper right corner in these figures, we represent the different flock behaviors: blue curve for number of applied alignment rules, black curve for the number of applied separation rules, and red curve for the number of applied attraction rules. A zoomed-out view of these parameters along with the number of collisions is made clear in Figure 7d. The increase in flock size causes unstable flocking behavior, whereas the flocking rules plot looks smooth in Figure 7a,b. In addition, there is a noticeable increase in the application of the separation and attraction rules (black and red lines, respectively) when the flock size is 100, as shown in Figure 7c. Moreover, whenever the flock does not have stable flocking behavior, the collision between its members increases. In addition, sensing the goal in presence of obstacles close to the goal led to a high possibility that the flock members collide with these obstacles, as shown in Figure 7d. Figure 7: Snapshots of simulation experiments with flock sizes of 30, 50, and 100, in an environment with obstacles. (**a**) Experiment 1 with 30 agents. (**b**) Experiment with 50 agents. (**c**) Experiment with 100 agents. (**d**) Focus on the flocking rules and number of collisions for experiment with 100 agents. (Figure 7c). The flock controller was capable of making the flock split and rejoin to avoid the obstacles, similar to the results reported in [23]. Figure 8 illustrates examples of the splitting (Figures 8a) and joining (Figures 8b) of the flock.