From 764f7fb5f116c0915767214c06fd2f4887b1ce77 Mon Sep 17 00:00:00 2001 From: Dong Yan Date: Fri, 23 Feb 2018 23:15:04 +0800 Subject: [PATCH] minor fix of play.py --- AlphaGo/play.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/AlphaGo/play.py b/AlphaGo/play.py index 22d4422..f6740ca 100644 --- a/AlphaGo/play.py +++ b/AlphaGo/play.py @@ -29,12 +29,12 @@ def play(engine, data_path): size = {"go": 9, "reversi": 8} show = ['.', 'X', 'O'] - evaluate_rounds = 5 + evaluate_rounds = 0 game_num = 0 total = 0 f=open('time.txt','w') - #while True: - while game_num < evaluate_rounds: + while True: + #while game_num < evaluate_rounds: start = time.time() engine._game.model.check_latest_model() num = 0 @@ -85,6 +85,7 @@ def play(engine, data_path): this_time = time.time() - start total += this_time f.write('time:'+ str(this_time)+'\n') + evaluate_rounds += 1 f.write('Avg time:' + str(total/evaluate_rounds)) f.close()