| License | MIT |
|---|---|
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
OpenAI.Gym.Data
Description
Aeson-based data types to be returned by OpenAI.Gym.API
Synopsis
- data GymEnv
- newtype InstID = InstID {}
- newtype Environment = Environment {}
- newtype Observation = Observation {}
- data Step = Step {}
- data Outcome = Outcome {}
- newtype Info = Info {}
- newtype Action = Action {}
- data Monitor = Monitor {}
- data Config = Config {
- training_dir :: !Text
- algorithm_id :: !Text
- api_key :: !Text
Documentation
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 |
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.
Instances
| Eq InstID # | |
| Show InstID # | |
| Generic InstID # | |
| ToJSON InstID # | |
Defined in OpenAI.Gym.Data | |
| FromJSON InstID # | |
| ToHttpApiData InstID # | |
Defined in OpenAI.Gym.Data Methods toUrlPiece :: InstID -> Text # toEncodedUrlPiece :: InstID -> Builder # toHeader :: InstID -> ByteString # toQueryParam :: InstID -> Text # | |
| type Rep InstID # | |
Defined in OpenAI.Gym.Data | |
newtype Environment #
a mapping of instance_id to env_id (e.g. {'3c657dbc': 'CartPole-v0'}) for every env on the server
Constructors
| Environment | |
Instances
| Eq Environment # | |
Defined in OpenAI.Gym.Data | |
| Show Environment # | |
Defined in OpenAI.Gym.Data Methods showsPrec :: Int -> Environment -> ShowS # show :: Environment -> String # showList :: [Environment] -> ShowS # | |
| Generic Environment # | |
Defined in OpenAI.Gym.Data Associated Types type Rep Environment :: Type -> Type # | |
| ToJSON Environment # | |
Defined in OpenAI.Gym.Data Methods toJSON :: Environment -> Value # toEncoding :: Environment -> Encoding # toJSONList :: [Environment] -> Value # toEncodingList :: [Environment] -> Encoding # | |
| FromJSON Environment # | |
Defined in OpenAI.Gym.Data | |
| type Rep Environment # | |
Defined in OpenAI.Gym.Data type Rep Environment = D1 (MetaData "Environment" "OpenAI.Gym.Data" "gym-http-api-0.1.0.1-DptTWyoIYLlK7o8fbSGApw" True) (C1 (MetaCons "Environment" PrefixI True) (S1 (MetaSel (Just "all_envs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HashMap Text Text)))) | |
newtype Observation #
The agent's observation of the current environment
Constructors
| Observation | |
Fields | |
Instances
| Eq Observation # | |
Defined in OpenAI.Gym.Data | |
| Show Observation # | |
Defined in OpenAI.Gym.Data Methods showsPrec :: Int -> Observation -> ShowS # show :: Observation -> String # showList :: [Observation] -> ShowS # | |
| Generic Observation # | |
Defined in OpenAI.Gym.Data Associated Types type Rep Observation :: Type -> Type # | |
| ToJSON Observation # | |
Defined in OpenAI.Gym.Data Methods toJSON :: Observation -> Value # toEncoding :: Observation -> Encoding # toJSONList :: [Observation] -> Value # toEncodingList :: [Observation] -> Encoding # | |
| FromJSON Observation # | |
Defined in OpenAI.Gym.Data | |
| type Rep Observation # | |
Defined in OpenAI.Gym.Data type Rep Observation = D1 (MetaData "Observation" "OpenAI.Gym.Data" "gym-http-api-0.1.0.1-DptTWyoIYLlK7o8fbSGApw" True) (C1 (MetaCons "Observation" PrefixI True) (S1 (MetaSel (Just "getObservation") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Value))) | |
An action to take in the environment and whether or not to render that change
Instances
| Eq Step # | |
| Show Step # | |
| Generic Step # | |
| ToJSON Step # | |
Defined in OpenAI.Gym.Data | |
| type Rep Step # | |
Defined in OpenAI.Gym.Data type Rep Step = D1 (MetaData "Step" "OpenAI.Gym.Data" "gym-http-api-0.1.0.1-DptTWyoIYLlK7o8fbSGApw" False) (C1 (MetaCons "Step" PrefixI True) (S1 (MetaSel (Just "action") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Value) :*: S1 (MetaSel (Just "render") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Bool))) | |
The result of taking a step in an environment
Constructors
| Outcome | |
Instances
| Eq Outcome # | |
| Show Outcome # | |
| Generic Outcome # | |
| ToJSON Outcome # | |
Defined in OpenAI.Gym.Data | |
| FromJSON Outcome # | |
| type Rep Outcome # | |
Defined in OpenAI.Gym.Data type Rep Outcome = D1 (MetaData "Outcome" "OpenAI.Gym.Data" "gym-http-api-0.1.0.1-DptTWyoIYLlK7o8fbSGApw" False) (C1 (MetaCons "Outcome" PrefixI True) ((S1 (MetaSel (Just "observation") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Value) :*: S1 (MetaSel (Just "reward") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Double)) :*: (S1 (MetaSel (Just "done") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Bool) :*: S1 (MetaSel (Just "info") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Object)))) | |
A dict containing auxiliary diagnostic information
An action to take in the environment
Parameters used to start a monitoring session.
Constructors
| Monitor | |
Fields
| |
Instances
| Eq Monitor # | |
| Show Monitor # | |
| Generic Monitor # | |
| ToJSON Monitor # | |
Defined in OpenAI.Gym.Data | |
| type Rep Monitor # | |
Defined in OpenAI.Gym.Data type Rep Monitor = D1 (MetaData "Monitor" "OpenAI.Gym.Data" "gym-http-api-0.1.0.1-DptTWyoIYLlK7o8fbSGApw" False) (C1 (MetaCons "Monitor" PrefixI True) ((S1 (MetaSel (Just "directory") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "force") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Bool)) :*: (S1 (MetaSel (Just "resume") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Bool) :*: S1 (MetaSel (Just "video_callable") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Bool)))) | |
Parameters used to upload a monitored session to OpenAI's servers
Constructors
| Config | |
Fields
| |
Instances
| Eq Config # | |
| Show Config # | |
| Generic Config # | |
| ToJSON Config # | |
Defined in OpenAI.Gym.Data | |
| type Rep Config # | |
Defined in OpenAI.Gym.Data type Rep Config = D1 (MetaData "Config" "OpenAI.Gym.Data" "gym-http-api-0.1.0.1-DptTWyoIYLlK7o8fbSGApw" False) (C1 (MetaCons "Config" PrefixI True) (S1 (MetaSel (Just "training_dir") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: (S1 (MetaSel (Just "algorithm_id") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "api_key") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))) | |