Ejemplo n.º 1
0
def test_backprop_root_visited(tree: mcts.Node):
    state = mcts.State()
    root = tree(state, 5)
    mcts.backprop(5, root.children[0].children[0])
    assert root.visited == 1
Ejemplo n.º 2
0
def test_backprop_node1_value(tree: mcts.Node):
    state = mcts.State()
    root = tree(state, 5)
    mcts.backprop(5, root.children[0].children[0])
    assert root.children[0].value == 5