**3. Preliminaries of swarm intelligence (SI)**

In this world, we observe that all individuals wish to amplify their intelligence. For this goal, they think and prefer working together, like a bee swarm, fish scull, and birds flock together. This is because they believe that they are smarter in a group rather than being alone. A new intelligence that is formed due to the deep interconnection of the real system having feedback loops is known as swarm intelligence [18]. In simple words, a swarm is a brain of all the brains that are smarter than individual ones. Swarm intelligence is an evolving area of bio-inspired artificial intelligence [19].

Moreover, using swarm intelligence, many heads follow a single mind. All the individuals follow clear rules and interact not with each other but with the environment as well. This adaptive strategy requires a large mass of individuals. It is capable of scheduling, clustering, optimizing, and routing a cluster of similar individuals. Swarm intelligence emphasizes the task's relative position in the schedule. It follows the summation evaluation rule for scheduling. A collaboration of all the similar individuals in a swarm is known as clustering. For example, UAVs of a swarm are different from other clusters' UAVs. It is capable to provide the best and low-cost solution from all the feasible outcomes through optimization. Moreover, it has potential capabilities of routing. It imitates the principle of ants in which forward ants gather the information while the backward ants utilize that information [20].

#### **3.1 Aspects of SI**

Major aspects of swarm intelligence include distribution, stigmergy, cooperation, self-organization, emergence, and imitating natural behavior [21]. Distribution is the prime characteristic of swarm intelligence as all the individuals are capable to select their actions and perform them. The phenomenon with which the agents interact through environmental alteration indirectly is called stigmergy. This phenomenon provides them with awareness of their surroundings and disconnects the interactions of the individuals. Another significant behavior is the cooperation of all the UAVs in a swarm [22]. UAVs cooperate for solving complex tasks and show their collective behavior using swarm intelligence. Another aspect of swarm intelligence is self-organization. This behavior is based on positive feedback, negative feedback, fluctuations amplification, and different social interactions. Positive feedback is the amplification that gives better outcomes by allocating more UAVs to them. Negative feedback is to stabilize so that not all the UAVs

converge to a similar state. The self-organization phenomena usually observe a tension between both the feedbacks, such as complex networks, markets, cellular automata, and many others. Another characteristic is emergence, which can be weak or strong. The emergence is said to be weak if the individual behavior is traceable from the emergent properties. The emergence is said to be strong if the individual behavior cannot be traced from the properties of emergence. Moreover, a swarm of UAVs is modeled by taking inspiration from natural swarm behavior. Generally, swarm behavior includes foraging, constructing a nest, and moving together in the environment. Hence, imitating these natural swarm behaviors is another key aspect of swarm intelligence [23].

#### **3.2 Levels of SI**

There are two levels of swarm intelligence. The first level employs a positive feedback pheromone for marking shorter paths and an entry signal for others. Whereas the second level of swarm intelligence employs a negative pheromone for marking unpleasant routes and no entry signal for others.

#### **3.3 Principles to follow in SI**

A swarm follows five principles generally. The proximity principle, the quality principle, diverse response principle, stability principle, and adaptability principle [24]. Following the proximity principle, the basic swarm individuals can easily respond to the environmental variance that is caused by interactions among them. The quality principle allows a swarm to respond to quality factors like location safety only. The diverse response principle enables to design of the distribution in such a way that all the individuals are protected from environmental fluctuations to a maximum level. The stability principle restricts the swarm to show a stable behavior with the changes in the environment. The adaptability principle shows the sensitivity of a swarm as the behavior of the swarm changes with the change in environment. The most widely used principles are attraction between all individuals, collision avoidance, and self-organization. While following attraction they come closer and focus on a similar direction. While following the collision avoidance principle, they keep a particular distance between them to avoid collisions. Whereas, in self-organization rule, they interact with the neighbors but do not trust all.

#### **3.4 Mechanism of SI**

The mechanisms of swarm intelligence are regarding the environment, interactions, and activities of the individuals in a swarm. No direct communication takes among the individuals in a swarm [25]. They interact with each other through environmental alterations. Thus, environmental alterations serve as external memory. This simulation of work is done by applying the stigmergy behavior of all the swarm members. Moreover, the individuals choose their actions with an equilibrium between a perception-reaction model and any random model. Then, they react and move according to this perceptionreaction model while perceiving and affecting the local environmental properties.

#### **3.5 Languages used for SI**

Proto-swarm, swarm, Star-Logo, and growing point are some programming languages for swarm intelligence. The proto-swarm language uses amorphous

medium abstraction to program the swarm [26]. This amorphous medium abstraction is obtained by utilizing a language that is from the continuous space-time model of Proto and a runtime library that estimates the model on the provided hardware. Another language for swarm intelligence is a distributed programming language called a swarm. The basic concept for it is to move the computation rather than the data. Swarm is analogous to the Java bytecode interpreter with a primitive version. Now it is applied as a Scala library. Star-Logo is not only a programming language but also a programmable modeling environment of a decentralized system. By utilizing this programming language, different real-life scenarios can be modeled like market economies, bird flocks, traffic jams, etc. Whereas, to program amorphous computing medium growing point language is essential. This programming language has the capacity of generating pre-specified and complex patterns like the interconnection form of an arbitrary electrical circuit.
