Package: plangym
Welcome to PlangymPlangym 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'sgymhas become the de-facto standard in the research community,plangym's API
is designed to be as similar as possible togym'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 withgym.Wrappers,
and more.Supported environmentsPlangym currently supports all the following environments:OpenAI gym classic control environmentsOpenAI gym Box2D environmentsOpenAI gym Atari 2600 environmentsDeepmind's dm_control environmentsStable-retro environmentsGetting startedStepping an environmentimportplangymenv=plangym.make(name="CartPole-v0")state,obs=env.reset()state=state.copy()action=env.action_space.sample()data=env.step(state=state,action=action)new_state,observ,reward,end,info=dataStepping a batch of states and actionsimportplangymenv=plangym.make(name="CartPole-v0")state,obs=env.reset()states=[state.copy()for_inrange(10)]actions=[env.action_space.sample()for_inrange(10)]data=env.step_batch(states=states,actions=actions)new_states,observs,rewards,ends,infos=dataUsing parallel stepsimportplangymenv=plangym.make(name="MsPacman-v0",n_workers=2)state,obs=env.reset()states=[state.copy()for_inrange(10)]actions=[env.action_space.sample()for_inrange(10)]data=env.step_batch(states=states,actions=actions)new_states,observs,rewards,ends,infos=dataInstallationPlangym is tested on Ubuntu 20.04 and Ubuntu 21.04 for python versions 3.7 and 3.8.Installing it with Python 3.6 will break AtariEnv, and RetroEnv does not support
python 3.9 yet.Installing from PipAssuming that the environment libraries that you want to use are already installed, you can
install plangym from pip running:pip3installplangymInstalling from sourceIf you also want to install the environment libraries, first clone the repository:gitclonegit@github.com:FragileTech/plangym.gitcdplangymInstall the system dependencies by runningsudoapt-getinstall-y--no-install-suggests--no-install-recommendslibglfw3libglew-devlibgl1-mesa-glxlibosmesa6xvfbswigTo install MuJoCo, run:makeinstall-mujocoFinally, install the project requirements and plangym.pipinstall-rrequirements.txt
pipinstall.RoadmapThis is a summary of the incoming improvements to the project:Improved documentation:Adding specific tutorials for all the different types of supported environments.Adding a developer guide section for incorporating new environments to plangym.Improving the library docstrings with more examples and detailed information.Better gym integration:Registering all of plangym environments in gym under a namespace.Offering more control over how the states are passed tostep,resetandstep_batch.Allowing to return the states inside the info dictionary.Adding new environments to plangym, such as:Gym mujocoGym roboticsGym-pybullet-dronesSupport for rendering in notebooks that are running on headless machines.LicensePlangym is released under theMITlicense.ContributingContributions are very welcome! Please check thecontributing guidelinesbefore opening a pull request.If you have any suggestions for improvement, or you want to report a bug please open
anissue.