|
| SAState (const vector< AType > &actions) |
| Initializes state with actions and sets them all to valid.
|
|
size_t | action_count () const |
| Number of actions.
|
|
size_t | size () const |
| Number of actions.
|
|
AType & | create_action (long actionid) |
| Creates an action given by actionid if it does not exists. More...
|
|
AType & | create_action () |
| Creates an action at the last position of the state.
|
|
const AType & | get_action (long actionid) const |
| Returns an existing action.
|
|
const AType & | operator[] (long actionid) const |
| Returns an existing action.
|
|
AType & | get_action (long actionid) |
| Returns an existing action.
|
|
AType & | operator[] (long actionid) |
| Returns an existing action.
|
|
bool | is_valid (long actionid) const |
| Returns whether the actions is valid.
|
|
void | set_valid (long actionid, bool value=true) |
| Set action validity. More...
|
|
const vector< AType > & | get_actions () const |
| Returns set of all actions.
|
|
bool | is_terminal () const |
| True if the state is considered terminal (no actions). More...
|
|
void | normalize () |
| Normalizes transition probabilities to sum to one. More...
|
|
bool | is_action_correct (long aid, numvec nataction) const |
| Checks whether the prescribed action and outcome are correct.
|
|
bool | is_action_correct (long aid) const |
| Checks whether the prescribed action correct.
|
|
prec_t | mean_reward (long actionid, numvec nataction) const |
| Returns the mean reward following the action (and outcome). More...
|
|
prec_t | mean_reward (long actionid) const |
| Returns the mean reward following the action. More...
|
|
Transition | mean_transition (long action, numvec nataction) const |
| Returns the mean transition probabilities following the action and outcome. More...
|
|
Transition | mean_transition (long action) const |
| Returns the mean transition probabilities following the action and outcome. More...
|
|
string | to_json (long stateid=-1) const |
| Returns json representation of the state. More...
|
|
template<class AType>
class craam::SAState< AType >
State for sa-rectangular uncertainty (or no uncertainty) in an MDP.
Actions within a state are sequentially labeled. That is, adding an action with an id = 3 will also create actions 0,1,2. These additional actions are marked as "invalid" state. This means that they will not be used in computations and algorithms will simply skip over them. Use create_action
to make and action valid.
- Template Parameters
-
Type | of action used in the state. This type determines the type of uncertainty set. |