Metadata-Version: 2.1
Name: plangym
Version: 0.0.9
Summary: Plangym is an interface to use OpenAI gym for planning problems. It extends the standard interface to allow setting and recovering the environment states.
Home-page: https://github.com/FragileTech/plangym
Author: Guillem Duran Ballester
Author-email: info@fragile.tech
License: MIT
Keywords: Machine learning,artificial intelligence
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Software Development :: Libraries
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy (>=1.16.2)
Requires-Dist: gym (<=0.17.3,>=0.10.9)
Requires-Dist: pillow-simd (>=7.0.0.post3)
Requires-Dist: opencv-python (>=4.2.0.32)
Provides-Extra: all
Requires-Dist: atari-py (==0.1.1) ; extra == 'all'
Requires-Dist: gym-retro (>=0.8.0) ; extra == 'all'
Requires-Dist: pytest (>=5.3.5) ; extra == 'all'
Requires-Dist: ray ; extra == 'all'
Requires-Dist: setproctitle ; extra == 'all'
Provides-Extra: atari
Requires-Dist: atari-py (==0.1.1) ; extra == 'atari'
Provides-Extra: ray
Requires-Dist: ray ; extra == 'ray'
Requires-Dist: setproctitle ; extra == 'ray'
Provides-Extra: retro
Requires-Dist: gym-retro (>=0.8.0) ; extra == 'retro'
Provides-Extra: test
Requires-Dist: pytest (>=5.3.5) ; extra == 'test'

# Plan gym

[![Documentation Status](https://readthedocs.org/projects/plangym/badge/?version=latest)](https://plangym.readthedocs.io/en/latest/?badge=latest)
[![Code coverage](https://codecov.io/github/FragileTech/plangym/coverage.svg)](https://codecov.io/github/FragileTech/plangym)
[![PyPI package](https://badgen.net/pypi/v/plangym)](https://pypi.org/project/plangym/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
[![license: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT)

`Plangym` is an interface to use OpenAI gym for planning problems. It extends the standard
 interface to allow setting and recovering the environment states.
 
Furthermore, it provides functionality for stepping the environments in parallel, and it is 
compatible with passing the parameters as vectors of steps and actions.

## Getting started

### Stepping a batch of states and actions
```python
from plangym import AtariEnvironment
env = AtariEnvironment(name="MsPacman-v0",
                       clone_seeds=True, autoreset=True)
state, obs = 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, infos = data
```
### Using parallel steps

```python
from plangym import AtariEnvironment, ParallelEnvironment
env = ParallelEnvironment(env_class=AtariEnvironment,
                          name="MsPacman-v0",
                          clone_seeds=True, autoreset=True,
                          blocking=False)

state, obs = 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, infos = data
```

## Installation 

``bash
pip3 install plangym
``

