maxpumperla / deep_learning_and_the_game_of_go

Code and other material for the book "Deep Learning and the Game of Go"
https://www.manning.com/books/deep-learning-and-the-game-of-go
953 stars 387 forks source link

Shouldn't the condition to continuing with MCTS be if you CAN add a child? #37

Closed fredthedead closed 4 years ago

fredthedead commented 5 years ago

https://github.com/maxpumperla/deep_learning_and_the_game_of_go/blob/bff1d265c6a6faed076e42f84f5f87b12b129d5e/code/dlgo/mcts/mcts.py#L101

So while (node.can_add_child()) and (not node.is_terminal()): instead

maxpumperla commented 5 years ago

hmm, that looks indeed wrong. @macfergus am I missing something here?

maxpumperla commented 4 years ago

@fredthedead sorry it took so long to reply again. I just needed parts of this algorithm somewhere else and validated it. The version in the book is correct. If you're at a node that has been fully explored, i.e. there are no unvisited children left, you choose the next move according to UCT.

I understand why this may look counter-intuitive, but that's really how it's supposed to be.