'Arguments:
value_fn -- a function that takes in a state and ouputs a score in [-1, 1], i.e. the
expected value of the end game score from the current player\'s perspective.
policy_fn -- a function that takes in a state and outputs a list of (action, probability)
tuples for the current player.
rollout_policy_fn -- a coarse, fast version of policy_fn used in the rollout phase.
lmbda -- controls the relative weight of the value network and fast rollout policy result
in determining the value of a leaf node. lmbda must be in [0, 1], where 0 means use only
the value network and 1 means use only the result from the rollout.
c_puct -- a number in (0, inf) that controls how quickly exploration converges to the
maximum-value policy, where a higher value means relying on the prior more, and
should be used only in conjunction with a large value for n_playout.'

def __init__(self, value_fn, policy_fn, rollout_policy_fn, lmbda=0.5, c_puct=5, rollout_limit=500, playout_depth=20, n_playout=10000):

    self._root = TreeNode(None, 1.0)
    self._value = value_fn
    self._policy = policy_fn
    self._rollout = rollout_policy_fn
    self._lmbda = lmbda
    self._c_puct = c_puct
    self._rollout_limit = rollout_limit
    self._L = playout_depth
    self._n_playout = n_playout
