(1) Begin |
(2) Generate initial population Pop randomly |
(3) Evaluate each habitat |
(4) While the halting criteria are not satisfied do |
(5) Sort habitats from best to worst based on the fitness values |
(6) Map the fitness value to the number of spices |
(7) Calculate the emigration rate and immigration rate of each habitat |
(8) For to NP /* migration stage */ |
(9) Select based on immigration rate |
(10) Generate two different integers randomly between 1 and NP |
(11) If is selected |
(12) For to NP |
(13) Select based on emigration rate |
(14) If |
(15) |
(16) End If |
(17) EndFor |
(18) EndIf |
(19) EndFor /* end of migration stage */ |
(20) For to NP /* mutation stage */ |
(21) Compute the probability |
(22) Select based on |
(23) If |
(24) |
(25) EndIf |
(26) EndFor /* end of mutation stage */ |
(27) Make sure each habitat legal based on boundary constraints |
(28) Evaluate each newly generated habitat |
(29) For to NP /* selection stage */ |
(30) If |
(31) Reserve in the next population |
(32) Else |
(33) Reserve in the next population |
(34) EndIf |
(35) EndFor /* end of selection stage */ |
(36) Input: parameters and /* QOX search stage */ |
(37) Select fulfilling formula (2) |
(38) Randomly select two habitats from the population |
(39) Quantize the domain defined by the two habitats into levels |
(40) Randomly generate − 1 different integers between 1 and dimension |
(41) Divide -dimension habitat vector into factors |
(42) Apply to generate potential offspring |
(43) Evaluate potential offspring |
(44) Select two best habitats to replace habitat |
(45) Output: two best habitats /* end of QOX search stage */ |
(46) EndWhile |
(47) End |