MachineIntelligenceCore:ReinforcementLearning
|
Class representing the spatial experience memory - used in memory replay. Derived from the Batch class. More...
#include <SpatialExperienceMemory.hpp>
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... | |
Class representing the spatial experience memory - used in memory replay. Derived from the Batch class.
Definition at line 87 of file SpatialExperienceMemory.hpp.
|
inline |
Default constructor.
number_of_experiences_ | The size of the experience table. |
batch_size_ | The batch size. |
Definition at line 95 of file SpatialExperienceMemory.hpp.
|
inlinevirtual |
Virtual destructor. Empty.
Definition at line 102 of file SpatialExperienceMemory.hpp.
|
inlinevirtual |
Adds sample to the batch. If size is exceeded it removes a random sample from the set.
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().
|
protected |
Size of the experience table (maximum number of stored experiences).
Definition at line 134 of file SpatialExperienceMemory.hpp.
Referenced by add().