sample_belief_space {pomdp} | R Documentation |
Sample points from belief space using a several sampling strategies.
sample_belief_space(model, projection = NULL, n = 1000, method = "random", ...)
model |
a unsolved or solved POMDP. |
projection |
Sample in a projected belief space. All states not
included in the projection are held at a belief of 0. |
n |
size of the sample. For trajectories, it is the number of trajectories. |
method |
character string specifying the sampling strategy. Available
are |
... |
for the trajectory method, further arguments are passed on to |
The purpose of sampling from the belief space is to provide good coverage or to sample belief points that are more likely to be encountered (see trajectory method). The following sampling methods are available:
'random'
samples uniformly sample from the projected belief space using
the method described by Luc Devroye (1986).
'regular'
samples points using a
regularly spaced grid. This method is only available for projections on 2 or
3 states.
'vertices'
only samples from the vertices of the belief space.
"trajectories"
returns the belief states encountered in n
trajectories of length horizon
starting at the
model's initial belief. Thus it returns n
x horizon
belief states and will contain duplicates.
Projection is not supported for trajectories. Additional
arguments can include the simulation horizon
and the start belief
which are passed on to simulate_POMDP()
.
Returns a matrix. Each row is a sample from the belief space.
Michael Hahsler
Luc Devroye, Non-Uniform Random Variate Generation, Springer Verlag, 1986.
Other POMDP:
POMDP()
,
plot_belief_space()
,
simulate_POMDP()
,
solve_POMDP()
,
solve_SARSOP()
,
transition_matrix()
,
update_belief()
,
write_POMDP()
data("Tiger")
sample_belief_space(Tiger, n = 5)
sample_belief_space(Tiger, n = 5, method = "regular")
sample_belief_space(Tiger, n = 5, horizon = 5, method = "trajectories")
# sample and calculate the reward for a solved POMDP
sol <- solve_POMDP(Tiger)
samp <- sample_belief_space(sol, n = 5, method = "regular")
rew <- reward(sol, belief = samp)
cbind(samp, rew)