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

Gym environment #12

Open
ipsec opened this issue Aug 3, 2022 · 1 comment
Open

Gym environment #12

ipsec opened this issue Aug 3, 2022 · 1 comment

Comments

@ipsec
Copy link

ipsec commented Aug 3, 2022

Hi,

Congrats by this muzero implementation.

How can I run a gym environment using your code? It's possible?
Or need I to convert my environment to be nle compatible?

Thanks in advanced.

@hr0nix
Copy link
Owner

hr0nix commented Aug 3, 2022

Hello!

Running this MuZero implementation on an arbitrary gym environment is possible, but will require some code changes.

First, you would need to change make_env function in tools/agent.py to instantiate your environment of interest (currently this function is a bit NLE/Minihack specific).

Second, you would need to implement a state encoder for the observations in that environment, analogous to PerceiverNethackStateEncoder to replace the state encoder in NethackPerceiverMuZeroModel.

I think that should do the job, but you might stumble upon some other small quirks as this codebase has never been tested with environments incompatible with NLE.

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