Class sdm::ValueIteration
Class List > sdm > ValueIteration
Value Iteration (opens new window) forMDP .
#include <value_iteration.hpp>
Inherits the following classes: sdm::Algorithm
Public Functions
Type | Name |
---|---|
ValueIteration (std::shared_ptr< SolvableByHSVI > problem, double error, int horizon) | |
void | determinedAllNextState () |
void | determinedAllNextStateRecursive (const std::shared_ptr< State > &, number t) |
virtual void | do_initialize () Initialize the algorithm. |
virtual void | do_save () Save the value function. |
virtual void | do_solve () Solve a problem solvable by HSVI . |
virtual void | do_test () Test the learnt value function on one episode. |
virtual double | getResult () |
virtual int | getTrial () |
std::shared_ptr< ValueFunction > | getValueFunction () |
Public Functions inherited from sdm::Algorithm
See sdm::Algorithm
Type | Name |
---|---|
virtual void | do_initialize () = 0 Initialize the algorithm. |
virtual void | do_save () = 0 Save the policy in a file. |
virtual void | do_solve () = 0 Solve the problem. |
virtual void | do_test () = 0 Test the result of the algorithm. |
virtual double | getResult () = 0 |
virtual int | getTrial () = 0 |
virtual | ~Algorithm () |
Protected Attributes
Type | Name |
---|---|
std::vector< std::vector< std::shared_ptr< State > > > | all_state |
double | error_ |
int | horizon_ |
std::shared_ptr< sdm::TabularValueFunction > | policy_evaluation_1_ The value function. |
std::shared_ptr< sdm::TabularValueFunction > | policy_evaluation_2_ The copy of the value function. |
std::shared_ptr< SolvableByHSVI > | problem_ The problem to be solved. |
Protected Functions
Type | Name |
---|---|
bool | borne () |
Public Functions Documentation
function ValueIteration
sdm::ValueIteration::ValueIteration (
std::shared_ptr< SolvableByHSVI > problem,
double error,
int horizon
)
function determinedAllNextState
void sdm::ValueIteration::determinedAllNextState ()
function determinedAllNextStateRecursive
void sdm::ValueIteration::determinedAllNextStateRecursive (
const std::shared_ptr< State > &,
number t
)
function do_initialize
virtual void sdm::ValueIteration::do_initialize ()
Implements sdm::Algorithm::do_initialize
function do_save
inline virtual void sdm::ValueIteration::do_save ()
Implements sdm::Algorithm::do_save
function do_solve
virtual void sdm::ValueIteration::do_solve ()
Implements sdm::Algorithm::do_solve
function do_test
virtual void sdm::ValueIteration::do_test ()
Implements sdm::Algorithm::do_test
function getResult
virtual double sdm::ValueIteration::getResult ()
Implements sdm::Algorithm::getResult
function getTrial
inline virtual int sdm::ValueIteration::getTrial ()
Implements sdm::Algorithm::getTrial
function getValueFunction
std::shared_ptr< ValueFunction > sdm::ValueIteration::getValueFunction ()
Protected Attributes Documentation
variable all_state
std::vector<std::vector<std::shared_ptr<State> > > sdm::ValueIteration::all_state;
variable error_
double sdm::ValueIteration::error_;
variable horizon_
int sdm::ValueIteration::horizon_;
variable policy_evaluation_1_
std::shared_ptr<sdm::TabularValueFunction> sdm::ValueIteration::policy_evaluation_1_;
variable policy_evaluation_2_
std::shared_ptr<sdm::TabularValueFunction> sdm::ValueIteration::policy_evaluation_2_;
variable problem_
std::shared_ptr<SolvableByHSVI> sdm::ValueIteration::problem_;
Protected Functions Documentation
function borne
bool sdm::ValueIteration::borne ()
The documentation for this class was generated from the following file src/sdm/algorithms/value_iteration.hpp