Created
October 23, 2020 15:00
-
-
Save masouduut94/7f9113b51439d9184ae0d1b18403e857 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UctMctsAgent: | |
""" | |
Basic no frills implementation of an agent that preforms MCTS for hex. | |
Attributes: | |
root_state (GameState): Game simulator that helps us to | |
understand the game situation. | |
root (Node): Root of the tree search. | |
run_time (int): time per each run. | |
node_count (int): the whole nodes in tree. | |
num_rollouts (int): The number of rollouts for each search. | |
""" | |
def __init__(self, state=GameState(8)): | |
self.root_state = deepcopy(state) | |
self.root = Node() | |
self.run_time = 0 | |
self.node_count = 0 | |
self.num_rollouts = 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment