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
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