Skip to content

Commit 64bdc3f

Browse files
authored
Merge pull request #75 from burtenshaw/fix/atari-example
Fix atari example script
2 parents e3fa4f0 + f70609a commit 64bdc3f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/atari_simple.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def main():
2424
"""Run a simple Atari episode."""
2525
# Connect to the Atari environment server
2626
print("Connecting to Atari environment...")
27-
env = AtariEnv(base_url="http://localhost:8000")
27+
env = AtariEnv.from_docker_image("ghcr.io/meta-pytorch/openenv-atari-env:latest")
2828

2929
try:
3030
# Reset the environment
@@ -42,7 +42,8 @@ def main():
4242
for step in range(100):
4343
# Random action
4444
action_id = np.random.choice(result.observation.legal_actions)
45-
45+
action_id = int(action_id)
46+
4647
# Take action
4748
result = env.step(AtariAction(action_id=action_id))
4849

0 commit comments

Comments
 (0)