| Algorithm 1. contains the detailed algorithm for the proposed GTO | |
| Algorithm for the proposed GTO | |
| 1 | for all Gorilla Oi do |
| 2 | Alter the gorilla location by Equation (1) |
| 3 | Use the sigmoid function to turn the gorilla location into a probability value |
| 4 | Using Equation (6), for compute the candidate gorilla position in the discrete domain |
| 5 | end for |
| 6 | for I = 1to N do |
| 7 | Compute OF of each candidate gorilla (Gi) |
| 8 | If Gi is fitter than Oi, replace it, |
| 9 | end for |
| 10 | Set the best location as the Silverback |
| 11 | for all Gorilla Oi do |
| 12 | if D ≥ W then |
| 13 | Using Equation (7) for changing the Gorilla’s location |
| 14 | Else |
| 15 | Using Equation (6) for changing the Gorilla’s location |
| 16 | end if |
| 17 | end for |
| 18 | for I = 1to N do |
| 19 | Compute OF of each candidate gorilla (Gi) |
| 20 | Replace Oi if Gi is more appropriate, where G is the candidate Gorilla location |
| 21 | end for |
| 22 | Set best location as the Silverback |
| 23 | end for |