Skip to content

AppliedDeepLearning/gymx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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. Returns observation.
  • env.step(action): Step the environment by one timestep. Returns observation, reward, done, next_episode. Unlike the original gym API, it automatically resets the environment when done and returns next episode's observation instead of info.

About

Run OpenAI Gym environments on an external process or remote machine using gRPC.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors