From 85d2dc7018bd8373dfee3ce885eebe148c361edf Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Tue, 27 Apr 2021 20:52:51 -0500 Subject: Change some stuff --- .vscode/launch.json | 16 +++++++++++++--- python/MCTS.py | 1 - python/alphaBeta.py | 4 ++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 61bf414..7fd8538 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -25,13 +25,23 @@ ], "console": "integratedTerminal" }, + { + "name": "MCTS 2", + "type": "python", + "request": "launch", + "program": "${workspaceFolder}/python/agent_MCTS.py", + "args": [ + "10002", + ], + "console": "integratedTerminal" + }, { "name": "Random", "type": "python", "request": "launch", "program": "${workspaceFolder}/python/dotsandboxes/dotsandboxesagent.py", "args": [ - "10002", + "10003", ], "console": "integratedTerminal" }, @@ -42,7 +52,7 @@ "request": "launch", "program": "${workspaceFolder}/python/agent_AB.py", "args": [ - "10003", + "10004", ], "console": "integratedTerminal" }, @@ -50,7 +60,7 @@ ], "compounds": [ { "name": "Basic Combination (TEST)", - "configurations": ["Server", "MCTS", "Random", "AB"] + "configurations": ["Server", "MCTS", "MCTS 2", "Random", "AB"] } ] } \ No newline at end of file diff --git a/python/MCTS.py b/python/MCTS.py index cf67f48..677d994 100644 --- a/python/MCTS.py +++ b/python/MCTS.py @@ -132,7 +132,6 @@ class MCTSGameController(GameController): def get_next_move(self, state, time_allowed=1.0): super(MCTSGameController, self).get_next_move(state) - # Create new tree (TODO: Preserve some state for better performance?) self.root_node = MCTSNode(state) iterations = 0 diff --git a/python/alphaBeta.py b/python/alphaBeta.py index 93c8b0b..fb89ab0 100644 --- a/python/alphaBeta.py +++ b/python/alphaBeta.py @@ -47,8 +47,8 @@ class AlphaBeta(object): for x in possiblemoves: if (x[0],x[1],x[2]) not in start.children: start.Make(x[0],x[1],x[2]) - if Ply_num < 2: - return (i, j) + # if Ply_num < 2: + # return (i, j) Minimum_Score = 1000 r = 0 -- cgit v1.2.3