Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] "Basic usage" documentation incorrect/incomplete #735

Closed
1 task done
smarianimore opened this issue Oct 9, 2023 · 2 comments
Closed
1 task done

[Bug Report] "Basic usage" documentation incorrect/incomplete #735

smarianimore opened this issue Oct 9, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@smarianimore
Copy link

Describe the bug

Reproduce:

  1. Copy code here
  2. pip install gymnasium
  3. execute code

Expectation: see "lunar lander" screen appear and game playing randomly

Actual: error in missing dependency from box2d

Weird fact 1: error messages refer to "bipedal walker" env (unrelated to lunar lander from user perspective)

Solution:

  1. pip install swig
  2. pip install gymnasium[box2d]

Weird fact 2: I came up with solution 1 because trying to do 2 directly resulting in error "failed building wheel" and had to google search solution cause no error message pointed to missing dependency from swig package

Suggestion: either fix gymnasium check to avoid checking envs the user is not using or improve documentation here

Code example

import gymnasium as gym
env = gym.make("LunarLander-v2", render_mode="human")
observation, info = env.reset()

for _ in range(1000):
    action = env.action_space.sample()  # agent policy that uses the observation and info
    observation, reward, terminated, truncated, info = env.step(action)

    if terminated or truncated:
        observation, info = env.reset()

env.close()

System info

  • gymnasium version 0.29.1 installed via pip for Python 3.11
  • OS: Ubuntu 22.04.2
  • Python 3.11

Additional context

Code example taken from official documentation, here

Checklist

  • I have checked that there is no similar issue in the repo
@smarianimore smarianimore added the bug Something isn't working label Oct 9, 2023
@pseudo-rnd-thoughts
Copy link
Member

Thanks for pointing that out, I will see if we can update the basic usage page to make this more clear

@smarianimore
Copy link
Author

feel free to ask for a pull request if that's the intended behaviour and thus updating the doc pages is all that's needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants