Guest User

Untitled

a guest
Jul 16th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. if(bestIndividual == null) {
  2. bestIndividual = pop.getBestIndividual();
  3. bestFitGeneration = generation;
  4.  
  5. }
  6. else if(pop.getBestFit() < bestIndividual.fitness()){
  7. bestIndividual = pop.getBestIndividual();
  8. bestFitGeneration = generation;
  9. }
  10. if(worstIndividual == null) {
  11. worstIndividual = pop.getWorstIndividual();
  12. worstFitGeneration = generation;
  13.  
  14.  
  15. }
  16. else if(pop.getWorstFit()> worstIndividual.fitness()){
  17. worstIndividual = pop.getWorstIndividual();
  18. worstFitGeneration = generation;
  19. }
Add Comment
Please, Sign In to add comment