Open JonyEpsilon opened 10 years ago
This is going to be be difficult to make work with multi-core operation.
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.
Will probably need to switch all of the random calls. Not sure how this will work with multi-threading.