online_pomdp_planning.types module

Defines some types for ease of reading

online_pomdp_planning.types.Action

The abstract type representing actions requires to be hash-able

alias of Hashable

class online_pomdp_planning.types.ActionObservation(action: Hashable, observation: Hashable)[source]

Bases: tuple

Action-Observation tuple

Create new instance of ActionObservation(action, observation)

property action

Alias for field number 0

property observation

Alias for field number 1

class online_pomdp_planning.types.Belief(*args, **kwds)[source]

Bases: typing_extensions.Protocol

The abstract type representing beliefs

We expect the belief to sample states

__call__()[source]

Required implementation of belief: the ability to sample states

Return type

Any

online_pomdp_planning.types.History

The abstract type of (observable) history: list of action-observation tuples

alias of List[online_pomdp_planning.types.ActionObservation]

online_pomdp_planning.types.Info

Data type used for information flow from implementation to caller

alias of Dict[str, Any]

online_pomdp_planning.types.Observation

The abstract type representing observations requires to be hash-able

alias of Hashable

class online_pomdp_planning.types.Planner(*args, **kwds)[source]

Bases: typing_extensions.Protocol

The abstract class representation for planners in this package

__call__(belief)[source]

The main functionality this package offers: a method that takes in a belief and returns an action

Parameters

belief (Belief) –

Return type

Tuple[Hashable, Dict[str, Any]]

Returns

the chosen action and run-time information

class online_pomdp_planning.types.Simulator(*args, **kwds)[source]

Bases: typing_extensions.Protocol

The abstract type representing simulators

We expect simulators to map a state and action into a next state, observation, reward and terminal signal

__call__(s, a)[source]

Simulate a transition

state, action -> next state, observation, reward, terminal generator

Args:

s (State): an input state a (Action): a chosen action

Returns:

Tuple[State, Observation, float, bool]:

Return type

Tuple[Any, Hashable, float, bool]

online_pomdp_planning.types.State = typing.Any

The abstract type for a state, no particular protocol is expected