Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
samindaa committed Feb 2, 2016
1 parent 7ef7c87 commit 37e2f98
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion include/Function.h
Expand Up @@ -47,7 +47,6 @@ namespace RLLib
}
virtual T initialize() =0;
virtual void reset() =0;
virtual Vector<T>* weights() const =0;
};

template<typename T>
Expand Down
1 change: 1 addition & 0 deletions include/Predictor.h
Expand Up @@ -36,6 +36,7 @@ namespace RLLib
{
}
virtual T predict(const Vector<T>* x) const =0;
virtual Vector<T>* weights() const =0;
};

template<typename T>
Expand Down
4 changes: 1 addition & 3 deletions test/GQTest.cpp
Expand Up @@ -104,9 +104,7 @@ void GQTest::testGQOnRandomWalk(const double& targetLeftProbability,
Assert::assertPasses(nbEpisode > 100);

const Predictor<double>* predictor = learner->predictor();
const LinearLearner<double>* gqLearner =
static_cast<const LinearLearner<double>*>(reinterpret_cast<const GQ<double>*>(predictor));
const Vector<double>* v = gqLearner->weights();
const Vector<double>* v = predictor->weights();
Assert::checkValues(v);

double error = FiniteStateGraph::distanceToSolution(&solution, vFun);
Expand Down

0 comments on commit 37e2f98

Please sign in to comment.