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

RPB.RPB

Description

Default / Naive Replay Buffer

Synopsis

Documentation

data Buffer a Source #

Strict Simple/Naive Replay Buffer

Constructors

Buffer 

Fields

Instances

Instances details
Functor Buffer Source # 
Instance details

Defined in RPB.RPB

Methods

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

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

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

Defined in RPB.RPB

Methods

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

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

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

Defined in RPB.RPB

Methods

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

show :: Buffer a -> String #

showList :: [Buffer a] -> ShowS #

mkBuffer :: Buffer Tensor Source #

Create a new, empty Buffer on the CPU

empty :: Buffer Tensor Source #

Create Empty Buffer

size :: Buffer Tensor -> Int Source #

How many Trajectories are currently stored in memory

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

Push new memories into Buffer

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

Push one buffer into another one

pop :: Int -> Buffer Tensor -> Buffer Tensor Source #

Pop numElems from Buffer

sample :: Tensor -> Buffer Tensor -> Buffer Tensor Source #

Get the given indices from Buffer

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

Uniform random sample from Replay Buffer

randomBatches :: Int -> Int -> Buffer Tensor -> IO [Buffer Tensor] Source #

Generate a list of random batches from a given buffer

standardizeState :: Float -> Buffer Tensor -> Buffer Tensor Source #

Scale and clip states and states'