Advertisement
Guest User

Untitled

a guest
Apr 29th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. rolloutTree :: GameState s a => Tree s a -> StdGen -> ([Tree s a], Outcome, StdGen)
  2. helper2 t@(Tree state action noVisits score children) gen acc = if ((outcome state) == Ongoing)
  3.                                                                 then (helper2 (children !! (mod (fst (next gen)) (length children))) (snd (next gen)) (t : acc))
  4.                                                                 else (acc, (outcome state), gen)
  5. rolloutTree t@(Tree state action noVisits score children) gen = helper2 t gen []
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement