From 8774432f5b7e87fc9647c97022d38673f66a8b2f Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Mon, 26 Apr 2021 14:44:57 -0500 Subject: Add debug configs, --- python/MCTS.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'python/MCTS.py') 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(): -- cgit v1.2.3