policy {pomdp}R Documentation

Extract the Policy from a POMDP/MDP

Description

Extracts the policy from a solved POMDP/MDP.

Usage

policy(x)

Arguments

x

A solved POMDP object.

Details

A list (one entry per epoch) with the optimal policy. For converged, infinite-horizon problems solutions, a list with only the converged solution is produced. The policy is a data.frame consisting o:

Value

A list with the policy for each epoch.

Author(s)

Michael Hahsler

See Also

Other policy: optimal_action(), plot_value_function(), policy_graph(), reward(), solve_POMDP(), solve_SARSOP()

Examples

data("Tiger")

# Infinite horizon
sol <- solve_POMDP(model = Tiger)
sol

# policy with value function, optimal action and transitions for observations.
policy(sol)
plot_value_function(sol)

# Finite horizon (we use incremental pruning because grid does not converge)
sol <- solve_POMDP(model = Tiger, method = "incprune", horizon = 3, discount = 1)
sol

policy(sol)
# Note: We see that it is initially better to listen till we make a decision in the final epoch. 

[Package pomdp version 1.0.3 Index]