From 14f64b1d820162dc474d8b649723c2e86fd2d1eb Mon Sep 17 00:00:00 2001 From: jacksona Date: Mon, 5 Feb 2018 10:32:01 -0800 Subject: [PATCH] import sys. Fixes #55 --- selfplay_mcts.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/selfplay_mcts.py b/selfplay_mcts.py index e10550bcb..42357a27b 100644 --- a/selfplay_mcts.py +++ b/selfplay_mcts.py @@ -16,6 +16,7 @@ import time import numpy as np import random +import sys import coords import go @@ -23,6 +24,7 @@ SIMULTANEOUS_LEAVES = 8 + def play(network, readouts, resign_threshold, verbosity=0): ''' Plays out a self-play match, returning - the final position @@ -60,7 +62,8 @@ def play(network, readouts, resign_threshold, verbosity=0): print(player.root.describe()) if player.should_resign(): - player.set_result(-1 * player.root.position.to_play, was_resign=True) + player.set_result(-1 * player.root.position.to_play, + was_resign=True) break move = player.pick_move() player.play_move(move)