| Algorithm 4 Pseudocode of AO. |
| 1: Initialization part. |
| 2: Set up parameters of AO algorithm. |
| 3: Initialize population in a random way . |
| 4: Iterative part. |
| 5: for do |
| 6: Determine values of the fitness function F for each agent in the population. |
| 7: Establish the best solution in the population. |
| 8: for do |
| 9: Calculate mean solution in the population. |
| 10: Improve parameters of the algorithm. |
| 11: if then |
| 12: if then |
| 13: Perform step expanded exploration (17) by updating solution . |
| 14: In the result solution is obtained. |
| 15: if then make substitution |
| 16: end if |
| 17: if then make substitution |
| 18: end if |
| 19: else |
| 20: Perform step narrowed exploration (19) by updating solution . |
| 21: In the result solution is obtained. |
| 22: if then make substitution . |
| 23: end if |
| 24: if then make substitution . |
| 25: end if |
| 26: end if |
| 27: else |
| 28: if then |
| 29: Perform step Expanded exploitation (23) by updating solution . |
| 30: In the result solution is obtained. |
| 31: if then make substitution . |
| 32: end if |
| 33: if then make substitution . |
| 34: end if |
| 35: else |
| 36: Perform step narrowed exploitation (24) by updating solution . |
| 37: In the result solution is obtained. |
| 38: if then make substitution . |
| 39: end if |
| 40: if then make substitution . |
| 41: end if |
| 42: end if |
| 43: end if |
| 44: end for |
| 45: end for |
| 46: return . |