| Algorithm 1. Standard flower pollination algorithm. |
| 1: Define the objective function 2: Initialize a population of n flowers/pollen gametes with random solutions 3: Evaluate each flower or solution in the population 4: Extract the best solution in the population 5: Find the best solution in the initial population 6: Define a switch probability 7: Define fixed number of iterations 8: While 9: for i = 1:n (each flower in the population) 10: if (rand < p) 11: Draw a (d-dimensional) step vector L which obeys a Lévy distribution 12: Global pollination via 13: else 14: Draw from a uniform distribution in [0, 1] 15: Do local pollination via 16: end if 17: Evaluate each new solution 18: If new solution is better, update it in the population 19: end for 20: Find the current best solution 21: end While 22: Output the best solution found |