Fix division by 0 when grid is full
Created by: Lookatator
Hi,
we noticed that when the grid was full, there was a division by 0 in the sampling function of the repertoire, which lead to inconsistencies when sampling individuals.
grid_empty = self.fitnesses == -jnp.inf
p = (1.0 - grid_empty) / jnp.sum(grid_empty)
This pull request aims at solving that issue.
Best regards,