alignment clustering index for boid
introduction
boids
- Boid stands for bird-oid object, signifying how it has been used to realistically represent flocks of birds or schools of fish without any special intelligence and easily translatable, standardized behaviours ( Vishwajith, 2021 ).
- Boid simulation is the simulation of the behaviour of creatures while moving in groups, where this movement pattern can be found in the school of fish, the flock of birds. ( Shrestha, 2021 ).
- One application of the ideas involved in Boids and other swarm intelligence simulations is in the field of “swarm robotics”, where a key component in these systems is communication between individual robots in order to ensure that each is devoted to an appropriate task at hand ( Wong, 2008 ).
terminology
Some terminology ( Pemmaraju, 2013 )
- Agent: A single entity or character, which is the boid.
- Velocity vector: An agent’s current velocity.
- Neighborhood: A certain area around the agent, used to look for other agents.
- Resultant: The vector obtained from the calculations of the rule.
velocities
There are velocities due to forces ( von Mammen & Jacob, 2008 )
- alignment
- cohesion
- separation
- wander
- bound
- containment
motion parameters and sets
- Each boid $i$ has velocity $\vec{v}_i$ and position $\vec{p}_i$.
- For boid $i$ there is set of neighbors $N_i$, the perceived ones.
- There is also subset $S_i \subseteq N_i$ for $r_{ij} < d_{\rm min}$.
forces
alignment
- It directs boid $i$ to average direction of its neighbors. $$ \vec{v} _{a, i} = \frac{1}{|N_i|} \sum _{j \in N_i} \vec{v} _j. $$
cohesion
- It attracts boid $i$ to center of its neighbors. $$ \vec{v} _{c, i} = \frac{1}{|N_i|} \sum _{j \in N_i} \vec{p} _j. $$
separation
- It pushes away boid $i$ from center of its sub-neighbors. $$ \vec{v} _{s, i} = \frac{1}{|S_i|} \sum _{j \in N_i} \vec{v} _j. $$
wander
- It represent “free will” of boid $i$ using random number in limited range radius $v_0$. $$ \vec{v} _{r, i} = v_0 \hat{v} + v_0 (\theta \in [0, 2 \pi]) \hat{\theta}. $$
bound
- It directs boid $i$ to center of its neighbors if it is outside the world region. $$ \vec{v} _{b, i} = \vec{w} - \vec{p}_i. $$
containment
- It forces boid $i$ to enter defined and limited region if it is outside. $$ \vec{v} _{t, i} = \left\{ v_t \hat{v} - v_t (\theta \in [0, 2 \pi]) \hat{\theta} \right\} \ {\rm for} \ \vec{p} _i \in \Omega. $$
simulation
typical lengths
- Length used is fish body length or $(\rm BL)$.
- It is chosen that $1 {\rm unit \ length} \ {\rm or} \ {\rm BL} \approx {\rm 16px}$.
parameters
- For cohesion $d_{\rm min} = 3 \ {\rm BL}$.
- For separation $d_{\rm min} = 0.3 \ {\rm BL}$.
- Due to Unity limitation for real time step it uses $\Delta t = 0.025 \ {\rm s}$.
- Simulation time $t \in [0, 600] \ {\rm s}$
- Maximum velocity $v_{\rm max} = 15$ unit length per second.
- Not all previous forces are considered at the same time in each simulation.
update
For boid $i$
- Acceleration $$ \vec{a}_i = \sum_i c_a \vec{v} _{a,i} + c_c \vec{v} _{c,i} + c_s \vec{v} _{s,i} + c_r \vec{v} _{r,i} + c_b \vec{v} _{b,i} + c_t \vec{v} _{t,i}. $$
- Velocity $$ \vec{v}_i (t + \Delta t) = \vec{v}_i (t) + \vec{a}_i. $$
- Position $$ \vec{p}_i (t + \Delta t) = \vec{p}_i (t) + \vec{v}_i(t + \Delta t). $$
aci
- Interaction matrix, e.g 4 boids $$ M = \left[ \begin{matrix} 0 & 1 & 1 & 0 & 0 \newline 1 & 0 & 0 & 1 & 0 \newline 1 & 0 & 0 & 0 & 1 \newline 0 & 1 & 0 & 0 & 0 \newline 0 & 0 & 1 & 0 & 0 \end{matrix} \right] $$
- Matrix element
- $m_{ij} = 1 - \delta_{ij}$ or $$ m_{ij} = \left\{ \begin{matrix} 0, & i = j, \newline 1, & i \ne j \end{matrix} \right. $$
- $m_{ij} = m_{ji}$
- Alignment clustering index $$ \alpha_t = \frac{\frac12 {\rm Tr}(M_t^2)}{\frac12 N(N-1)} $$
results
coefficients
- cohesion
- alignment
- separation
- containment
- (wander)
70-10-10-00 (cohesion dominant)
10-70-10-00 (alignment dominant)
10-10-70-00 (separation dominant)
10-10-10-70 (containment dominant)
aci
aci-acsc
Force | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
---|---|---|---|---|---|---|---|
Alignment | 10 | 20 | 30 | 40 | 50 | 60 | 70 |
Cohesion | 70 | 60 | 50 | 40 | 30 | 20 | 10 |
Separation | 10 | 10 | 10 | 10 | 10 | 10 | 10 |
Containment | 10 | 10 | 10 | 10 | 10 | 10 | 10 |
aci-acscw
Force | 1 | 2 | 3 | 4 | 5 | 6 |
---|---|---|---|---|---|---|
Alignment | 10 | 20 | 30 | 40 | 50 | 60 |
Cohesion | 60 | 50 | 40 | 30 | 20 | 10 |
Separation | 10 | 10 | 10 | 10 | 10 | 10 |
Containment | 10 | 10 | 10 | 10 | 10 | 10 |
Wander | 10 | 10 | 10 | 10 | 10 | 10 |
wander influence
- Random motion is introduced through wander.
- It shows saturated ACI when weight of alinment ≥ 40.
closing
conclusion
- ACI is increasing as alignment increasing with other besides cohesion is held constant.
- Addition of wander will introduce saturated ACI.
- ACI can show the merge of two or more clusters of boids.
future plan
- Investigate further variation of weights and relate them to ACI or other indices in characterizing motion patterns of boids.
- Modify existing indices or propose new ones to obtain more suitable paremeters for boid behaviours.
notes
- Day: 2 / 13 Sep 2023
- Time: 14.40 - 14.50
- Room: Balangan Room
- Topic/scope: Fisheries - sustainable fisheries management, EAFM, IUU fishing
- Code: ICM112
- Title of Paper: Weight Parameter and Alignment Clustering Index Analysis in Boid Simulation: A Study of Multiple Fish Species → Analysis of Boid Algorithm Weights using Alignment Clustering Index → Alignment Clustering Index for Boid.
- Presenter: Sparisoma Viridi