Skip to main content
. 2024 Jan 23;9(2):65. doi: 10.3390/biomimetics9020065
Algorithm 1. Pseudocode of POA.
Start POA.
1: Input problem information: variables, objective function, and constraints.
2: Set POA population size (N) and iterations (T).
3: Generate the initial population matrix at random using Equation (2). xi,dlbd+r·(ubdlbd).
4: Evaluate the objective function.
5: For t=1 to T
6: For i=1 to N
7: Phase 1: Predator attack towards pufferfish (exploration phase).
8: Determine the candidate pufferfish set for the ith POA member using Equation (4). CPiXki:Fki<Fi and kii.
9: Select the target pufferfish for the ith POA member at random.
10: Calculate new position of ith POA member using Equation (5). xi,dP1xi,d+r·SPi,dI·xi,d.
11: Update ith POA member using Equation (6). XiXiP1,  FiP1<Fi;Xi,  else.
12: Phase 2: Defense mechanism of pufferfish against predators (exploitation phase).
13: Calculate new position of ith POA member using Equation (7). xi,dP2xi,d+(12r)·ubdlbdt.
14: Update ith POA member using Equation (8). XiXiP2,  FiP2<Fi;Xi,  else.
15: end
16: Save the best candidate solution so far.
17: end
18: Output the best quasi-optimal solution obtained with the POA.
End POA.