Guest User

Untitled

a guest
Mar 13th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. Create an initial population randomly of size p
  2. Calculate the fitness
  3. Pick p/2 random individuals to the parents
  4. While counter < p/2
  5. pick parent1 and parent2 by tournament selection
  6. child1, child2 = mutate and crossover parent1 and parent2
  7. add child1 and child2 to new population
  8. pick p/2 distinct individuals from initial population and store in new population
Add Comment
Please, Sign In to add comment