# Realistic Multi-Agent Formation Using Discretionary Group Behavior (DGB)
## 4 Experiments  
For a better understanding of our method, the experimental results for our simulation are available in a video which is located at the following link--[[https://youtu.be/2](https://youtu.be/2) jlQ3 MJ8 mcv]([https://youtu.be/2](https://youtu.be/2) jlQ3 MJ8 mcv) (Supplementary Materials). For experimentation, our method has been tested on a machine with the intel core i5-8265U processor, 8 GB RAM, and 1.80 GHz. In our algorithm, we specified the values for the parameters that we have discussed in previous sections as follows: \(G_{min}=3\) (Section 3.1), \(T=3\) (Section 3.1), \(W_{1}=0.75\) (Section 3.2), \(C_{e}=2\) (Section 3.3) and \(d_{max}=3\) (Section 3.5). However, these values might be changed for new scenarios and purposes. We have two main demonstrations here; the first one is the agents' effort to maintain in their position in the group to make a specific shape while moving. For this issue, based on the leader and other agents' velocity, some positions will be computed. If an agent is not in its estimated position while moving, they will select their optimal velocities from the intersection of all half-planes consisting of half-planes for collision avoidance (ORCA) and additional half-planes that guide the agent to the right spot in the group (DGB). Agents are performing this action continuously since the leader is moving and the positions for making the group formation are updating in each time step. The second illustration is the agents' behavior in the face of challenging obstacles like a tightened corridor for a big group of people to pass through. In this case, first, the density of obstacles in front of the agent will be computed using an ellipse and if it shows the presence of obstacles, the agent tries to find its nearest neighbor which is more near to the leader. Then simply by adding two half-plane restricting valid velocities and guiding the agent to follow its subleader, we will have more realistic and human-like behavior in this common situation. Experiments show that each agent's behavior in front of other agents and obstacles is more realistic due to their independent and discretionary manner confronting avoidable components in the environment. We compare our method with one of the most related and recent works. According to Figure 6, for passing through a narrow corridor, just at the time when obstacles are visible for the agent, it will move toward its selected subleader to be able to find the best path easier; like what would happen if it was a real human. Notice the fact that the vision of humans is limited to a range of distances and it is going to be more limited when people are in groups. In our work, this characteristic of humans has been considered and agents will not change their formation unless they see some obstacles that have blocked their front path. While in Figure 7[1], all agents in the group, at the same time, change their original formation and make a line shape before reaching to the obstacles. This event is not usual among a group of people passing through a tighten area like a doorway and can be time-consuming for a large number of agents in a group. Furthermore, their work requires changing the preprocessing step in the algorithm which is not doing automatically. Also, storing the relationship between all of the members in the group in a matrix [1] for having this transformation in the group's shape, can make a lot of memory usage especially for large groups. Another controversial feature of Reference [1] is that, in each cycle, each agent chooses some other members as its connection-agents among a predefined set called connection-neighbors. connection-agents is another subset of neighbors that the agent tries to stay close to. Making agents always being close to others yields to none-realistic avoidance behavior. In Figure 8, our method, agents have their independent manner for collision avoidance and formation maintenance.