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

Transition function return values #11

Open
matthhong opened this issue Apr 29, 2020 · 1 comment
Open

Transition function return values #11

matthhong opened this issue Apr 29, 2020 · 1 comment

Comments

@matthhong
Copy link

matthhong commented Apr 29, 2020

Hey Zach,

Referencing these lines:
https://github.com/JuliaPOMDP/QuickPOMDPs.jl/blob/master/src/discrete_explicit.jl#L162

Currently the inner for xp in ss loop evaluates the transition probabilities for each state-action combo, and populates a SparceCat distribution.

This creates a pretty big bottleneck, especially if the transition function itself is costly.

In your other models (e.g. https://github.com/JuliaPOMDP/POMDPModels.jl/blob/master/src/TigerPOMDPs.jl), T doesn't take a future state as a param. So they just return Distribution objects.

In discrete_explicit.jl, would it be possible to allow two different signatures for T (one taking s, a, and sp as inputs, and another taking only s and a), so it can skip the last inner loop when T returns a Distribution object?

If so, I could create a PR for it? Seems pretty straightforward.

@zsunberg
Copy link
Member

Hey, thanks for thinking of this. There are actually two interfaces here - the QuickPOMDPs interface and the DiscreteExplicit interface.

In the QuickPOMDPs interface, you do write functions that return distributions. For example, https://github.com/JuliaPOMDP/QuickPOMDPs.jl/blob/master/examples/lightdark.jl

The DiscreteExplicit interface was really only meant for very simple problems, and even for those, as we found in class, it is fairly unweildy. I think maybe I should move it to another package to reduce confusion.

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

No branches or pull requests

2 participants