Tianshou/AlphaGo/test.py

15 lines
296 B
Python
Raw Normal View History

2017-12-07 17:51:58 +08:00
import sys
2017-11-20 12:44:29 +08:00
from game import Game
from engine import GTPEngine
2017-11-28 01:15:46 +08:00
import utils
2017-11-20 12:44:29 +08:00
2017-12-07 17:51:58 +08:00
game = Game()
engine = GTPEngine(game_obj=game, name='tianshou')
cmd = raw_input
2017-12-05 23:17:20 +08:00
2017-12-07 17:51:58 +08:00
while not engine.disconnect:
command = cmd()
result = engine.run_cmd(command)
sys.stdout.write(result)
sys.stdout.flush()