AIToolbox
A library that offers tools for AI problem solving.
|
Go to the documentation of this file. 1 #ifndef AI_TOOLBOX_MDP_VALUE_ITERATION_HEADER_FILE
2 #define AI_TOOLBOX_MDP_VALUE_ITERATION_HEADER_FILE
64 std::tuple<double, ValueFunction, QFunction>
operator()(
const M & m);
134 const size_t S = model.getS();
135 const size_t A = model.getA();
139 const size_t size = vParameter_.
values.size();
151 const auto & ir = [&]{
152 if constexpr (IsModelEigen<M>)
return model.getRewardFunction();
156 unsigned timestep = 0;
157 double variation = tolerance_ * 2;
164 while ( timestep < horizon_ && (!useTolerance || variation > tolerance_) ) {
171 val1 *= model.getDiscount();
180 variation = (val1 - val0).cwiseAbs().maxCoeff();
185 return std::make_tuple(useTolerance ? variation : 0.0, std::move(v1_), std::move(q));
#define AI_SEVERITY_WARNING
Definition: Logging.hpp:70
#define AI_LOGGER(SEV, ARGS)
Definition: Logging.hpp:114
#define AI_SEVERITY_DEBUG
Definition: Logging.hpp:68