edelwace-0.1.0.0: HaskTorch Reinforcement Learning Agents for GACE
Safe HaskellNone
LanguageHaskell2010

SAC

Description

Soft Actor Critic Algorithm Defaults

Synopsis

Documentation

algorithm :: Algorithm Source #

Algorithm ID

data ActorNetSpec Source #

Actor Network Specification

Constructors

ActorNetSpec 

Fields

Instances

Instances details
Eq ActorNetSpec Source # 
Instance details

Defined in SAC

Show ActorNetSpec Source # 
Instance details

Defined in SAC

Randomizable ActorNetSpec ActorNet Source #

Actor Network Weight initialization

Instance details

Defined in SAC

data CriticNetSpec Source #

Critic Network Specification

Constructors

CriticNetSpec 

Fields

Instances

Instances details
Eq CriticNetSpec Source # 
Instance details

Defined in SAC

Show CriticNetSpec Source # 
Instance details

Defined in SAC

Randomizable CriticNetSpec CriticNet Source #

Critic Network Weight initialization

Instance details

Defined in SAC

data ActorNet Source #

Actor Network Architecture

Constructors

ActorNet 

Instances

Instances details
Show ActorNet Source # 
Instance details

Defined in SAC

Generic ActorNet Source # 
Instance details

Defined in SAC

Associated Types

type Rep ActorNet :: Type -> Type #

Methods

from :: ActorNet -> Rep ActorNet x #

to :: Rep ActorNet x -> ActorNet #

Parameterized ActorNet Source # 
Instance details

Defined in SAC

Randomizable ActorNetSpec ActorNet Source #

Actor Network Weight initialization

Instance details

Defined in SAC

type Rep ActorNet Source # 
Instance details

Defined in SAC

data CriticNet Source #

Critic Network Architecture

Constructors

CriticNet 

Instances

Instances details
Show CriticNet Source # 
Instance details

Defined in SAC

Generic CriticNet Source # 
Instance details

Defined in SAC

Associated Types

type Rep CriticNet :: Type -> Type #

Parameterized CriticNet Source # 
Instance details

Defined in SAC

Randomizable CriticNetSpec CriticNet Source #

Critic Network Weight initialization

Instance details

Defined in SAC

type Rep CriticNet Source # 
Instance details

Defined in SAC

type Rep CriticNet = D1 ('MetaData "CriticNet" "SAC" "edelwace-0.1.0.0-NlkYKOSwr4E6F4MQQAmdJ" 'False) (C1 ('MetaCons "CriticNet" 'PrefixI 'True) (S1 ('MetaSel ('Just "qLayer0") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Linear) :*: (S1 ('MetaSel ('Just "qLayer1") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Linear) :*: S1 ('MetaSel ('Just "qLayer2") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Linear))))

data Agent Source #

SAC Agent

Constructors

Agent 

Fields

Instances

Instances details
Show Agent Source # 
Instance details

Defined in SAC

Methods

showsPrec :: Int -> Agent -> ShowS #

show :: Agent -> String #

showList :: [Agent] -> ShowS #

Generic Agent Source # 
Instance details

Defined in SAC

Associated Types

type Rep Agent :: Type -> Type #

Methods

from :: Agent -> Rep Agent x #

to :: Rep Agent x -> Agent #

type Rep Agent Source # 
Instance details

Defined in SAC

mkAgent :: Int -> Int -> IO Agent Source #

Agent constructor

saveAgent :: String -> Agent -> IO () Source #

Save an Agent Checkpoint

saveAgent' :: String -> Agent -> IO Agent Source #

Save an Agent and return the agent

loadAgent :: String -> Int -> Int -> Int -> IO Agent Source #

Load an Agent Checkpoint

π :: ActorNet -> Tensor -> (Tensor, Tensor) Source #

Actor Network Forward Pass

q :: CriticNet -> Tensor -> Tensor -> Tensor Source #

Critic Network Forward Pass

q' :: CriticNet -> CriticNet -> Tensor -> Tensor -> Tensor Source #

Convenience Function

actRandom :: Agent -> Tensor -> IO Tensor Source #

Perform a completely random action for a given state

act :: Agent -> Tensor -> IO Tensor Source #

Get an Action (no grad)

evaluate :: Agent -> Tensor -> Tensor -> IO (Tensor, Tensor) Source #

Get an action and log probs (grad)

train :: Int -> Int -> HymURL -> TrackingURI -> IO Agent Source #

Train Soft Actor Critic Agent on Environment