Skip to content

Commit

Permalink
fix save in demo
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangming committed Nov 6, 2021
1 parent 7052cb8 commit 9999f7c
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions gobigger/bin/demo_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ def demo_bot():
time_get_clip = 0
time_cvt = 0
time_overlap = 0
total_obs = []
for i in range(100000):
t1 = time.time()
obs = server.obs()
Expand All @@ -127,13 +126,10 @@ def demo_bot():
time_step += tmp_step
logging.debug('{} {:.4f} obs: {:.3f} / {:.3f}, step: {:.3f} / {:.3f}'\
.format(i, server.last_time, tmp_obs, time_obs/(i+1), tmp_step, time_step/(i+1)))
total_obs.append(obs)
if finish_flag:
logging.debug('Game Over')
break
server.close()
with open('obs.pkl', 'wb') as f:
pickle.dump(total_obs, f)


if __name__ == '__main__':
Expand Down

0 comments on commit 9999f7c

Please sign in to comment.