Run OpenAI Gym environments on an external process or remote machine using gRPC.
Project description
Run OpenAI Gym environments on an external process or remote machine using gRPC.
Installation
Install Gym (not required if using Docker) and run:
pip install gymx
It is recommended to use a virtual environment.
Usage
Server
To start the server run:
python -m gymx
To use a different port run:
python -m gymx --port=54321
You can also run the server using Docker:
docker run -p 54321:54321 album/gymx
Client
Inside your application use:
from gymx import Env
env = Env('CartPole-v0')
To specify the server address use:
env = Env('CartPole-v0', address='localhost:54321')
API
env.reset()
: Reset the environment's state. Returnsobservation
.env.step(action)
: Step the environment by one timestep. Returnsobservation
,reward
,done
,next_episode
. Unlike the original gym API, it automatically resets the environment when done and returns next episode's observation instead ofinfo
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gymx-0.0.1.tar.gz
(5.5 kB
view details)
File details
Details for the file gymx-0.0.1.tar.gz
.
File metadata
- Download URL: gymx-0.0.1.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.20.0 CPython/3.6.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a975ef566f6f53ac90a7e7fceb21beeb1dc2090cc7ad17175cb446f9b3e2400 |
|
MD5 | 5f555cf7a445216c5fa29810e675e29e |
|
BLAKE2b-256 | a1372b9fce09979ddbcf2525a8443b7d4ed24ad13d5a6665499ceefc1fd1439c |