aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.vscode/launch.json16
-rw-r--r--python/MCTS.py1
-rw-r--r--python/alphaBeta.py4
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
@@ -26,12 +26,22 @@
"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