hr0nix / omega

A number of agents (PPO, MuZero) with a Perceiver-based NN architecture that can be trained to achieve goals in nethack/minihack environments.
GNU General Public License v3.0
36 stars 4 forks source link

Gym environment #12

Open ipsec opened 1 year ago

ipsec commented 1 year ago

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 commented 1 year ago

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.