-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for custom initial belief (e.g., solving many POMDPs with varying beliefs) #20
Comments
@jmuchovej Yes, I agree we should add this! But, we should make it a solver constructor argument rather than a keyword argument for |
@zsunberg How would you see the solver constructor argument being handled? As far as I understand, solvers are problem-independent. So, it would have to be something like a function, the default for which would be something like |
Yeah, that seems like a good way to handle it. |
Hmm... is "problem", in SARSOP's case, defined as the reward function only or the (reward function, initial belief) pair?
If the aim is to define an initial belief using the POMDPs interface – I definitely agree this would be ideal! However, it strikes me as potentially odd that either:
FWIW: I'm not tied to the When I read "solvers are problem-independent"1, that strikes me as: "instantiate the solver once and reuse to your heart's content". So, if I had 200 different initial beliefs and 200 different Footnotes
|
In POMPDs.jl, the initial belief is part of the problem definition via @WhiffleFish 's solution should accommodate all use cases elegantly. |
Thanks for clarifying! 🙂 So, I see what you mean, but I don't think If this is the case: perhaps you meant that If you actually meant that
|
I think you will be able to do this:
Or, if you wanted to avoid reconstructing the solver, you could "capture" the belief variable like this:
Does that make more sense? (make sure you understand what the |
Yep! I know about this – this is what I was referring to with "non-local variables" (option 1 in my "making |
The concept of |
@mykelk I see. Thanks for elaborating. @zsunberg @WhiffleFish I can work on this over the coming week, will update #21 once I've done so. Do we want tests for this? I suspect so, but I suspect things like the Tiger and Baby POMDPs will be trivial – I was thinking of using RockSample and possible LaserTag? I'm not too familiar with the LaserTag POMDP though. |
Thanks, @jmuchovej ! Yes, we should have tests for it. I think Baby and Tiger tests will actually be sufficient. As long as the tests exercise all of the lines of code in the project, it is not that important how large the problems are. |
Currently,
_vectorized_initialstate
takes thepomdp
andordered_states
then uses theinitialstate(::POMDP)
to initializeb0
; however, SARSOP is able to begin from any point in the belief-space, so it makes sense to allow users to provide an initial belief (perhaps in sparse form?) from which to commence SARSOP.I'd be happy to write/submit a PR for this, but wanted to open an issue to see if it was something y'all would be willing to accept. 🙂
Changes that I think that would be necessary to support this. I could probably tackle this in the next week or two, if an acceptable PR.
So long as
b0
is guaranteed to be compatible withpdf(b0, S[i])
, these are all the changes necessary. Otherwise, there would need to be some handling to ensure thatb0
is either compatible with vectorizing or allow folks to specify how to achieve the equivalent ofpdf(b0, S[i])
.Perhaps if there were functions in
POMDPTools
that support this kinda interface, that could be interesting but is way out of scope for this issue/PR. (e.g. going from marginal beliefs to relevantSparseCat
and the like.)The text was updated successfully, but these errors were encountered: