Skip to content

Instantly share code, notes, and snippets.

@davidADSP
Created December 1, 2019 18:11
Show Gist options
  • Save davidADSP/1d3f966ef87e5ec68d696fe70dc2d3a7 to your computer and use it in GitHub Desktop.
Save davidADSP/1d3f966ef87e5ec68d696fe70dc2d3a7 to your computer and use it in GitHub Desktop.
# Select the child with the highest UCB score.
def select_child(config: MuZeroConfig, node: Node,
min_max_stats: MinMaxStats):
_, action, child = max(
(ucb_score(config, node, child, min_max_stats), action,
child) for action, child in node.children.items())
return action, child
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment