Learn R Programming

pomdp (version 1.0.0)

policy_graph: Extract the Policy Graph (as an igraph Object)

Description

Convert the policy graph in a POMDP solution object into an igraph object.

Usage

policy_graph(x, belief = TRUE, col = NULL)

Arguments

x

A POMDP object.

belief

logical; add belief proportions as a pie chart in each node of the graph? If belief points are provided by the solver, then these are used. If a number is specified, then a random sample of that size is used instead to calculate belief proportions.

col

colors used for the states in the belief proportions.

Value

An object of class igraph containing a directed graph.

See Also

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

Examples

Run this code
# NOT RUN {
data("Tiger")
sol <- solve_POMDP(model = Tiger)
sol

pg <- policy_graph(sol)

plot(pg)

# }

Run the code above in your browser using DataLab