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

RPB.PER

Description

Prioritized Experience Replay

Synopsis

Documentation

data Buffer a Source #

Strict Prioritized Experience Replay Buffer

Constructors

Buffer 

Fields

Instances

Instances details
Functor Buffer Source # 
Instance details

Defined in RPB.PER

Methods

fmap :: (a -> b) -> Buffer a -> Buffer b #

(<$) :: a -> Buffer b -> Buffer a #

Eq a => Eq (Buffer a) Source # 
Instance details

Defined in RPB.PER

Methods

(==) :: Buffer a -> Buffer a -> Bool #

(/=) :: Buffer a -> Buffer a -> Bool #

Show a => Show (Buffer a) Source # 
Instance details

Defined in RPB.PER

Methods

showsPrec :: Int -> Buffer a -> ShowS #

show :: Buffer a -> String #

showList :: [Buffer a] -> ShowS #

mkBuffer :: Int -> Float -> Float -> Int -> Buffer Tensor Source #

Create an empty PER Buffer

empty :: Int -> Float -> Float -> Int -> Buffer Tensor Source #

Create Empty Buffer

push :: Buffer Tensor -> Tensor -> Tensor -> Tensor -> Tensor -> Tensor -> Buffer Tensor Source #

Push new memories in a Buffer

push' :: Buffer Tensor -> Buffer Tensor -> Buffer Tensor Source #

Syntactic Sugar for adding one buffer to another

sampleIO :: Buffer Tensor -> Int -> Int -> IO (Buffer Tensor, Tensor, Tensor) Source #

Take a prioritized sample from the Buffer

update :: Buffer Tensor -> Tensor -> Tensor -> Buffer Tensor Source #

Update the Priorities of a Buffer

betaByFrame :: Float -> Int -> Int -> Float Source #

Calculate the β exponent at a given frame