Skip to contents

Determine the set of actions available in a state.

Usage

actions(x, state)

Arguments

x

a MDP pr POMDP object.

state

a character vector of length one specifying the state.

Value

a character vector with the available actions.

a vector with the available actions.

Details

Unavailable actions are modeled here a actions that have an immediate reward of -Inf in the reward function.

Author

Michael Hahsler

Examples

data(RussianTiger)

# The normal actions are "listen", "open-left", and "open-right".
# In the state "done" only the action "nothing" is available. 

actions(RussianTiger, state = "tiger-left")
#> [1] "listen"     "open-left"  "open-right"
actions(RussianTiger, state = "tiger-right")
#> [1] "listen"     "open-left"  "open-right"
actions(RussianTiger, state = "done")
#> [1] "nothing"