-
Notifications
You must be signed in to change notification settings - Fork 28
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
Changes from 2 commits
4129be5
773fade
4fcb4d0
a053582
61aeab3
7aee1a3
6c743a2
ceb4437
9b2fa48
54523de
3ae58bc
4f6972c
c5ea4da
fde04d9
4d5dc46
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,9 +18,6 @@ end | |
discount::Float64 = 0.99 # discount factor | ||
end | ||
|
||
n_states(m::TMaze) = 2 * (m.n + 1) + 1 # 2*(corr length + 1 (junction)) + 1 (term) | ||
n_actions(::TMaze) = 4 | ||
n_observations(::TMaze) = 5 | ||
|
||
# state space is length of corr + 3 cells at the end | ||
# |G| | ||
|
@@ -80,7 +77,7 @@ end | |
support(d::TMazeInit) = zip(d.states, d.probs) | ||
function initialstate_distribution(maze::TMaze) | ||
s = states(maze) | ||
ns = n_states(maze) | ||
ns = length(s) | ||
p = zeros(ns) .+ 1.0 / (ns-1) | ||
p[end] = 0.0 | ||
#s1 = TMazeState(1, :north, false) | ||
|
@@ -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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would this |
||
s.term ? (return 5) : (nothing) | ||
x = s.x; g = s.g | ||
#if x == 1 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,8 +19,8 @@ let | |
r = simulate(sim, problem, policy, updater(policy), ib, true) | ||
@test r ≈ -100.0 atol=0.01 | ||
|
||
# test generate_o | ||
o = generate_o(problem, true, MersenneTwister(1)) | ||
# test gen(::o,...) | ||
o = gen(DDNOut(:o), problem, true, MersenneTwister(1)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. DDNNode There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
@test o == 1 | ||
# test vec | ||
ov = convert_s(Array{Float64}, true, problem) | ||
|
There was a problem hiding this comment.
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?There was a problem hiding this comment.
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?