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

LicenseMIT
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

OpenAI.Gym.Data

Description

Aeson-based data types to be returned by OpenAI.Gym.API

Synopsis

Documentation

data GymEnv Source #

Classic Control Environments

Constructors

CartPoleV0

Balance a pole on a cart (for a short time).

CartPoleV1

Balance a pole on a cart.

AcrobotV1

Swing up a two-link robot.

MountainCarV0

Drive up a big hill.

MountainCarContinuousV0

Drive up a big hill with continuous control.

PendulumV0

Swing up a pendulum.

FrozenLakeV0

Swing up a pendulum.

PongRamV0

Maximize score in the game Pong, with RAM as input

PongV0

Maximize score in the game Pong

newtype InstID Source #

a short identifier (such as '3c657dbc') for the created environment instance. The instance_id is used in future API calls to identify the environment to be manipulated.

Constructors

InstID 

Fields

Instances

newtype Environment Source #

a mapping of instance_id to env_id (e.g. {'3c657dbc': 'CartPole-v0'}) for every env on the server

Constructors

Environment 

newtype Observation Source #

The agent's observation of the current environment

Constructors

Observation 

data Step Source #

An action to take in the environment and whether or not to render that change

Constructors

Step 

Fields

Instances

Eq Step Source # 

Methods

(==) :: Step -> Step -> Bool #

(/=) :: Step -> Step -> Bool #

Show Step Source # 

Methods

showsPrec :: Int -> Step -> ShowS #

show :: Step -> String #

showList :: [Step] -> ShowS #

Generic Step Source # 

Associated Types

type Rep Step :: * -> * #

Methods

from :: Step -> Rep Step x #

to :: Rep Step x -> Step #

ToJSON Step Source # 
type Rep Step Source # 
type Rep Step = D1 * (MetaData "Step" "OpenAI.Gym.Data" "gym-http-api-0.1.0.1-E4vnEGdx8fT4xNlWSNzeEd" False) (C1 * (MetaCons "Step" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "action") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Value)) (S1 * (MetaSel (Just Symbol "render") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Bool))))

data Outcome Source #

The result of taking a step in an environment

Constructors

Outcome 

Fields

  • observation :: !Value

    agent's observation of the current environment

  • reward :: !Double

    amount of reward returned after previous action

  • done :: !Bool

    whether the episode has ended

  • info :: !Object

    a dict containing auxiliary diagnostic information

newtype Info Source #

A dict containing auxiliary diagnostic information

Constructors

Info 

Fields

Instances

Eq Info Source # 

Methods

(==) :: Info -> Info -> Bool #

(/=) :: Info -> Info -> Bool #

Show Info Source # 

Methods

showsPrec :: Int -> Info -> ShowS #

show :: Info -> String #

showList :: [Info] -> ShowS #

Generic Info Source # 

Associated Types

type Rep Info :: * -> * #

Methods

from :: Info -> Rep Info x #

to :: Rep Info x -> Info #

ToJSON Info Source # 
FromJSON Info Source # 
type Rep Info Source # 
type Rep Info = D1 * (MetaData "Info" "OpenAI.Gym.Data" "gym-http-api-0.1.0.1-E4vnEGdx8fT4xNlWSNzeEd" True) (C1 * (MetaCons "Info" PrefixI True) (S1 * (MetaSel (Just Symbol "getInfo") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Object)))

newtype Action Source #

An action to take in the environment

Constructors

Action 

Fields

Instances

Eq Action Source # 

Methods

(==) :: Action -> Action -> Bool #

(/=) :: Action -> Action -> Bool #

Show Action Source # 
Generic Action Source # 

Associated Types

type Rep Action :: * -> * #

Methods

from :: Action -> Rep Action x #

to :: Rep Action x -> Action #

ToJSON Action Source # 
FromJSON Action Source # 
type Rep Action Source # 
type Rep Action = D1 * (MetaData "Action" "OpenAI.Gym.Data" "gym-http-api-0.1.0.1-E4vnEGdx8fT4xNlWSNzeEd" True) (C1 * (MetaCons "Action" PrefixI True) (S1 * (MetaSel (Just Symbol "getAction") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Value)))

data Monitor Source #

Parameters used to start a monitoring session.

Constructors

Monitor 

Fields

  • directory :: !Text

    directory to use for monitoring

  • force :: !Bool

    Clear out existing training data from this directory (by deleting every file prefixed with "openaigym.") (default=False)

  • resume :: !Bool

    Retain the training data already in this directory, which will be merged with our new data. (default=False)

  • video_callable :: !Bool

    video_callable parameter from the native env.monitor.start function

data Config Source #

Parameters used to upload a monitored session to OpenAI's servers

Constructors

Config 

Fields

  • training_dir :: !Text

    A directory containing the results of a training run.

  • algorithm_id :: !Text

    An arbitrary string indicating the paricular version of the algorithm (including choices of parameters) you are running. (default=None)

  • api_key :: !Text

    Your OpenAI API key

Instances

Eq Config Source # 

Methods

(==) :: Config -> Config -> Bool #

(/=) :: Config -> Config -> Bool #

Show Config Source # 
Generic Config Source # 

Associated Types

type Rep Config :: * -> * #

Methods

from :: Config -> Rep Config x #

to :: Rep Config x -> Config #

ToJSON Config Source # 
type Rep Config Source # 
type Rep Config = D1 * (MetaData "Config" "OpenAI.Gym.Data" "gym-http-api-0.1.0.1-E4vnEGdx8fT4xNlWSNzeEd" False) (C1 * (MetaCons "Config" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "training_dir") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) ((:*:) * (S1 * (MetaSel (Just Symbol "algorithm_id") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "api_key") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)))))