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

Error when running LunarLander example - "Expected 8 inputs, got 2" #268

Closed
amirest123 opened this issue Jun 15, 2023 · 2 comments
Closed

Comments

@amirest123
Copy link

I'm trying to run the included LunarLander example, using the evolve.py file and the associated config file. I have not modified either of these files but receive this error. The config file is set to 8 input nodes so somewhere along the line that must be changed or overwritten by other code. I've come across others having the same issue but haven't found a solution. Any help would be massively appreciated, thanks.

@SoniaRaskolnikov
Copy link

SoniaRaskolnikov commented Jun 26, 2023

This seems to be caused by some changes in the OpenAI code that to have been addressed in PR #252, but for some reason, that PR's yet to be merged.

Quick Fix:
Replace line 89 & 200 of evolve.py with observation, info = env.reset() (to fix your error)
Replace line 100 & 218 of evolve.py with observation, reward, done, truncated, info = env.step(best_action) (to fix a similar error)

@amirest123
Copy link
Author

@SoniaRaskolnikov Thanks, that gets everything working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants