AIToolbox
A library that offers tools for AI problem solving.
|
This class can parse files containing MDPs and POMDPs in the Cassandra file format. More...
#include <AIToolbox/Tools/CassandraParser.hpp>
Public Types | |
using | MDPVals = std::tuple< size_t, size_t, DumbMatrix3D, DumbMatrix3D, double > |
using | POMDPVals = std::tuple< size_t, size_t, size_t, DumbMatrix3D, DumbMatrix3D, DumbMatrix3D, double > |
Public Member Functions | |
CassandraParser () | |
Basic constructor. More... | |
MDPVals | parseMDP (std::istream &input) |
This function parses the input following Cassandra's rules. More... | |
POMDPVals | parsePOMDP (std::istream &input) |
This function parses the input following Cassandra's rules. More... | |
This class can parse files containing MDPs and POMDPs in the Cassandra file format.
using AIToolbox::CassandraParser::MDPVals = std::tuple<size_t, size_t, DumbMatrix3D, DumbMatrix3D, double> |
using AIToolbox::CassandraParser::POMDPVals = std::tuple<size_t, size_t, size_t, DumbMatrix3D, DumbMatrix3D, DumbMatrix3D, double> |
AIToolbox::CassandraParser::CassandraParser | ( | ) |
Basic constructor.
MDPVals AIToolbox::CassandraParser::parseMDP | ( | std::istream & | input | ) |
This function parses the input following Cassandra's rules.
This function only parses for information regarding an MDP, so number of states, number of actions, discount and transition/reward functions.
Any problems during parsing result in an std::runtime_error.
The output is returned as a set of values which if needed can be used to build an MDP::Model.
No checks are done here regarding the consistency of the read data (transition probabilities, etc).
input | The input stream to parse. |
POMDPVals AIToolbox::CassandraParser::parsePOMDP | ( | std::istream & | input | ) |
This function parses the input following Cassandra's rules.
this function only parses for information regarding an pomdp, so number of states, number of actions, number of observations, discount and transition/reward/observation functions.
Any problems during parsing result in an std::runtime_error.
The output is returned as a set of values which if needed can be used to build an POMDP::Model.
No checks are done here regarding the consistency of the read data (transition probabilities, etc).
input | The input stream to parse. |