MachineIntelligenceCore:ReinforcementLearning
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
MazeHistogramFilter.hpp
Go to the documentation of this file.
1 
23 #ifndef SRC_ALGORITHMS_MAZEHISTOGRAMFILTER_HPP_
24 #define SRC_ALGORITHMS_MAZEHISTOGRAMFILTER_HPP_
25 
26 #include <vector>
27 #include <types/MatrixTypes.hpp>
28 
29 #include<logger/Log.hpp>
30 #include<utils/RandomGenerator.hpp>
31 
32 #include <types/Action2D.hpp>
33 
34 
35 namespace mic {
36 namespace algorithms {
37 
43 public:
48 
49 
55  void setMazes(std::vector<mic::types::MatrixXiPtr> & mazes_, unsigned int number_of_distinctive_patches_);
56 
63  void setHiddenPose(int hidden_maze_number_, int hidden_x_, int hidden_y_);
64 
68  virtual ~MazeHistogramFilter() { }
69 
74 
80  void sense (double hit_factor_, double miss_factor_);
81 
86  void move (mic::types::Action2DInterface ac_);
87 
95  void probabilisticMove (mic::types::Action2DInterface ac_, double exact_move_probability_, double overshoot_move_probability_, double undershoot_move_probability_);
96 
101 
106  mic::types::Action2DInterface mostUniquePatchActionSelection();
107 
108 
113  mic::types::Action2DInterface sumOfMostUniquePatchesActionSelection();
114 
115 
116  //void exportStatisticsToCsv()
117 
118 private:
120  std::vector<mic::types::MatrixXiPtr> mazes;
121 
123  unsigned int number_of_mazes;
124 
127 
129  unsigned int maze_width;
130 
132  unsigned int maze_height;
133 
135  unsigned int problem_dimensions;
136 
137 public:
138 
140  std::vector<mic::types::MatrixXdPtr> maze_position_probabilities;
141 
143  std::vector<double> maze_probabilities;
144 
146  std::vector<double> maze_x_coordinate_probilities;
147 
149  std::vector<double> maze_y_coordinate_probilities;
150 
152  std::vector<double> maze_patch_probabilities;
153 
156 
158  int hidden_x;
159 
161  int hidden_y;
162 
164  short obs;
165 };
166 
167 } /* namespace algorithms */
168 } /* namespace mic */
169 
170 #endif /* SRC_ALGORITHMS_MAZEHISTOGRAMFILTER_HPP_ */
Class implementing a histogram filter based solution of the maze-of-digits localization problem...
void probabilisticMove(mic::types::Action2DInterface ac_, double exact_move_probability_, double overshoot_move_probability_, double undershoot_move_probability_)
void setHiddenPose(int hidden_maze_number_, int hidden_x_, int hidden_y_)
unsigned int maze_width
Width of maze.
std::vector< mic::types::MatrixXiPtr > mazes
List of mazes.
void move(mic::types::Action2DInterface ac_)
unsigned int maze_height
Height of maze.
int hidden_maze_number
shortariable denoting in which maze are we right now (unknown, to be determined). ...
void sense(double hit_factor_, double miss_factor_)
int hidden_x
Variable denoting the x position are we right now (unknown, to be determined).
mic::types::Action2DInterface sumOfMostUniquePatchesActionSelection()
mic::types::Action2DInterface mostUniquePatchActionSelection()
std::vector< double > maze_patch_probabilities
Variable storing the probability that we can find given patch in a given maze.
std::vector< double > maze_probabilities
Variable storing the probability that we are currently moving in/observing a given maze...
unsigned int number_of_mazes
Problem dimensions - number of mazes.
std::vector< double > maze_y_coordinate_probilities
Variable storing the probability that we are currently in a given y coordinate.
unsigned int problem_dimensions
Problem dimensions - number of mazes * their width * their height.
void setMazes(std::vector< mic::types::MatrixXiPtr > &mazes_, unsigned int number_of_distinctive_patches_)
int hidden_y
Variable denoting the y position are we right now (unknown, to be determined).
std::vector< double > maze_x_coordinate_probilities
Variable storing the probability that we are currently in a given x coordinate.
unsigned int number_of_distinctive_patches
Problem dimensions - number of distinctive patches (in here - number of different digits...
std::vector< mic::types::MatrixXdPtr > maze_position_probabilities
Variable storing the probability that we are in a given maze position.