Go to the documentation of this file.00001 #ifndef SimulationEngine_H
00002 #define SimulationEngine_H
00003
00004 #include <vector>
00005 #include <string>
00006 #include "MOMDP.h"
00007 using namespace std;
00008 using namespace momdp;
00009
00010 namespace momdp
00011 {
00012 class AlphaVectorPolicy;
00013 class SolverParams;
00014
00015 class SimulationEngine
00016 {
00017 private:
00018 SharedPointer<MOMDP> problem;
00019 SharedPointer<AlphaVectorPolicy> policy;
00020 SolverParams * solverParams;
00021
00022
00023 public:
00024 SimulationEngine();
00025 void setup(SharedPointer<MOMDP> problem, SharedPointer<AlphaVectorPolicy> policy, SolverParams * solverParams);
00026 void performActionObs(belief_vector& outBelObs, int action, const BeliefWithState& belSt) const;
00027 void performActionUnobs(belief_vector& outBelUnobs, int action, const BeliefWithState& belSt, int currObsState) const;
00028 void getPossibleObservations(belief_vector& possObs, int action, const BeliefWithState& belSt) const;
00029 string toString();
00030
00031 double getReward(const BeliefWithState& belst, int action);
00032
00033 void checkTerminal(string o, string s, vector<int> &bhout, vector<int> &fhout);
00034 int getGreedyAction(vector<int> &, vector<int> &);
00035
00036
00037
00038 void display(belief_vector& b, ostream& s);
00039 int runFor(int iters, ofstream* streamOut, double& reward, double& expReward);
00040
00041
00042
00043 virtual ~SimulationEngine(void);
00044 };
00045
00046
00047
00048 }
00049 #endif
00050