Open pocca2048 opened 3 years ago
found out this https://github.com/maxpumperla/deep_learning_and_the_game_of_go/issues/42 so closing it
This code is wrong either:
if move in self.root.children:
self.root = self.root.children[move]
self.root.parent = None
else:
self.root = AlphaGoNode()
return move
since else is never executed and self.root
cannot reflect opponent's move so that it eventually makes illegal moves.
To solve this, there are two choices:
self.root = AlphaGoNode()
no matter what.def reflect_move(self, move):
if move in self.root.children:
self.root = self.root.children[move]
self.root.parent = None
else:
self.root = AlphaGoNode()
Please let me know if I'm wrong.
Hi! I am reading your book and I think I found an error in Ch 13.
Why do you reset
self.root
here https://github.com/maxpumperla/deep_learning_and_the_game_of_go/blob/50aa0ce1cd1e638c62c5ddd6ee602db3b1c23d47/code/dlgo/agent/alphago.py#L118before referencing it below? https://github.com/maxpumperla/deep_learning_and_the_game_of_go/blob/50aa0ce1cd1e638c62c5ddd6ee602db3b1c23d47/code/dlgo/agent/alphago.py#L119
I don't know what was the intention of it but I believe this would be wrong since that will never be executed.