Class sdm::ExperienceMemory

Class List > sdm > ExperienceMemory

  • #include <experience_memory.hpp>

Inherits the following classes: sdm::ExperienceMemoryInterface

Public Types inherited from sdm::ExperienceMemoryInterface

See sdm::ExperienceMemoryInterface

Type Name
typedef std::tuple< std::shared_ptr< Observation >, std::shared_ptr< Action >, double, std::shared_ptr< Observation >, std::shared_ptr< Action > > sars_transition

Public Functions

Type Name
ExperienceMemory (number horizon, int capacity=1)
virtual void push (const std::shared_ptr< Observation > & observation, const std::shared_ptr< Action > & action, const double reward, const std::shared_ptr< Observation > & next_observation, const std::shared_ptr< Action > & next_action, number t)
virtual std::vector< sars_transition > sample (number t, int n=1)
virtual int size ()

Public Functions inherited from sdm::ExperienceMemoryInterface

See sdm::ExperienceMemoryInterface

Type Name
virtual void push (const std::shared_ptr< Observation > & observation, const std::shared_ptr< Action > & action, const double reward, const std::shared_ptr< Observation > & next_observation, const std::shared_ptr< Action > & next_action, number t) = 0
virtual std::vector< sars_transition > sample (number t, int n=1) = 0
virtual int size () = 0
virtual ~ExperienceMemoryInterface ()

Protected Attributes

Type Name
int capacity_
std::vector< std::vector< sars_transition > > experience_memory_
int position

Public Functions Documentation

function ExperienceMemory

sdm::ExperienceMemory::ExperienceMemory (
    number horizon,
    int capacity=1
) 

function push

virtual void sdm::ExperienceMemory::push (
    const std::shared_ptr< Observation > & observation,
    const std::shared_ptr< Action > & action,
    const double reward,
    const std::shared_ptr< Observation > & next_observation,
    const std::shared_ptr< Action > & next_action,
    number t
) 

Implements sdm::ExperienceMemoryInterface::push

function sample

virtual std::vector< sars_transition > sdm::ExperienceMemory::sample (
    number t,
    int n=1
) 

Implements sdm::ExperienceMemoryInterface::sample

function size

virtual int sdm::ExperienceMemory::size () 

Implements sdm::ExperienceMemoryInterface::size

Protected Attributes Documentation

variable capacity_

int sdm::ExperienceMemory::capacity_;

variable experience_memory_

std::vector<std::vector<sars_transition> > sdm::ExperienceMemory::experience_memory_;

variable position

int sdm::ExperienceMemory::position;

The documentation for this class was generated from the following file src/sdm/utils/rl/experience_memory.hpp