gym-http-api-0.1.0.1: REST client to the gym-http-api project

LicenseMIT
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

OpenAI.Gym.API

Contents

Description

Servant-client functions to interact with the flask server from openai/gym-http-api.

Synopsis

Environment functions

envCreate :: GymEnv -> ClientM InstID Source #

Create an instance of the specified environment (POST /v1/envs/)

envListAll :: ClientM Environment Source #

List all environments running on the server (GET /v1/envs/)

envReset :: InstID -> ClientM Observation Source #

Reset the state of the environment and return an initial observation. (POST /v1/envs/instance_id/reset/)

envStep :: InstID -> Step -> ClientM Outcome Source #

Step though an environment using an action. (POST /v1/envs/instance_id/step/)

envActionSpaceInfo :: InstID -> ClientM Info Source #

Get information (name and dimensions/bounds) of the env's action_space (GET /v1/envs/instance_id/action_space/)

envActionSpaceSample :: InstID -> ClientM Action Source #

Sample randomly from the env's action_space (GET /v1/envs/instance_id/action_space/sample)

envActionSpaceContains :: InstID -> Int -> ClientM Object Source #

Check to see if a value is valid in the env's action_space (GET /v1/envs/instance_id/action_space/contains/x)

envObservationSpaceInfo :: InstID -> ClientM Info Source #

Get information (name and dimensions/bounds) of the env's observation_space (GET /v1/envs/instance_id/observation_space/)

envMonitorStart :: InstID -> Monitor -> ClientM () Source #

Start monitoring (POST /v1/envs/instance_id/monitor/start/)

envMonitorClose :: InstID -> ClientM () Source #

Flush all monitor data to disk (POST /v1/envs/instance_id/monitor/close/)

envClose :: InstID -> ClientM () Source #

Stop the environment (POST /v1/envs/instance_id/close/)

Http-server commands

upload :: Config -> ClientM () Source #

Upload results to OpenAI's servers (POST /v1/upload/)

shutdownServer :: ClientM () Source #

Request a server shutdown (POST /v1/shutdown/)

Servant code

gymAPI :: Proxy GymAPI Source #

Proxy type for the full servant-client representation of the gym http api.

Orphan instances