AIToolbox
A library that offers tools for AI problem solving.
AIToolbox::CassandraParser Class Reference

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...
 

Detailed Description

This class can parse files containing MDPs and POMDPs in the Cassandra file format.

Member Typedef Documentation

◆ MDPVals

using AIToolbox::CassandraParser::MDPVals = std::tuple<size_t, size_t, DumbMatrix3D, DumbMatrix3D, double>

◆ POMDPVals

using AIToolbox::CassandraParser::POMDPVals = std::tuple<size_t, size_t, size_t, DumbMatrix3D, DumbMatrix3D, DumbMatrix3D, double>

Constructor & Destructor Documentation

◆ CassandraParser()

AIToolbox::CassandraParser::CassandraParser ( )

Basic constructor.

Member Function Documentation

◆ parseMDP()

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).

Parameters
inputThe input stream to parse.
Returns
A tuple containing S, A, T, R, and discount of the parsed MDP.

◆ parsePOMDP()

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).

Parameters
inputThe input stream to parse.
Returns
A tuple containing S, A, O, T, R, W, and discount of the parsed POMDP.

The documentation for this class was generated from the following file: