Skip to content

How to specify initial state distribution when using stepthrough #468

Discussion options

You must be logged in to vote

The docs are here https://juliapomdp.github.io/POMDPs.jl/stable/POMDPTools/simulators/#POMDPTools.Simulators.stepthrough, but there are a lot of options, so it can be confusing.

If it is an MDP, ust sample from the distribution before calling stepthrough:

initial_state_dist = Deterministic( ... ) 
initial_state = rand(initial_state_dist)
for (a, b, s) in stepthrough(mdp, planner, initial_state, "a,b,s", max_steps=50)
    ...
end

If it is a POMDP, you have to explicitly pass the updater, and then the initial state distribution and initial belief are the same thing.

initial_state_dist = Deterministic( ... ) 
up = updater(planner)
for (a, b, s) in stepthrough(pomdp, planner, up, initial_stat…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zsunberg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants