PomdpXReader#
- class pgmpy.readwrite.PomdpXReader(path=None, string=None)[source]#
Bases:
objectInitialize an instance of PomdpX reader class
- Parameters:
- pathfile or str
Path of the file containing PomdpX information.
- stringstr
String containing PomdpX information.
- get_description()[source]#
Return the problem description
Examples
>>> reader = PomdpXReader("Test_Pomdpx.xml") >>> reader.get_description() 'RockSample problem for map size 1 x 3. Rock is at 0, Rover’s initial position is at 1. Exit is at 2.' >>> reader = PomdpXReader("Test_PomdpX.xml") >>> reader.get_description() 'RockSample problem for map size 1 x 3. Rock is at 0, Rover’s initial position is at 1. Exit is at 2.'
- get_initial_beliefs()[source]#
Returns the state, action and observation variables as a dictionary in the case of table type parameter and a nested structure in case of decision diagram parameter
Examples
>>> reader = PomdpXReader("Test_PomdpX.xml") >>> reader.get_initial_beliefs() [{'Var': 'rover_0', 'Parent': ['null'], 'Type': 'TBL', 'Parameter': [{'Instance': ['-'], 'ProbTable': ['0.0', '1.0', '0.0']}] }, {'Var': '', '...': ...,' '...': '...', }]
- get_obs_function()[source]#
Returns the observation function as nested dict in the case of table- type parameter and a nested structure in case of decision diagram parameter
- get_parameter(var)[source]#
This method supports the functional tags by providing the actual values in the function as list of dict in case of table type parameter or as nested dict in case of decision diagram
- get_parameter_dd(parameter)[source]#
This method returns parameters as nested dicts in case of decision diagram parameter.
- get_parameter_tbl(parameter)[source]#
This method returns parameters as list of dict in case of table type parameter
- get_reward_function()[source]#
Returns the reward function as nested dict in the case of table- type parameter and a nested structure in case of decision diagram parameter