return only one dimension in multidimensional observation? #378
-
Hej, I just found your julia package and it looks great. Anyway, I've got a short question. I've got a problem in a, say, two dimensional space and two actions that lead to observations only for one of the dimensions. To express it generator-like with (x, y)-tuples for actions a_1 and a_2: ((s'_x, s'_y), (o_x, ??), r) = G((s_x, s_y), a_1) How can I express this best using the framework? Thanks for your help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @doweichert , I would recommend just returning one number for the observation. Since the observation distribution is conditioned on the action, belief updaters and solvers will be able to "understand" that the observation is the x dimension when action 1 is taken and in the y dimension when action 2 is taken. It's also worth noting that for most belief updaters (e.g. particle filters) you will need the explicit observation distribution. Therefore I would recommend implementing the problem something like this (let's say that there is Gaussian noise with standard deviation 1 on the observation): m = QuickPOMDP(
obstype = Float64,
gen = function (s, a, rng)
# sample s' and r
return (sp = (spx, spy), r=r)
end,
observation = function (a, sp)
if a == a1
return Normal(sp[1], 1.0)
else
@assert a == a2
return Normal(sp[2], 1.0)
end
end,
# specify other problem elements like initialstate here.
) |
Beta Was this translation helpful? Give feedback.
Hi @doweichert , I would recommend just returning one number for the observation. Since the observation distribution is conditioned on the action, belief updaters and solvers will be able to "understand" that the observation is the x dimension when action 1 is taken and in the y dimension when action 2 is taken. It's also worth noting that for most belief updaters (e.g. particle filters) you will need the explicit observation distribution. Therefore I would recommend implementing the problem something like this (let's say that there is Gaussian noise with standard deviation 1 on the observation):