Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Commit

Permalink
import sys. Fixes #55
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksona committed Feb 5, 2018
1 parent 9905f5e commit 14f64b1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion selfplay_mcts.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@
import time
import numpy as np
import random
import sys

import coords
import go
from gtp_wrapper import MCTSPlayer

SIMULTANEOUS_LEAVES = 8


def play(network, readouts, resign_threshold, verbosity=0):
''' Plays out a self-play match, returning
- the final position
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 14f64b1

Please sign in to comment.