def step(self):
n = len(self.agents)
fits = self.get_fitnesses()
---
# see who dies
index_dead = self.choose_dead(fits)
num_dead = len(index_dead)
---
# replace the dead with copies of the living
replacements = self.choose_replacements(num_dead, fits)
self.agents[index_dead] = replacements
---
# update any instruments
self.update_instruments()