MachineIntelligenceCore:ReinforcementLearning
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
mic::types::SpatialExperienceMemory Class Reference

Class representing the spatial experience memory - used in memory replay. Derived from the Batch class. More...

#include <SpatialExperienceMemory.hpp>

Inheritance diagram for mic::types::SpatialExperienceMemory:
Collaboration diagram for mic::types::SpatialExperienceMemory:

Public Member Functions

 SpatialExperienceMemory (size_t number_of_experiences_, size_t batch_size_)
 
virtual ~SpatialExperienceMemory ()
 
virtual void add (std::shared_ptr< mic::types::SpatialExperience > input_, std::shared_ptr< mic::types::MatrixXf > target_)
 

Protected Attributes

size_t number_of_experiences
 Size of the experience table (maximum number of stored experiences). More...
 

Detailed Description

Class representing the spatial experience memory - used in memory replay. Derived from the Batch class.

Author
tkornuta

Definition at line 87 of file SpatialExperienceMemory.hpp.

Constructor & Destructor Documentation

mic::types::SpatialExperienceMemory::SpatialExperienceMemory ( size_t  number_of_experiences_,
size_t  batch_size_ 
)
inline

Default constructor.

Parameters
number_of_experiences_The size of the experience table.
batch_size_The batch size.

Definition at line 95 of file SpatialExperienceMemory.hpp.

virtual mic::types::SpatialExperienceMemory::~SpatialExperienceMemory ( )
inlinevirtual

Virtual destructor. Empty.

Definition at line 102 of file SpatialExperienceMemory.hpp.

Member Function Documentation

virtual void mic::types::SpatialExperienceMemory::add ( std::shared_ptr< mic::types::SpatialExperience input_,
std::shared_ptr< mic::types::MatrixXf >  target_ 
)
inlinevirtual

Adds sample to the batch. If size is exceeded it removes a random sample from the set.

Parameters
input_Sample input.
target_Sample target.

Definition at line 110 of file SpatialExperienceMemory.hpp.

References number_of_experiences.

Referenced by mic::application::GridworldDRLExperienceReplay::performSingleStep(), mic::application::GridworldDRLExperienceReplayPOMDP::performSingleStep(), mic::application::MazeOfDigitsDLRERPOMPD::performSingleStep(), and mic::application::MNISTDigitDLRERPOMDP::performSingleStep().

Member Data Documentation

size_t mic::types::SpatialExperienceMemory::number_of_experiences
protected

Size of the experience table (maximum number of stored experiences).

Definition at line 134 of file SpatialExperienceMemory.hpp.

Referenced by add().


The documentation for this class was generated from the following file: