fix bug for record the best genome.

This commit is contained in:
wls2002
2024-05-31 15:36:47 +08:00
parent 6aa9011043
commit 47b1cacb57
3 changed files with 8 additions and 8 deletions

View File

@@ -113,9 +113,6 @@ class DefaultSpecies(BaseSpecies):
return state.pop_nodes, state.pop_conns
def update_species(self, state, fitness):
# set nan to -inf
fitness = jnp.where(jnp.isnan(fitness), -jnp.inf, fitness)
# update the fitness of each species
state, species_fitness = self.update_species_fitness(state, fitness)