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

Ability to seed random number generator #6

Open
JonyEpsilon opened this issue Sep 15, 2014 · 2 comments
Open

Ability to seed random number generator #6

JonyEpsilon opened this issue Sep 15, 2014 · 2 comments

Comments

@JonyEpsilon
Copy link
Owner

Will probably need to switch all of the random calls. Not sure how this will work with multi-threading.

@JonyEpsilon
Copy link
Owner Author

This is going to be be difficult to make work with multi-core operation.

@JonyEpsilon
Copy link
Owner Author

Need to figure out a way to do this, at least in test fixtures, as it's painful having to track down bugs by hand. A fallback option would be to feed the random numbers into the functions that need them:

(defn crossover-internal [expr1 expr1 p1 p2] ...)

(defn crossover [expr1 expr2]
  (crossover-internal expr1 expr1 (rand (size expr1)) (rand (size expr2))))

At least, then, crossover-internal would be testable.

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

No branches or pull requests

1 participant