| Algorithm 5 Selection | |
| Input | Population, crossover population |
| Output | the better solution |
| 1 | Initial Psnull |
| 2 | Calculate the fitness of all individuals in the population |
| 3 | if < then |
| 4 | |
| 5 | else |
| 6 | |
| 7 | end if |
| 8 | return the better solution |
| Algorithm 5 Selection | |
| Input | Population, crossover population |
| Output | the better solution |
| 1 | Initial Psnull |
| 2 | Calculate the fitness of all individuals in the population |
| 3 | if < then |
| 4 | |
| 5 | else |
| 6 | |
| 7 | end if |
| 8 | return the better solution |