This readme walks you through all steps to run an external gym environment. The example will use this repository gym-sokoban as this is part of this repository, but never the less this works similar with other external gym environments.
You need to clone the repository and install the package as follows:
git clone [email protected]:mpSchrader/gym-sokoban.git
cd gym-sokoban
pip install -e .
To use an external gym environment you allways need to import the corresponding package along with the regular gym package.
import gym
import gym_sokoban
From now on everything is as you are used to it. You can simply make the environment, render it, perform actions and so on.
env = gym.make('Sokoban-v0')
env.render(mode='human')
action = env.action_space.sample()
observation, reward, done, info = env.step(action)
Now that you are all set with the preparations enjoy the external environment.