| | Step 1: assign grey wolf population Xk (k = 1, 2, …, N); N = no of generators |
| | Step 2: initialize a, A, and C |
| | Step 3: compute the objective function values for each search agent |
| | Step 4: find all solutions and initializ the best solution with them |
| | Step 5: Xα = select first leader (archive) |
| | Xβ = select second leader (archive) |
| | Xδ = select third leader (archive) |
| | z = 1; |
| | Step 6: while (z < Max iterations) |
| | Step 7: for every variable |
| | Update position of present search solution by equations (8)–(13) |
| | end for |
| | Step 8: modernize a, A, and C |
| | Compute fitness values of every solution |
| | Then find other solutions |
| | Update the solution with reference to best solutions |
| | Step 9: If particle checking is full |
| | Run the grid mechanism to omit one of the present archive members |
| | Add the new solution to the archive end if |
| | Step 10: If any new added solutions to the best solution are located shell to a hypercube |
| | Update the population with other new solution(s) end if |
| | Step 11: Xα = select leader (archive) |
| | Exclude alpha from the archive temporarily to avoid selecting the same leader |
| | Xβ = select leader (archive) |
| | Exclude beta from the archive temporarily to avoid selecting the same leader |
| | Xδ = select leader (archive) |
| | Add back alpha and beta to the archive |
| | t = t + 1 |
| | end while |
| | Step 12: return archive |