Keywords

1 Introduction

Many animal groups such as fish schools and bird flocks clearly display structural order, with the behaviour of the organisms so integrated that even though they may change shape and direction, they appear to move as a single coherent entity [1,2,3,4]. Many of the collective behaviours exhibited by such groups can only be understood by considering the very large number of interactions among group members. Individual-based computer simulations are a very useful analytical tool to study such groups [5,6,7]. With this technique, it is possible to demonstrate group leadership and hierarchical control.

From the perspective of statistical mechanic, Vicsek et al. [8] proposed a simple and effective model to simulate collective motion. In the model, each individual participating in the collective movement can be regarded as an independent self-driven individual. Each individual moves in the two-dimensional plane at a constant rate, and the direction of individual speed at the next time is set as the average speed direction of himself and other surrounding individuals. Couzin [9] proposed a self-organizing model of population formation in three-dimensional space. With the lack of global information, the concepts of repulsion, attraction and alignment region of fish are used to demonstrate the spatial dynamics of animal population. Guy [10] proposed the basic phase diagram of the fish schooling model and explored its parameter space, which exceeded the parameter values determined by a group of fish swimming in a shallow pool.

Although the above models have characterized the behavior of biological schooling in the process of computer simulation, the number of adjacent areas and social information also produce an effect on the behavior of fish schoolings. Mann [11] further studied the arbitration rules of fish groups and proposed to replicate the recent selection rules of the same kind of animals with a certain fidelity. In a series of choices, the final choice is the one with the largest amount of information, because the individual can obtain the most social information; The leadership ability of the group is produced by individuals who are more inclined to initiate movement or maintain movement tendency. Fish show a strong tendency to follow the movement of the same kind of animals. Mann [12] proposed a group decision-making model of rational individuals, established a social information and collective decision-making model of fully rational individuals, and revealed how a series of obviously random social decision-making rules were generated from the basic information asymmetry between individuals, decision makers and decision observers.

Based on Mann's related research, we proposed an improved Couzin’s model. By analyzing the influence of the number of fish in the “zone of orientation” and “zone of attraction” on the individual in the Couzin’s model, we propose an individual motion direction analysis model based on the number of fish; At the same time, based on the proposed model, the influence of the number of leaders on the group polarization is analyzed.

The remainder of the paper is organized as follows. In Sect. 2, the Couzin’s model and the proposed individual direction update model based on the number of fish are proposed. In Sect. 3, simulation comparison experiments are carried out to compare the number of iterations to achieve cluster consistency of the proposed method, Couzin’s model, Vicsek’s model and Guy’s model, the influence of the number of leaders on the model and the consistency of the group end state. Finally, a conclusive remark on this paper is developed in Sect. 4.

2 Methods

2.1 Couzin's Model

Let the system consist of \(N\) individuals whose position and velocity vectors are \(c_i ,v_i\), respectively. Each individual moves at a constant velocity \(v\) in three-dimensional space, \(\theta_i \left( {t + 1} \right)\) is the expected direction of individual \(i\) at \(t + 1\). At each time step \(t\), each individual can perceive the position and angle of other individuals in three non overlapping zones: zone of repulsion, zone of orientation and zone of attraction, which are also called Three Circle Model. The motion rules of the individual are as follows: First, each individual tries to keep the minimum distance from other individuals in the repulsion zone (a ball with the individual as the center and \(r_r\) as the radius), then the expected direction of individual \(i\) is adjusted in the following way:

$$ \vec{d}_i \left( {t + 1} \right) = - \sum_{j \ne i}^{n_r } {\frac{{\overrightarrow {r_{ij} } \left( t \right)}}{{\left| {\overrightarrow {r_{ij} } \left( t \right)} \right|}}} ,\;i = 1,\;2,\;...,\;N,\;t > 0 $$
(1)

where \(\mathop {r_{ij} }\limits^\to \left( t \right) = \left( {c_j - c_i } \right)\) and \(n_r\) represents the number of individuals in the zone of orientation.

Secondly, if \(n_r = 0\), the expected direction of individual \(i\) is affected by the zone of orientation (the spherical region centered on individual \(i\) and between \(r\) and \(r_o\), and the angle after removing the individual is \(360^o { - }\alpha\) And the attraction zone (the spherical area centered on individual \(i\) and between \(r_o\) and \(r_a\), with the angle of \(360^o { - }\alpha\), and \(\vec{d}_o \left( {t + 1} \right)\), \(\vec{d}_a \left( {t + 1} \right)\) can be defined as follows:

$$ \vec{d}_o \left( {t + 1} \right) = \sum_{j \ne i}^{n_o } {\frac{{\overrightarrow {v_i } \left( t \right)}}{{\left| {\overrightarrow {v_i } \left( t \right)} \right|}}} ,\ \,i = 1,\,2,\,...,\,N,\,t > 0 $$
(2)
$$ \vec{d}_a \left( {t + 1} \right) = \sum_{j \ne i}^{n_a } {\frac{{\overrightarrow {r_{ij} } \left( t \right)}}{{\left| {\overrightarrow {r_{ij} } \left( t \right)} \right|}}} ,\,i = 1,\,2,\,...,\,N,\,t > 0 $$
(3)

If \(n_a = 0\), \(\vec{d}_i \left( {t + 1} \right) = \vec{d}_o \left( {t + 1} \right)\), then if \(n_o = 0\), \(\vec{d}_i \left( {t + 1} \right) = \vec{d}_o \left( {t + 1} \right)\). If \(\vec{d}_i \left( {t + 1} \right) = 0\) is obtained after the above operation, or there are no individuals in the three regions, then \(\vec{d}_i \left( {t + 1} \right) = \overrightarrow {v_i } \left( t \right)\). The maximum turning angle for individual at each step is \(\theta\). If the angle difference between \(\overrightarrow {v_i } \left( t \right)\) and \(\vec{d}_i \left( {t + 1} \right)\) is less than \(\theta\), then \(\vec{d}_i \left( {t + 1} \right) = \overrightarrow {v_i } \left( t \right)\), otherwise, individual \(i\) rotates by an angle in the desired direction \(\theta\), In this way, the next movement direction of the individual is obtained.

2.2 Individual Direction Updating Rule Based on Number of Neighbors

In the Couzin’s model, only the influence of attraction zone and alignment zone on the individual is considered, and the same influence weight is given. According to Mann's research, the number of individuals in different zones will also have an impact on the movement direction of the individual \(i\), which is a strong positive correlation. Therefore, when updating the motion direction, the direction update formula of the attraction and alignment region is modified as follows:

$$ \overrightarrow {d_i } \left( {t + 1} \right) = \frac{{\left( {n_o \cdot \overrightarrow {d_o } \left( t \right) + n_a \cdot \overrightarrow {d_a } \left( t \right)} \right)}}{n_o + n_a } $$
(4)

Therefore, the schematic diagram of direction updating is as follows:

Fig. 1.
figure 1

Individual direction updating model based on number of neighbors

As shown in the Fig. 1, the proposed model is compared with the Couzin’s model. For individual \(i\), there are four individuals in the orientation zone and one fish in the attraction zone. The left shows the Couzin’s model, and the motion direction of the individual is the dichotomy angle of the two direction vectors; From the proposed model shown in the right, the motion direction vector of the attraction zone is reduced by 1/4, then the motion direction of the target fish is obtained. Compared with Couzin’s model, the proposed model makes the individual close to the direction of a large number of neighbors.

2.3 Leader-Follower Individual Direction Updating Rule Based on Social Information

According to Mann's research of schooling, social information will have an impact on the process of fish movement. The concept of leader (individual with information) is introduced. When the fish move, some individuals capture social information (food information) and have a preference for the target location. Other individuals do not know who the leader is. The leader is just an ordinary individual, which will only affect other individuals in their neighbors, That is, without changing the original individual local rules of the system, several leaders are added to achieve the desired collective behavior, so as to guide the population to move to the target. As shown in Fig. 2, when the guide individual finds the food source, it will move towards the target position. At the same time, according to the proposed individual direction updating rule, the surrounding individuals will also move towards the target with the leader.

Fig. 2.
figure 2

Leader-follower individual direction updating model

3 Experiments and Results

3.1 Environment

In order to analyze the performance of the proposed algorithm, the activity range of the fish school is set as 50 * 50 * 50 three-dimensional space, the number of individuals is 100, and the length of each fish is 2. The maximum turning angle of each step is 30°, the field of view is –150°–150°, the maximum speed is 1/step, the width of repulsion zone is 2, the width of orientation zone is 10, and the width of attraction zone is 10. For each individual, at the random position in the space, the individual starts from the random direction, and the initial distribution of the fish school is shown in the figure below (Fig. 3).

Fig. 3.
figure 3

Initialization of position and direction

The processor for simulation is Intel (R) core (TM) i5-10210u CPU @ 1.60 GHz, and the running memory is 16.0 GB.

3.2 Quantitative Performance

Two global properties of the model are calculated from the comprehensive trajectories of all individuals [9]: Group polarization \(p_{group}\) and group angular momentum \(m_{group}\). Group polarization increases with the increase of alignment between individuals in the group, and group angular momentum is the sum of individual angular momentum around the group center, \({\bf{c}}_{group}\) also known as group centroid. Therefore, the angular momentum measures the degree to which the group rotates around the center of the group. Therefore:

$$ p_{group} \left( t \right) = \frac{1}{N}\left| {\sum_{i = 1}^N {{\bf{v}}_i \left( t \right)} } \right| $$
(5)
$$ m_{group} \left( t \right) = \frac{1}{N}\left| {\sum_{i = 1}^N {{\bf{r}}_{ic} \left( t \right) \times {\bf{v}}_i \left( t \right)} } \right| $$
(6)

where

$$ {\bf{r}}_{ic} = {\bf{c}}_i - {\bf{c}}_{group} $$
(7)

and

$$ {\bf{c}}_{group} = \frac{1}{N}\sum_{i = 1}^N {{\bf{c}}_i \left( t \right)} $$
(8)

3.3 Results

(1) Comparison of Different Model

Each model is simulated 100 times, with 1000 epochs each time. The results of Couzin’s Model, proposed model, Viesck’s Model and Guy’s Model are as follow:

Fig. 4.
figure 4

Group polarization and group angular momentum: Blue is the group angular momentum, purple is the mean of group angular momentum for each epoch, orange represents the group polarization, and red is the mean of group polarization.

It is shown in Fig. 4 that when the system is stable, group polarization of Guy's model is low, ranging 0.65–0.8; and there are fluctuations in Couzin’s model and Viseck’s model. Compared with other models, the proposed model can make the group consistency faster. When iterating 100 steps, at least 80% of individuals have the consistency of motion direction. And group polarization is almost 0.9 in the stable state.

(2) Comparison of Different Leaders

Experiment is carried out for comparing the relationship between different proportion of leaders and the number of epochs. We assume that when the group polarization is reached 0.8, the consistency of system is achieved. The epoch and the proportion of leaders changes from 0 to 100. The results are as follow.

Fig. 5.
figure 5

Relationship between the number of leaders and achieving consistency

The comparison of proposed model and Couzin’s model is shown in Fig. 5. The epoch of the group reaching the consistency first increases and then decreases through the number of leaders increasing. When there are 12 leaders in proposed model and 8 leaders in Couzin’s model, the number of epochs required to achieve consistency is the highest. It is also shown that when the number of leaders accounts for less than 10% of the group, the leading effect on the group is not strong. With the increase of the number of leaders, the number of epochs to achieve consistency is decreasing. Compared with the Couzin’s model, the proposed model converges to consistency with fewer epochs.

The number of leaders is set 30, and then compare the influence of the Couzin’s model and proposed model on the motion direction of the population in the consistent state. Figure 6 shows the individuals motion direction when the system converges. The brighter the color, the more consistent the direction with the leaders. Compared with the Couzin’s model, the proposed model can better align the motion direction of individual with the target position.

Fig. 6.
figure 6

Movement direction of fish schooling

4 Conclusions

In this paper, a fish swarm model based on neighbors and leader-follower is proposed. Considering the strong influence of the number of fish in the attraction and orientation zone, an individual direction updating rule based on number of neighbors is proposed. Then leader-follower individual direction updating rule based on social information is put forward, considering the influence of target position on schooling direction updating. Comparing with the group polarization and group angular momentum of Couzin’s model, Guy’s model and Viseck’s model, it is shown that the proposed model can make the group achieve consistency faster. Furthermore, the relationship between the consistency of population and the number of leaders is given.