Skip to content

DiscreteUpdater does not take isterminal into account #471

Open
@zsunberg

Description

@zsunberg
Member

Currently the DiscreteUpdater does not check for terminal states.

If isterminal and the simulator are implemented correctly, if we receive an observation, we should be able to conclude that we were not in a terminal state.

Activity

added
Contribution OpportunityThis would be something that would be very useful to the community and a good modular addition.
on Apr 8, 2023
dylan-asmar

dylan-asmar commented on Jan 8, 2024

@dylan-asmar
Member

This isn't an issue if the observation function is defined correctly, right?

In update(bu::DiscreteUpdater, b::DiscreteBelief, a, o), we have

for (sp, tp) in weighted_iterator(td)
    spi = stateindex(pomdp, sp)
    op = obs_weight(pomdp, s, a, sp, o) 

    bp[spi] += op * tp * b.b[si]
end

My thoughts are if we aren't expecting an observation if sp is terminal, then that should be reflected in op = obs_weight(pomdp, s, a, sp, o).

Is there a case you saw or were thinking of where this isn't the case?

zsunberg

zsunberg commented on Jan 9, 2024

@zsunberg
MemberAuthor

I think solvers, belief updaters, and simulators should avoid calling obs_weight or observation when s is terminal. We should not force problem implementers to define obs_weight or observation when s is terminal since it is often not clear what observation distribution should be returned, and it will just force them to write dummy code to handle that case.

dylan-asmar

dylan-asmar commented on Jan 10, 2024

@dylan-asmar
Member

That makes sense to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Contribution OpportunityThis would be something that would be very useful to the community and a good modular addition.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @zsunberg@dylan-asmar

        Issue actions

          DiscreteUpdater does not take isterminal into account · Issue #471 · JuliaPOMDP/POMDPs.jl