Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BoltzmannSelector produces [NaN] probability array #39

Closed
jenetics opened this issue Jun 25, 2015 · 1 comment
Closed

BoltzmannSelector produces [NaN] probability array #39

jenetics opened this issue Jun 25, 2015 · 1 comment
Assignees
Labels
Milestone

Comments

@jenetics
Copy link
Owner

For some configuration values and fitness values the BoltzmannSelector.probabilities returns a [NaN] array.

@jenetics jenetics added the bug label Jun 25, 2015
@jenetics jenetics self-assigned this Jun 25, 2015
@jenetics jenetics added this to the v3.2.0 milestone Jun 25, 2015
@jenetics jenetics changed the title BoltzmanaSelector produces [Nan] probability array BoltzmannSelector produces [NaN] probability array Jun 25, 2015
@jenetics
Copy link
Owner Author

The specific error occurs if all the fitness values are zero. The general problem is if the maximal fitness value is zero. In this case the BoltzmannSelector will perform a division by zero.

jenetics added a commit that referenced this issue Jun 25, 2015
This method will check if all probabilites are finite. If not, all probability values will be set to the same value.
jenetics added a commit that referenced this issue Jul 8, 2015
Unify pre- and post-condition checks.
@jenetics jenetics closed this as completed Jul 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant