'Run a single playout from the root to the given depth, getting a value at the leaf and
propagating it back through its parents. State is modified in-place, so a copy must be
provided.
Arguments:
state -- a copy of the state.
leaf_depth -- after this many moves, leaves are evaluated.
Returns:
None'

def _playout(self, state, leaf_depth):

    node = self._root
    for i in range(leaf_depth):
        if node.is_leaf():
            action_probs = self._policy(state)
            if (len(action_probs) == 0):
                break
            node.expand(action_probs)
        (action, node) = node.select()
        state.do_move(action)
    v = (self._value(state) if (self._lmbda < 1) else 0)
    z = (self._evaluate_rollout(state, self._rollout_limit) if (self._lmbda > 0) else 0)
    leaf_value = (((1 - self._lmbda) * v) + (self._lmbda * z))
    node.update_recursive(leaf_value, self._c_puct)
