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

Compatibility with the POMDPs v0.8 release #56

Merged
merged 15 commits into from Oct 11, 2019
Merged

Conversation

Shushman
Copy link
Contributor

No description provided.

@coveralls
Copy link

coveralls commented Sep 26, 2019

Coverage Status

Coverage decreased (-0.3%) to 65.806% when pulling 4d5dc46 on pomdps-v0.8-compat into e6fb186 on master.

Copy link
Contributor

@MaximeBouton MaximeBouton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we remove the legacy grid world now?

@zsunberg
Copy link
Member

I don't think we should remove legacy grid world - there are a bunch of tests that rely on the exact value function for it. We should, however remove the old GridWorld alias for the LegacyGridWorld that has been deprecated. I also think we can remove the visualization of LegacyGridWorld which can remove the TikzPicture dep

@zsunberg
Copy link
Member

thanks for working on this!

src/CryingBabies.jl Outdated Show resolved Hide resolved
Project.toml Outdated
@@ -18,8 +18,9 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"

[compat]
POMDPSimulators = "< 0.3.0"
julia = "1"
POMDPSimulators = "0.3.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should be POMDPSimulators = "0.3". Does the difference make sense?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, so it subsumes any 0.3.x versions?

Project.toml Outdated Show resolved Hide resolved
src/TMazes.jl Outdated
@@ -219,7 +216,7 @@ function stateindex(maze::TMaze, s::TMazeState)
end
end

function generate_o(maze::TMaze, s::TMazeState, rng::AbstractRNG)
function gen(::DDNOut{:o}, maze::TMaze, s::TMazeState, rng::AbstractRNG)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like the observation only depends on sp, so we should just implement observation(::TMaze, sp) and no other methods of observation or gen

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this observation return a BoolDistribution?

src/TigerPOMDPs.jl Outdated Show resolved Hide resolved
test/crying.jl Outdated
# test generate_o
o = generate_o(problem, true, MersenneTwister(1))
# test gen(::o,...)
o = gen(DDNOut(:o), problem, true, MersenneTwister(1))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DDNNode

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this because it is an initial observation? I thought solvers etc. should call DDNOut

src/TigerPOMDPs.jl Outdated Show resolved Hide resolved
@Shushman
Copy link
Contributor Author

I'm going to be unavailable for most of the rest of today. The outstanding items seem to be
(i) Removing the deprecated GridWorld ref and the legacy visualization
(ii) Changing the gen in src/TMazes.jl to the corresponding observation

If this is time-sensitive, could one of @zsunberg or @MaximeBouton see this through? Otherwise, I can get to it tomorrow.

@MaximeBouton
Copy link
Contributor

Is there anything left to fix here?

@zsunberg
Copy link
Member

zsunberg commented Oct 9, 2019

I'm planning to check through it this afternoon and see.

Do we want to add initialobs and wait for POMDPs 0.8.1 (maybe a couple days)?

@MaximeBouton
Copy link
Contributor

So far it is using observation(m, s) for TMaze, I thought initialobs would call this by default so no need to implement it?
Or are you saying we should implement initialobs for some of the problems?

@zsunberg
Copy link
Member

zsunberg commented Oct 9, 2019

Oh, ok, yeah as long as we don't have gen(DDNNode{:o}, m, s, rng) (our original initial observation idea for 0.8), then I think it is fine to go ahead. Let me take a couple minutes to check through it (Does it look good to you? If so I can merge it when I'm done checking)

@MaximeBouton
Copy link
Contributor

I found a couple of DDNNode remaining, I am on it.

A second point is that some of these implementation could really be modernized (especially TMaze), I am not sure if we should do it now or in a separate PR.

@zsunberg
Copy link
Member

zsunberg commented Oct 9, 2019

I found a couple of DDNNode remaining, I am on it.

Haha, wait @MaximeBouton DDNNode itself is not always wrong! It is only that specific one for the initial observation.

A second point is that some of these implementation could really be modernized (especially TMaze), I am not sure if we should do it now or in a separate PR.

I vote another PR. Usually better to just get everything working as soon as possible, then make it nicer later

@zsunberg
Copy link
Member

zsunberg commented Oct 9, 2019

@MaximeBouton the only bad DDNNode I see is the one in Tiger. The one in Mountain Car is right.

@MaximeBouton
Copy link
Contributor

The tiger POMDP had this:

function gen(::DDNNode{:o}, p::TigerPOMDP, s::Bool, rng::AbstractRNG)
    d = observation(p, 0, s) # obs distribution not action dependent
    return rand(rng, d)
end

This should typically be replaced by initialobs.
I am fine with waiting for POMDPs v0.8.1

@Shushman
Copy link
Contributor Author

Shushman commented Oct 9, 2019

Thanks for helping see this to completion!

@MaximeBouton
Copy link
Contributor

@zsunberg did I get the compat right?

@zsunberg
Copy link
Member

@zsunberg did I get the compat right?

I think it should just be "0.8.1". https://julialang.github.io/Pkg.jl/v1/compatibility/index.html#Caret-specifiers-1 - no specifier is the same as a caret specifier, and it says "^0.2.3" is compatible with the range [0.2.3, 0.3.0), and the range we want is [0.8.1, 0.9.0). I made the change. I think it looks good now though! Tag a release when ready or I can if you want me to.

@MaximeBouton MaximeBouton merged commit 608dd9c into master Oct 11, 2019
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

Successfully merging this pull request may close these issues.

None yet

5 participants