CRAAM
2.0.0
Robust and Approximate Markov Decision Processes
|
Action in a regular MDP. More...
#include <Action.hpp>
Public Member Functions | |
RegularAction () | |
Creates an empty action. More... | |
RegularAction (const Transition &outcome) | |
Initializes outcomes to the provided transition vector. | |
vector< Transition > | get_outcomes () const |
Returns the outcomes. More... | |
const Transition & | get_outcome (long outcomeid) const |
Returns the single outcome. More... | |
Transition & | get_outcome (long outcomeid) |
Returns the single outcome. More... | |
const Transition & | operator[] (long outcomeid) const |
Returns the outcome. | |
Transition & | operator[] (long outcomeid) |
Returns the outcome. | |
const Transition & | get_outcome () const |
Returns the single outcome. More... | |
Transition & | get_outcome () |
Returns the single outcome. More... | |
Transition & | create_outcome (long outcomeid) |
Adds a sufficient number of empty outcomes for the outcomeid to be a correct identifier. More... | |
void | normalize () |
Normalizes transition probabilities. | |
size_t | outcome_count () const |
Returns number of outcomes (1). More... | |
void | to_string (string &result) const |
Appends a string representation to the argument. | |
bool | is_nature_correct (numvec oid) const |
Whether the provided outcome is valid. More... | |
prec_t | mean_reward () const |
Returns the mean reward from the transition. More... | |
prec_t | mean_reward (numvec natpolicy) const |
Returns the mean reward from the transition. More... | |
Transition | mean_transition () const |
Returns the mean transition probabilities. More... | |
Transition | mean_transition (numvec natpolicy) const |
Returns the mean transition probabilities. More... | |
string | to_json (long actionid=-1) const |
Returns a json representation of the action. More... | |
Protected Attributes | |
Transition | outcome |
Transition probabilities. | |
Action in a regular MDP.
There is no uncertainty and the action contains only a single outcome.
|
inline |
Creates an empty action.
|
inline |
Adds a sufficient number of empty outcomes for the outcomeid to be a correct identifier.
This method does nothing in this action.
|
inline |
Returns the single outcome.
|
inline |
Returns the single outcome.
|
inline |
Returns the single outcome.
|
inline |
Returns the single outcome.
|
inline |
Returns the outcomes.
|
inline |
Whether the provided outcome is valid.
Check only size, not that the distribution sums to any particular number.
|
inline |
Returns the mean reward from the transition.
Returns the mean reward from the transition.
natpolicy | Nature can choose the probability distribution |
|
inline |
Returns the mean transition probabilities.
Ignore rewards.
|
inline |
Returns the mean transition probabilities.
Ignore rewards.
natpolicy | Nature can choose a non-zero state to go to |
|
inline |
Returns number of outcomes (1).
|
inline |
Returns a json representation of the action.
actionid | Whether to include action id |