Parallel Navigation & Boids

Aman, May 2024.

Mathematical Description

Parallel navigation involves a pursuer maintaining a constant bearing angle with its target. Let R(t) be the range vector from the pursuer to the prey at time t:

\[ \mathbf{R}(t) = \mathbf{P}_{prey}(t) - \mathbf{P}_{pursuer}(t) \]

The pursuer aims to keep the angle \( \theta(t) \) between \( \mathbf{R}(t) \) and its heading direction \( \mathbf{H}(t) \) constant:

\[ \theta(t) = \arccos \left( \frac{\mathbf{R}(t) \cdot \mathbf{H}(t)}{|\mathbf{R}(t)||\mathbf{H}(t)|} \right) \]

The velocity of the pursuer \( \mathbf{V}_{pursuer}(t) \) is updated to steer towards the prey:

\[ \mathbf{V}_{pursuer}(t) = \mathbf{V}_{prey}(t) + k \left( \mathbf{R}(t) \times \mathbf{\hat{n}} \right) \]

where \( k \) is a gain factor and \( \mathbf{\hat{n}} \) is a unit vector perpendicular to the plane formed by \( \mathbf{R}(t) \) and \( \mathbf{V}_{prey}(t) \).

Apparently dragonflies don't do parallel pursuit.

Boids Dynamics

Just having 1 prey and 1 predator gets lonely (see parallel pursuit). So let's add a flock of boids.

Boids exhibit three basic behaviors:

The total acceleration \( \mathbf{A}_{boid} \) is the sum of these forces:

\[ \mathbf{A}_{boid} = c_{sep} \mathbf{F}_{sep} + c_{ali} \mathbf{F}_{ali} + c_{coh} \mathbf{F}_{coh} \]

Boid Parameters

Boid Max Force

Boid Max Speed

Perception Radius

Predator Perception Radius

Predator Parameters

Predator Max Speed

Predator Max Force

Kill Time (ms)

Target Boid

Simulation Parameters

Number of Boids