Learn R Programming

pomdp (version 1.0.0)

update_belief: Belief Update

Description

Update the belief given a taken action and observation.

Usage

update_belief(
  model,
  belief = NULL,
  action = NULL,
  observation = NULL,
  episode = 1,
  digits = 7,
  drop = TRUE
)

Arguments

model

a POMDP object.

belief

the current belief state. Defaults to the start belief state specified in the model or "uniform".

action

the taken action.

observation

the received observation.

episode

Use transition and observation matrices for the given episode for time-dependent POMDPs (see POMDP).

digits

round decimals.

drop

logical; drop the result to a vector if only a single belief state is returned.

Details

Update the belief state \(b\) (belief) with an action \(a\) and observation \(o\). The new belief state \(b'\) is:

$$b'(s') = \eta O(o | s',a) \sum_{s \in S} T(s' | s,a) b(s)$$

where \(\eta = 1/ \sum_{s' \in S}[ O(o | s',a) \sum_{s \in S} T(s' | s,a) b(s)]\) normalizes the new belief state so the probabilities add up to one.

See Also

Other POMDP: POMDP(), plot_belief_space(), sample_belief_space(), simulate_POMDP(), solve_POMDP(), solve_SARSOP(), transition_matrix(), write_POMDP()

Examples

Run this code
# NOT RUN {
data(Tiger)

update_belief(c(.5,.5), model = Tiger)
update_belief(c(.5,.5), action = "listen", observation = "tiger-left", model = Tiger)
update_belief(c(.15,.85), action = "listen", observation = "tiger-right", model = Tiger)

# }

Run the code above in your browser using DataLab