minor fix of play.py
This commit is contained in:
parent
a0849fa213
commit
764f7fb5f1
@ -29,12 +29,12 @@ def play(engine, data_path):
|
|||||||
size = {"go": 9, "reversi": 8}
|
size = {"go": 9, "reversi": 8}
|
||||||
show = ['.', 'X', 'O']
|
show = ['.', 'X', 'O']
|
||||||
|
|
||||||
evaluate_rounds = 5
|
evaluate_rounds = 0
|
||||||
game_num = 0
|
game_num = 0
|
||||||
total = 0
|
total = 0
|
||||||
f=open('time.txt','w')
|
f=open('time.txt','w')
|
||||||
#while True:
|
while True:
|
||||||
while game_num < evaluate_rounds:
|
#while game_num < evaluate_rounds:
|
||||||
start = time.time()
|
start = time.time()
|
||||||
engine._game.model.check_latest_model()
|
engine._game.model.check_latest_model()
|
||||||
num = 0
|
num = 0
|
||||||
@ -85,6 +85,7 @@ def play(engine, data_path):
|
|||||||
this_time = time.time() - start
|
this_time = time.time() - start
|
||||||
total += this_time
|
total += this_time
|
||||||
f.write('time:'+ str(this_time)+'\n')
|
f.write('time:'+ str(this_time)+'\n')
|
||||||
|
evaluate_rounds += 1
|
||||||
f.write('Avg time:' + str(total/evaluate_rounds))
|
f.write('Avg time:' + str(total/evaluate_rounds))
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user