Open artus-LYTiQ opened 5 years ago
@artus-LYTiQ that's entirely on me, the intended behavior is this:
if move in self.root.children:
self.root = self.root.children[move]
self.root.parent = None
else:
self.root = AlphaGoNode()
return move
as in: set root node to child corresponding to move or else reset. Apparently one very late night a few months ago I must have been under the impression that those statements are equivalent.
https://github.com/maxpumperla/deep_learning_and_the_game_of_go/blob/c1add1ff272f8927a82d81c9ee430f9c13e062ef/code/dlgo/agent/alphago.py#L118
Hi Max, hi Kevin,
What is the point of a) Creating a new Root node here and then also b) testing if the move is in root.children?
We have selected the move to be a child of the old root. Therefore, without creating a new empty node as root, the condition from line 119 would be met anyway. But then you create a new empty (?) node and assign it as root in 118. How can the test in 119 be successful then?
Can't wrap my head around it, sorry.
` move = max(self.root.children, key=lambda move: # <1> self.root.children.get(move).visit_count) # <1>