Fix sign error.
Implement optimum with genotype diversity based on a grid.
Fix test optimum diversity.