Projects STRLCPY geneva Commits 2fc5b2f2
🤬
  • Fixed bug that caused population to shrink in some cases

    Population would shrink when --elite-clones was used; fixed.
  • Loading...
  • Kevin Bock committed with GitHub 2 years ago
    2fc5b2f2
    1 parent 36d35855
  • ■ ■ ■ ■
    evolve.py
    skipped 574 lines
    575 575   best_ind.environment_id, str(best_fit), str(best_ind))
    576 576   
    577 577   # Select next generation
    578  - population = selection_tournament(offspring, k=len(population) - options["elite_clones"], tournsize=10)
     578 + population = selection_tournament(offspring, k=len(offspring) - options["elite_clones"], tournsize=10)
    579 579   
    580 580   # Add the elite clones
    581 581   if options["elite_clones"] > 0:
    skipped 255 lines
Please wait...
Page is in error, reload to recover