Skip to content

Fix misuse of Math.random() in NEAT Crossover#183

Merged
jeffheaton merged 1 commit into
jeffheaton:masterfrom
JayH5:random-fix
Sep 23, 2014
Merged

Fix misuse of Math.random() in NEAT Crossover#183
jeffheaton merged 1 commit into
jeffheaton:masterfrom
JayH5:random-fix

Conversation

@JayH5

@JayH5 JayH5 commented Sep 22, 2014

Copy link
Copy Markdown
Contributor
  • Math.random() returns a number in the range [0.0, 1.0) so the "mom"
    genome will always be picked
  • A random number generator is readily available so make use of that
    rather than Math.random()

* Math.random() returns a number in the range [0.0, 1.0) so the "mom"
  genome will always be picked
* A random number generator is readily available so make use of that
  rather than Math.random()
@jeffheaton

Copy link
Copy Markdown
Owner

Good catch, thanks!

jeffheaton added a commit that referenced this pull request Sep 23, 2014
Fix misuse of Math.random() in NEAT Crossover
@jeffheaton jeffheaton merged commit 483930d into jeffheaton:master Sep 23, 2014
@JayH5 JayH5 deleted the random-fix branch September 23, 2014 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants