MachineIntelligenceCore:ReinforcementLearning
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
mic::application::EpisodicHistogramFilterMazeLocalization Class Reference

Application for episodic testing of convergence of histogram filter based maze-of-digits localization. More...

#include <EpisodicHistogramFilterMazeLocalization.hpp>

Inheritance diagram for mic::application::EpisodicHistogramFilterMazeLocalization:
Collaboration diagram for mic::application::EpisodicHistogramFilterMazeLocalization:

Public Member Functions

 EpisodicHistogramFilterMazeLocalization (std::string node_name_="application")
 
virtual ~EpisodicHistogramFilterMazeLocalization ()
 

Protected Member Functions

virtual void initialize (int argc, char *argv[])
 
virtual void initializePropertyDependentVariables ()
 
virtual bool performSingleStep ()
 
virtual void startNewEpisode ()
 
virtual void finishCurrentEpisode ()
 

Private Attributes

mic::utils::DataCollectorPtr
< std::string, float > 
collector_ptr
 Data collector. More...
 
WindowCollectorChart< float > * w_localization_time_chart
 Window for displaying chart with statistics on current maze number. More...
 
mic::importers::MazeMatrixImporter importer
 Importer responsible for loading mazes from file. More...
 
mic::algorithms::MazeHistogramFilter hf
 Histogram filter. More...
 
mic::configuration::Property
< short > 
hidden_maze_number
 Property: variable denoting in which maze are we right now (unknown, to be determined). More...
 
mic::configuration::Property
< short > 
hidden_x
 Property: variable denoting the x position are we right now (unknown, to be determined). More...
 
mic::configuration::Property
< short > 
hidden_y
 Property: variable denoting the y position are we right now (unknown, to be determined). More...
 
mic::configuration::Property
< short > 
action
 Property: performed action (0-3: NESW, -3: random, -2: sumOfMostUniquePatchesActionSelection, -1: mostUniquePatchActionSelection). More...
 
mic::configuration::Property
< double > 
epsilon
 Property: variable denoting epsilon in aciton selection (the probability "below" which a random action will be selected). More...
 
mic::configuration::Property
< double > 
hit_factor
 Property: variable denoting the hit factor (the gain when the observation coincides with current position). More...
 
mic::configuration::Property
< double > 
miss_factor
 Property: variable denoting the miss factor (the gain when the observation does not coincide with current position). More...
 
mic::configuration::Property
< double > 
exact_move_probability
 Property: variable storing the probability that we made the exact move (x+dx). More...
 
mic::configuration::Property
< double > 
overshoot_move_probability
 Property: variable storing the probability that we made the "overshoot" move (d+dx+1). More...
 
mic::configuration::Property
< double > 
undershoot_move_probability
 Property: variable storing the probability that we made the "undershoot" move (d+dx-1). More...
 
mic::configuration::Property
< short > 
max_number_of_iterations
 Property: stop condition 1: maximal number of iterations - if exceeded, we finish the episode claiming that that it was a failure. More...
 
mic::configuration::Property
< double > 
min_maze_confidence
 Property: stop condition 2: minimal maze confidence - if exceeded, we finish the episode claiming that that it was a success. More...
 
double max_pm
 Maximum maze probability for given episode. More...
 
mic::configuration::Property
< std::string > 
statistics_filename
 Property: name of the file to which the statistics (convergence) will be exported. More...
 

Detailed Description

Application for episodic testing of convergence of histogram filter based maze-of-digits localization.

Author
tkornuta

Definition at line 46 of file EpisodicHistogramFilterMazeLocalization.hpp.

Constructor & Destructor Documentation

mic::application::EpisodicHistogramFilterMazeLocalization::EpisodicHistogramFilterMazeLocalization ( std::string  node_name_ = "application")

Default Constructor. Sets the application/node name, default values of variables, initializes classifier etc.

Parameters
node_name_Name of the application/node (in configuration file).

Definition at line 37 of file EpisodicHistogramFilterMazeLocalization.cpp.

References action, epsilon, exact_move_probability, hidden_maze_number, hidden_x, hidden_y, hit_factor, max_number_of_iterations, min_maze_confidence, miss_factor, overshoot_move_probability, statistics_filename, and undershoot_move_probability.

mic::application::EpisodicHistogramFilterMazeLocalization::~EpisodicHistogramFilterMazeLocalization ( )
virtual

Destructor.

Definition at line 75 of file EpisodicHistogramFilterMazeLocalization.cpp.

References w_localization_time_chart.

Member Function Documentation

void mic::application::EpisodicHistogramFilterMazeLocalization::finishCurrentEpisode ( )
protectedvirtual

Method called when given episode ends (goal: export collected statistics to file etc.) - abstract, to be overridden.

Definition at line 133 of file EpisodicHistogramFilterMazeLocalization.cpp.

References collector_ptr, max_number_of_iterations, max_pm, and statistics_filename.

void mic::application::EpisodicHistogramFilterMazeLocalization::initialize ( int  argc,
char *  argv[] 
)
protectedvirtual

Method initializes GLUT and OpenGL windows.

Parameters
argcNumber of application parameters.
argvArray of application parameters.

Definition at line 80 of file EpisodicHistogramFilterMazeLocalization.cpp.

References collector_ptr, and w_localization_time_chart.

void mic::application::EpisodicHistogramFilterMazeLocalization::initializePropertyDependentVariables ( )
protectedvirtual

Initializes all variables that are property-dependent (input patches, SDRs etc.).

Definition at line 95 of file EpisodicHistogramFilterMazeLocalization.cpp.

References hf, mic::importers::MazeMatrixImporter::importData(), importer, and mic::algorithms::MazeHistogramFilter::setMazes().

void mic::application::EpisodicHistogramFilterMazeLocalization::startNewEpisode ( )
protectedvirtual

Member Data Documentation

mic::configuration::Property<short> mic::application::EpisodicHistogramFilterMazeLocalization::action
private

Property: performed action (0-3: NESW, -3: random, -2: sumOfMostUniquePatchesActionSelection, -1: mostUniquePatchActionSelection).

Definition at line 113 of file EpisodicHistogramFilterMazeLocalization.hpp.

Referenced by EpisodicHistogramFilterMazeLocalization(), and performSingleStep().

mic::utils::DataCollectorPtr<std::string, float> mic::application::EpisodicHistogramFilterMazeLocalization::collector_ptr
private

Data collector.

Definition at line 92 of file EpisodicHistogramFilterMazeLocalization.hpp.

Referenced by finishCurrentEpisode(), and initialize().

mic::configuration::Property<double> mic::application::EpisodicHistogramFilterMazeLocalization::epsilon
private

Property: variable denoting epsilon in aciton selection (the probability "below" which a random action will be selected).

Definition at line 116 of file EpisodicHistogramFilterMazeLocalization.hpp.

Referenced by EpisodicHistogramFilterMazeLocalization(), and performSingleStep().

mic::configuration::Property<double> mic::application::EpisodicHistogramFilterMazeLocalization::exact_move_probability
private

Property: variable storing the probability that we made the exact move (x+dx).

Definition at line 125 of file EpisodicHistogramFilterMazeLocalization.hpp.

Referenced by EpisodicHistogramFilterMazeLocalization(), and performSingleStep().

mic::algorithms::MazeHistogramFilter mic::application::EpisodicHistogramFilterMazeLocalization::hf
private
mic::configuration::Property<short> mic::application::EpisodicHistogramFilterMazeLocalization::hidden_maze_number
private

Property: variable denoting in which maze are we right now (unknown, to be determined).

Definition at line 104 of file EpisodicHistogramFilterMazeLocalization.hpp.

Referenced by EpisodicHistogramFilterMazeLocalization(), and startNewEpisode().

mic::configuration::Property<short> mic::application::EpisodicHistogramFilterMazeLocalization::hidden_x
private

Property: variable denoting the x position are we right now (unknown, to be determined).

Definition at line 107 of file EpisodicHistogramFilterMazeLocalization.hpp.

Referenced by EpisodicHistogramFilterMazeLocalization(), and startNewEpisode().

mic::configuration::Property<short> mic::application::EpisodicHistogramFilterMazeLocalization::hidden_y
private

Property: variable denoting the y position are we right now (unknown, to be determined).

Definition at line 110 of file EpisodicHistogramFilterMazeLocalization.hpp.

Referenced by EpisodicHistogramFilterMazeLocalization(), and startNewEpisode().

mic::configuration::Property<double> mic::application::EpisodicHistogramFilterMazeLocalization::hit_factor
private

Property: variable denoting the hit factor (the gain when the observation coincides with current position).

Definition at line 119 of file EpisodicHistogramFilterMazeLocalization.hpp.

Referenced by EpisodicHistogramFilterMazeLocalization(), performSingleStep(), and startNewEpisode().

mic::importers::MazeMatrixImporter mic::application::EpisodicHistogramFilterMazeLocalization::importer
private

Importer responsible for loading mazes from file.

Definition at line 98 of file EpisodicHistogramFilterMazeLocalization.hpp.

Referenced by initializePropertyDependentVariables(), and performSingleStep().

mic::configuration::Property<short> mic::application::EpisodicHistogramFilterMazeLocalization::max_number_of_iterations
private

Property: stop condition 1: maximal number of iterations - if exceeded, we finish the episode claiming that that it was a failure.

Definition at line 134 of file EpisodicHistogramFilterMazeLocalization.hpp.

Referenced by EpisodicHistogramFilterMazeLocalization(), finishCurrentEpisode(), and performSingleStep().

double mic::application::EpisodicHistogramFilterMazeLocalization::max_pm
private

Maximum maze probability for given episode.

Definition at line 140 of file EpisodicHistogramFilterMazeLocalization.hpp.

Referenced by finishCurrentEpisode(), and performSingleStep().

mic::configuration::Property<double> mic::application::EpisodicHistogramFilterMazeLocalization::min_maze_confidence
private

Property: stop condition 2: minimal maze confidence - if exceeded, we finish the episode claiming that that it was a success.

Definition at line 137 of file EpisodicHistogramFilterMazeLocalization.hpp.

Referenced by EpisodicHistogramFilterMazeLocalization(), and performSingleStep().

mic::configuration::Property<double> mic::application::EpisodicHistogramFilterMazeLocalization::miss_factor
private

Property: variable denoting the miss factor (the gain when the observation does not coincide with current position).

Definition at line 122 of file EpisodicHistogramFilterMazeLocalization.hpp.

Referenced by EpisodicHistogramFilterMazeLocalization(), performSingleStep(), and startNewEpisode().

mic::configuration::Property<double> mic::application::EpisodicHistogramFilterMazeLocalization::overshoot_move_probability
private

Property: variable storing the probability that we made the "overshoot" move (d+dx+1).

Definition at line 128 of file EpisodicHistogramFilterMazeLocalization.hpp.

Referenced by EpisodicHistogramFilterMazeLocalization(), and performSingleStep().

mic::configuration::Property<std::string> mic::application::EpisodicHistogramFilterMazeLocalization::statistics_filename
private

Property: name of the file to which the statistics (convergence) will be exported.

Definition at line 143 of file EpisodicHistogramFilterMazeLocalization.hpp.

Referenced by EpisodicHistogramFilterMazeLocalization(), and finishCurrentEpisode().

mic::configuration::Property<double> mic::application::EpisodicHistogramFilterMazeLocalization::undershoot_move_probability
private

Property: variable storing the probability that we made the "undershoot" move (d+dx-1).

Definition at line 131 of file EpisodicHistogramFilterMazeLocalization.hpp.

Referenced by EpisodicHistogramFilterMazeLocalization(), and performSingleStep().

WindowCollectorChart<float>* mic::application::EpisodicHistogramFilterMazeLocalization::w_localization_time_chart
private

Window for displaying chart with statistics on current maze number.

Definition at line 95 of file EpisodicHistogramFilterMazeLocalization.hpp.

Referenced by initialize(), and ~EpisodicHistogramFilterMazeLocalization().


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