Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Feedback-and-Improvements/Chapter04/elitism.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def eaSimpleWithElitism(population, toolbox, cxpb, mutpb, ngen, stats=None,

# Update the hall of fame with the generated individuals
halloffame.update(offspring)
hof_size = len(halloffame)

# Replace the current population by the offspring
population[:] = offspring
Expand Down