AIToolbox
A library that offers tools for AI problem solving.
|
Go to the documentation of this file. 1 #ifndef AI_TOOLBOX_MDP_GENERATIVE_MODEL_PYTHON_HEADER_FILE
2 #define AI_TOOLBOX_MDP_GENERATIVE_MODEL_PYTHON_HEADER_FILE
4 #include <boost/python.hpp>
5 #include <boost/python/object.hpp>
34 instance_(instance) {}
39 size_t getS()
const {
return boost::python::extract<size_t>(instance_.attr(
"getS")()); }
44 size_t getA()
const {
return boost::python::extract<size_t>(instance_.attr(
"getA")()); }
49 double getDiscount()
const {
return boost::python::extract<double>(instance_.attr(
"getDiscount")()); }
54 bool isTerminal(
const size_t s)
const {
return boost::python::extract<bool>(instance_.attr(
"isTerminal")(s)); }
59 std::tuple<size_t, double>
sampleSR(
const size_t s,
const size_t a)
const {
60 return boost::python::extract<std::tuple<size_t, double>>(instance_.attr(
"sampleSR")(s, a));
64 boost::python::object instance_;