Fix use of rand in MCTS