Skip to content
Browse files

Changed initialize function to accept file to load parameters from

  • Loading branch information...
1 parent 3b2e5ee commit eef259514103c22dd84a4090538141900e54a56d @cmansley cmansley committed
Showing with 11 additions and 11 deletions.
  1. +1 −1 hoot.cc
  2. +1 −1 hoot.hh
  3. +1 −1 lqr.cc
  4. +1 −1 lqr.hh
  5. +1 −1 main.cc
  6. +1 −1 planner.hh
  7. +1 −1 sarsa.cc
  8. +1 −1 sarsa.hh
  9. +1 −1 ss.hh
  10. +1 −1 uct.cc
  11. +1 −1 uct.hh
View
2 hoot.cc
@@ -16,7 +16,7 @@ HOOT::HOOT(Domain *d, Chopper *c, double epsilon) : MCPlanner(d, c, epsilon)
/*
*
*/
-void HOOT::initialize()
+void HOOT::initialize(std::string filename)
{
}
View
2 hoot.hh
@@ -25,7 +25,7 @@ public:
~HOOT() { /* Possible mem clean up? */ }
/** Initialize the planner */
- void initialize();
+ void initialize(std::string filename);
void print(State s);
View
2 lqr.cc
@@ -15,7 +15,7 @@ LQR::LQR(Domain *d, Chopper *c, double epsilon) : Planner(d, c, epsilon)
/*
*
*/
-void LQR::initialize()
+void LQR::initialize(std::string filename)
{
}
View
2 lqr.hh
@@ -23,7 +23,7 @@ public:
~LQR() { }
/** Initialize the planner */
- void initialize();
+ void initialize(std::string filename);
/** Plan for one state */
Action plan(State s);
View
2 main.cc
@@ -77,7 +77,7 @@ int main(int argc, char* argv[])
}
/* Initialize planner */
- planner->initialize();
+ planner->initialize("log.txt");
/* Initialize state/action variables */
State s = domain->getInitialState();
View
2 planner.hh
@@ -22,7 +22,7 @@ public:
virtual ~Planner( ) { }
/** Initialize planner */
- virtual void initialize() = 0;
+ virtual void initialize(std::string filename) = 0;
/** Plan for one state */
virtual Action plan(State s) = 0;
View
2 sarsa.cc
@@ -16,7 +16,7 @@ SARSA::SARSA(Domain *d, Chopper *c, double epsilon) : Planner(d, c, epsilon)
/*
*
*/
-void SARSA::initialize()
+void SARSA::initialize(std::string filename)
{
/* Locally store gamma */
gamma = domain->getDiscountFactor();
View
2 sarsa.hh
@@ -22,7 +22,7 @@ public:
~SARSA( ) { }
/** Initialize the planner */
- void initialize();
+ void initialize(std::string filename);
/** Query action */
Action plan(State s);
View
2 ss.hh
@@ -24,7 +24,7 @@ public:
~SS() { }
/** Initialize planner */
- void initialize() {}
+ void initialize(std::string filename) {}
/** Plan for one state */
Action plan(State s);
View
2 uct.cc
@@ -15,7 +15,7 @@ UCT::UCT(Domain *d, Chopper *c, double epsilon) : MCPlanner(d, c, epsilon)
/*
*
*/
-void UCT::initialize()
+void UCT::initialize(std::string filename)
{
/* Locally store values and compute vmax */
rmax = domain->getRmax();
View
2 uct.hh
@@ -25,7 +25,7 @@ public:
~UCT() { }
/** Initialize the planner */
- void initialize();
+ void initialize(std::string filename);
void print(State s);

0 comments on commit eef2595

Please sign in to comment.
Something went wrong with that request. Please try again.