aboutsummaryrefslogtreecommitdiffstats
path: root/python/MCTS.py
diff options
context:
space:
mode:
authorMatt Strapp <strap012@umn.edu>2021-04-26 14:44:57 -0500
committerMatt Strapp <strap012@umn.edu>2021-04-26 15:03:24 -0500
commit8774432f5b7e87fc9647c97022d38673f66a8b2f (patch)
tree6b93db7fc54391d79a60d3ac9ed2662e1a2b5b3c /python/MCTS.py
parentRebase newer branch (diff)
downloadcsci4511w-8774432f5b7e87fc9647c97022d38673f66a8b2f.tar
csci4511w-8774432f5b7e87fc9647c97022d38673f66a8b2f.tar.gz
csci4511w-8774432f5b7e87fc9647c97022d38673f66a8b2f.tar.bz2
csci4511w-8774432f5b7e87fc9647c97022d38673f66a8b2f.tar.lz
csci4511w-8774432f5b7e87fc9647c97022d38673f66a8b2f.tar.xz
csci4511w-8774432f5b7e87fc9647c97022d38673f66a8b2f.tar.zst
csci4511w-8774432f5b7e87fc9647c97022d38673f66a8b2f.zip
Add debug configs,
Diffstat (limited to 'python/MCTS.py')
-rw-r--r--python/MCTS.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/python/MCTS.py b/python/MCTS.py
index a65e2d4..6c71ba9 100644
--- a/python/MCTS.py
+++ b/python/MCTS.py
@@ -1,6 +1,6 @@
import math
from copy import deepcopy
-from time import clock
+from time import perf_counter
from random import choice
from GameState import GameState
@@ -135,8 +135,8 @@ class MCTSGameController(GameController):
self.root_node = MCTSNode(state)
iterations = 0
- start_time = clock()
- while clock() < start_time + time_allowed:
+ start_time = perf_counter()
+ while perf_counter() < start_time + time_allowed:
node = self.select()
if node.pending_moves != set():