Open In App
Related Articles

Pathfinder Optimization Algorithm

Like Article
Save Article
Report issue

Nature is full of social behaviours for performing different tasks. Although the ultimate goal of all individuals and collective behaviours is survival, creatures cooperate and interact in groups, herds, schools, colonies, and flocks for several reasons: hunting, defending, navigating, and foraging. In order to mimic these characteristics of animals, swarm-intelligence based optimization algorithms are introduced.

For example – Ant Colony optimization, Cat Swarm Optimization, Particle Swarm optimization


A pathfinder simply is the individual which leads a swarm. This entity leads the swarm and this entity leads various acts. In addition, this entity takes the swarm to destinations including pastures, water and feeding areas. The group of animals frequently decide the movement between members via social order. Such animals may either have to decide with the leader or with no leader. Leadership however is temporary, with few people knowing the place, hunting area, route, etc.

Mathematical Model

The population basically follows the pathfinder for various activities. However, in order to do so, we need to specify the position of both the pathfinder and any arbitrary population member. The position of a member says Xi is defined as:

X_{i}^{K+1} = X_i^{K} + \alpha.r_1(X_j^K - X_i^K) +\beta.r_2(X_j^K - X_i^K) + \epsilon

Where Xi is the position vector of ith follower at k iteration, r1 and r2 are random variables uniformly generated in the range of [0,1], α is the coefficient for interaction and β is the coefficient of attraction. The value of α, ß are set in such a way that there is the perfect balance between interaction (i.e. the magnitude of movement of any member together with its neighbour) and attraction (i.e. the random distance for keeping the herd roughly with the leader). The optimum values for α, ß should be around 1. ε is the vector of vibration and it is defined as follows:

\epsilon = \bigg(1 - \frac{K}{K_{max}}\bigg). u_1.D_{ij}

where, D_{ij} = |X_i-X_j|    , u1 is random variable in range [-1,1]

The position of pathfinder is defined as:

X_p^{K+1} = X_p + 2r_3.(X_p^K-X_P^{K-1}) +A

Xp is the position vector of the pathfinder, K is the current iteration, r3 if a random variable in the range of [0,1], A is the vector of fluctuation rate. A is defined as follows:

A = u_2.e^{\frac{-2K}{K_{max}}}

where u2 is a random variable in the range [-1,1], Kmax is the maximum iteration.

ε, A can provide random movement (walk) for all members. Therefore setting different values for them ensures exploration and exploitation. The term \frac{K}{K_{max}}     in ε, A ensures exploration and exploitation phases of a metaheuristic technique. At first \frac{K}{K_{max}}    is very small, thereby resulting in rapid change constituting to exploration. Then at later stages, its value becomes eventually small or even zero, constituting exploitation.


  1. Define the parameters such as r1, r2, ε, A
  2. Initialize the population and calculate fitness for each member
  3. Set the best fitness value as the pathfinder
  4. while iteration condition is not met or till max iteration do
  5. Generate α, ß in range [0, 1]
  6. Using the pathfinder equation update the position of pathfinder
  7. If fitness of current pathfinder is better than old pathfinder Then
  8. Update fitness of the pathfinder
  9. For i=1 to population size
  10. Update position of followers using followers equation.
  11. Update fitness values of each member
  12. Find the best fitness
  13. If best fitness is better than old pathfinder Then
  14. Update fitness of the pathfinder
  15. For i=1 to population size
  16. If new fitness of the member is better than old fitness Then
  17. Update fitness of member
  18. Generate ε, A
  19. End

The best position and fitness is returned and can be used to solve optimization problems.


Last Updated : 06 Oct, 2021
Like Article
Save Article
Share your thoughts in the comments
Similar Reads