Plangym is an open source Python library for developing and comparing planning algorithms by providing a standard API to communicate between algorithms and environments, as well as a standard set of environments compliant with that API.
Given that OpenAI's gym
has become the de-facto standard in the research community, plangym
's API
is designed to be as similar as possible to gym
's API while allowing to modify the environment state.
Furthermore, it provides additional functionality for stepping the environments in parallel, delayed environment
initialization for dealing with environments that are difficult to serialize, compatibility with gym.Wrappers
,
and more.
Plangym currently supports all the following environments:
- OpenAI gym classic control environments
- OpenAI gym Box2D environments
- OpenAI gym Atari 2600 environments
- Deepmind's dm_control environments
- Stable-retro environments
import plangym
env = plangym.make(name="CartPole-v0")
state, obs, info = env.reset()
state = state.copy()
action = env.action_space.sample()
data = env.step(state=state, action=action)
new_state, observ, reward, end, truncated, info = data
import plangym
env = plangym.make(name="CartPole-v0")
state, obs, info = env.reset()
states = [state.copy() for _ in range(10)]
actions = [env.action_space.sample() for _ in range(10)]
data = env.step_batch(states=states, actions=actions)
new_states, observs, rewards, ends, truncateds, infos = data
import plangym
env = plangym.make(name="MsPacman-v0", n_workers=2)
state, obs, info = env.reset()
states = [state.copy() for _ in range(10)]
actions = [env.action_space.sample() for _ in range(10)]
data = env.step_batch(states=states, actions=actions)
new_states, observs, rewards, ends, truncateds, infos = data
TODO: Meanwhile take a look at how we set up the repository in .github/workflows/push.yaml
.
Plangym is released under the MIT license.
Contributions are very welcome! Please check the contributing guidelines before opening a pull request.
If you have any suggestions for improvement, or you want to report a bug please open an issue.
sudo apt-get update sudo apt-get install build-essential clang sudo apt-get install libstdc++-10-dev
export CXX=g++ export CC=gcc
rye install nes-py --git=https://github.com/FragileTech/nes-py