Go to the documentation of this file.00001 #ifndef _MBS_HH_
00002 #define _MBS_HH_
00003
00004 #include <rl_common/Random.h>
00005 #include <rl_common/core.hh>
00006 #include "ValueIteration.hh"
00007
00008 #include <set>
00009 #include <vector>
00010 #include <map>
00011 #include <deque>
00012
00013 class MBS: public Planner {
00014 public:
00015
00023 MBS(int numactions, float gamma,
00024 int MAX_LOOPS, float MAX_TIME, int modelType,
00025 const std::vector<float> &featmax,
00026 const std::vector<float> &featmin, const std::vector<int> &statesPerDim,
00027 int delay,
00028 Random rng = Random());
00029
00032 MBS(const MBS &);
00033
00034 virtual ~MBS();
00035
00036 virtual void setModel(MDPModel* model);
00037 virtual bool updateModelWithExperience(const std::vector<float> &last,
00038 int act,
00039 const std::vector<float> &curr,
00040 float reward, bool term);
00041 virtual void planOnNewModel();
00042 virtual int getBestAction(const std::vector<float> &s);
00043 virtual void savePolicy(const char* filename);
00044 virtual void setSeeding(bool seed);
00045 virtual void setFirst();
00046
00047 bool DELAYDEBUG;
00048
00049 private:
00050
00051 ValueIteration* vi;
00052 std::deque<int> actHistory;
00053 const unsigned k;
00054 MDPModel* model;
00055 bool seedMode;
00056
00057 };
00058
00059
00060 #endif