Skip to content

Commit

Permalink
Remove env.window.closed and force version >= 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lcswillems committed May 2, 2023
1 parent 1e6dc8b commit 317da04
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
torch-ac>=1.4.0
minigrid
minigrid>=2.2.0
tensorboardX>=1.6
numpy>=1.3
gymnasium>=0.26
5 changes: 1 addition & 4 deletions scripts/visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,9 @@
done = terminated | truncated
agent.analyze_feedback(reward, done)

if done or env.window.closed:
if done:
break

if env.window.closed:
break

if args.gif:
print("Saving gif... ", end="")
write_gif(numpy.array(frames), args.gif+".gif", fps=1/args.pause)
Expand Down

0 comments on commit 317da04

Please sign in to comment.