Tutorial 7
Tutorial 7
Using the recursive equation there are two general steps for a Bayes filter, the prediction and
correction steps.
The prediction model states a probability that an action brings the state from the previous state to
the current state.
Example :
x: {door.open, door.closed}
u: {do.nothing, do.push} z:
{sense.open, sense.closed}
And let’s assume a uniform distribution with probabilities at the initial time step of:
For our example let’s compute how the belief changes over two time steps. To do so we can
arbitrarily select our inputs to send to the robot and what observations were observed for the sake
So, our robot will do nothing but observe an open door on the first time step and then on the second
time step it will take in an input/action of pushing and observe, again, an open door Let’s say the
probability of sensing an open door given that the door is open is 60%.
0.80
Transition Model
Let’s define the probability of the door being open given that the door was previously open and the
input was to do nothing as being 100%. Conversely, the probability of the door being closed given
that it was previously believed to be open and nothing was done as 0%.
We can do the same for when the previous belief is that the door was closed.
And now we need to explore what happens when the robot pushes or does not push. If the door is
open on the previous state and we push, we will assume 100% probability in the door continuing to
be open. However, if the door was closed on the previous state and we push, we will assume that it
is likely the push succeeded to now open the door, but that there is a chance it might have failed.
For this, let’s assume 80% and 20% respectively.
The probabilities are the same regardless of the time step. They represent the observations and
transitions that the state might take which we will need to use in our Bayes filter
Now we can use the above probabilities and the two steps in the Bayes filter algorithm to find our
beliefs at the two time steps for the robot trying to go through a door.
t=1
Prediction step :
Correction step:
= η (0.60)(0.50)
= (0.3) η
= η (0.20)(0.50)
= (0.1) η
Before we finish we need the probabilities to sum to one to uphold the correct probability
properties:
0.30η + 0.10η = 1
0.4η = 1 η = 2.5
= door.closed) = 0.25
We can repeat this for the second time step (on the second time step it will take in an input/action
of pushing):
Prediction step :
Correction step :
As we can see after one time step it is likely that the door is open. We reserve some probability to
the door being closed and potentially our sensors are off. However, after a second time step with a
pushing input we are even more certain in our belief of the state that the door is open by using this
discrete Bayesian filter algorithm.
Best wish
Thanks