
11 Jul
2017
11 Jul
'17
9:11 p.m.
I'm trying to parallelize a Monte Carlo backtracking search algorithm. The trick is that my algorithm is expressed in a State monad, because I need to hold a StdGen as well as keep several records of computations and metrics. So I know that if I'm going to run a State computation in several parallel lines of execution, I need to conceive of a way to split the state and later recombine it. Here is a simple example I came up with. I have no idea if I'm doing this in a good way, so any comments are welcome. http://lpaste.net/356879 D