Skip to content
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

terminal support #5

Open
zsunberg opened this issue Sep 29, 2020 · 5 comments
Open

terminal support #5

zsunberg opened this issue Sep 29, 2020 · 5 comments

Comments

@zsunberg
Copy link
Member

This package does not seem to support isterminal.

@mykelk
Copy link
Member

mykelk commented Jun 7, 2023

Should it? How would it be specified in a file? Zero transition probabilities? The behavior doesn't seem to be specified here:
https://pomdp.org/code/pomdp-file-spec.html

@zsunberg
Copy link
Member Author

zsunberg commented Jun 7, 2023

Good question. I can't seem to follow my own breadcrumbs back to the original problem, but I think the fundamental issue is what to do with cases like this:

transition(m::InconsistentTerminalPOMDP, s, a) = Deterministic(s+a)
reward(m::InconsistentTerminalPOMDP, s, a) = s^2
isterminal(m::InconsistentTerminalPOMDP, s) = s >= 3

If the solver or file format takes isterminal into account, the solution (try to stop at s=2) will be vastly different than if it doesn't (make s as large as possible). Should this be considered a well-formed POMDP model?

@mykelk
Copy link
Member

mykelk commented Jun 8, 2023

I believe isterminal should win out over the transition probabilities. If the transition probabilities are all zero, then it will be treated as terminal even if isterminal is false. What do you think of that convention? If this is the case, then I think we don't have to change anything in POMDPFiles.jl.

@zsunberg
Copy link
Member Author

zsunberg commented Jun 8, 2023

That is indeed the unofficial . However, it puts a very large burden on solver-writers to remember to check. This is an issue that should be clarified in the POMDPs.jl documentation and we should put it in a linter someday (JuliaPOMDP/POMDPs.jl#232).

Currently, POMDPFiles does NOT handle this correctly. It never checks isterminal.

@mykelk
Copy link
Member

mykelk commented Jun 8, 2023

Ah, got it. It should be checking that for the write command. That should be relatively straightforward to add to the loop here:
https://github.com/JuliaPOMDP/POMDPFiles.jl/blob/master/src/write.jl
Probably right after line 58.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants