Closed JacobWoolbright closed 2 years ago
yeah, same problem
This is due to the lines:
gdmean = mean(distances.distances.values())
and
gdstdev = stdev(distances.distances.values())
in the species.py file.
But it is not big bug ;) The program wants to count the mean distance and mean deviation from a sequence of zero-length numbers. This is logical when there is only one genome, because to whom this genetic distance would be counted ;).
There are two solutions:
comment out this part in species.py.
gdmean = mean(distances.distances.values()) gdstdev = stdev(distances.distances.values()) self.reporters.info( 'Mean genetic distance {0:.3f}, standard deviation {1:.3f}'.format(gdmean, gdstdev))
OR add an appropriate exception to mean and stdev in math_util.py. Somethink like: 'if not values: return 0'
When the population size of my model is set to 1, I receive a division by 0 error, when set to a number > 1, I don't get the error. I found a stack overflow page relating to this, but there was no solution.
Here is some of my code: config file (the portion that matters):
eval/fitness function:
If you have a solution or need more code, please say so!