junxiaosong / AlphaZero_Gomoku

An implementation of the AlphaZero algorithm for Gomoku (also called Gobang or Five in a Row)
MIT License
3.27k stars 964 forks source link

Why -leaf_value at mcts_alphaZero.py line 66? #30

Closed wmpeng closed 6 years ago

wmpeng commented 6 years ago
    def update_recursive(self, leaf_value):
        """Like a call to update(), but applied recursively for all ancestors.
        """
        # If it is not root, this node's parent should be updated first.
        if self._parent:
            self._parent.update_recursive(-leaf_value)
        self.update(leaf_value)
junxiaosong commented 6 years ago

You may refer to issue #25

wmpeng commented 6 years ago

@junxiaosong
thanks a lot