AIToolbox
A library that offers tools for AI problem solving.
|
Go to the documentation of this file. 1 #ifndef AI_TOOLBOX_MDP_SARSAL_HEADER_FILE
2 #define AI_TOOLBOX_MDP_SARSAL_HEADER_FILE
39 using Trace = std::tuple<size_t, size_t, double>;
54 SARSAL(
size_t S,
size_t A,
double discount = 1.0,
double alpha = 0.1,
double lambda = 0.9,
double tolerance = 0.001);
72 template <IsGenerativeModel M>
73 SARSAL(
const M& model,
double alpha = 0.1,
double lambda = 0.9,
double tolerance = 0.001);
93 void stepUpdateQ(
size_t s,
size_t a,
size_t s1,
size_t a1,
double rew);
256 double lambda_, tolerance_;
264 template <IsGenerativeModel M>
265 SARSAL::SARSAL(
const M& model,
const double alpha,
const double lambda,
const double tolerance) :
266 SARSAL(model.getS(), model.getA(), model.getDiscount(), alpha, lambda, tolerance) {}