[ad_1]

In this assignment, we aim to implement Robot Localization with the HMM algorithm.
1 Instructions
We assume that a robot aims to locate itself in the windy maze as shown in the above. The robot
will perform two kinds of actions: sensing and moving.
ˆ Sensing: In a square, the robot will sense the four directions to see if there is an obstacle in
this direction. We assume that the whole maze is surrounded by obstacles and the black squares
are also obstacle. However, the sensing is not perfect. We assume that the robot can detect
the obstacle with 85% if there is and might mistake an open square as a obstacle with 5%. The
detections in all directions are done independently.
ˆ Moving: In the windy situation, the robot can drift to the left or the right with probability 0.1. If
the drifting direction is an obstacle, it will be bounced back to the original position. For example,
in the square of left bottom, if the robot moves northward, it will reach the square to the north
with 80% and reach the square to the east with 10% and be bounced back to the original position
with 10%.
We assume that the robot initially stays in one open square, but it doesn’t know its exact location
except that it knows that it can’t be in any obstacle square. Then the robot performs the following
sequence of actions:
1
1. Sensing: [0, 0, 0, 0]
2. Moving: N
3. Sensing: [1, 0, 0, 0]
4. Moving: N
5. Sensing: [1, 0, 0, 0]
6. Moving: W
7. Sensing: [1, 0, 0, 0]
8. Moving: N
9. Sensing: [0, 0, 0, 0]
where (W,N,E,S) indicates the observation at Directions (Westward, Northward, Eastward, Southward),
respectively. “0” indicates no obstacle is observed and “1” indicates an obstacle is observed.
You are expected to report all the prior and posterior probabilities of the latest robot location at
each square after each action as follows (2.70 means 2.70%):
Initial Location Probabilities
2.70 2.70 2.70 2.70 2.70 2.70 2.70
2.70 2.70 2.70 2.70 2.70 #### 2.70
2.70 #### 2.70 2.70 #### 2.70 2.70
2.70 #### 2.70 2.70 #### 2.70 2.70
2.70 2.70 2.70 2.70 2.70 2.70 2.70
2.70 2.70 2.70 2.70 2.70 2.70 2.70
Filtering after Evidence [0, 0, 0, 0]
0.29 1.81 1.81 1.81 1.81 0.29 0.29
1.81 1.81 11.46 11.46 0.29 #### 0.29
0.29 #### 1.81 1.81 #### 0.29 1.81
0.29 #### 1.81 1.81 #### 1.81 1.81
1.81 1.81 11.46 11.46 1.81 11.46 1.81
0.29 1.81 1.81 1.81 1.81 1.81 0.29
2
Prediction after Action N
1.89 3.11 10.98 10.98 1.89 0.44 0.51
0.59 1.33 2.78 2.62 1.17 #### 1.51
0.29 #### 1.81 1.81 #### 1.89 1.66
1.51 #### 9.53 9.53 #### 9.53 1.81
0.59 4.22 2.78 2.78 5.19 1.81 1.56
0.21 0.21 0.36 0.36 0.36 0.21 0.21
Filtering after Evidence [1, 0, 0, 0]
1.22 0.12 0.42 0.42 0.07 0.00 0.00
2.41 0.05 0.67 0.63 0.01 #### 0.97
0.18 #### 7.40 0.07 #### 1.22 0.06
0.97 #### 38.95 0.36 #### 38.95 0.07
2.41 0.16 0.67 0.67 0.20 0.44 0.06
0.14 0.01 0.01 0.01 0.01 0.01 0.00
Prediction after Action N
3.04 0.30 0.92 0.89 0.10 0.01 0.78
0.39 0.31 5.98 0.12 0.06 #### 0.24
0.81 #### 31.90 1.04 #### 32.26 0.18
2.12 #### 4.46 4.46 #### 4.25 3.95
0.37 0.44 0.09 0.10 0.28 0.03 0.05
0.01 0.01 0.00 0.00 0.00 0.00 0.00
Filtering after Evidence [1, 0, 0, 0]
1.00 0.01 0.02 0.02 0.00 0.00 0.00
0.82 0.01 0.73 0.02 0.00 #### 0.08
0.27 #### 66.54 0.02 #### 10.62 0.00
3
0.70 #### 9.31 0.09 #### 8.86 0.08
0.76 0.01 0.01 0.01 0.01 0.00 0.00
0.00 0.00 0.00 0.00 0.00 0.00 0.00
Prediction after Action W
0.99 0.02 0.09 0.00 0.00 0.00 0.01
0.79 0.59 6.67 0.00 0.00 #### 0.07
0.37 #### 54.25 0.01 #### 10.45 0.02
0.66 #### 14.17 0.00 #### 8.21 0.00
0.69 0.01 0.94 0.01 0.00 0.89 0.01
0.08 0.00 0.00 0.00 0.00 0.00 0.00
Filtering after Evidence [1, 0, 0, 0]
0.19 0.00 0.00 0.00 0.00 0.00 0.00
0.98 0.01 0.49 0.00 0.00 #### 0.01
0.07 #### 67.30 0.00 #### 2.05 0.00
0.13 #### 17.58 0.00 #### 10.19 0.00
0.85 0.00 0.07 0.00 0.00 0.06 0.00
0.02 0.00 0.00 0.00 0.00 0.00 0.00
Prediction after Action N
0.96 0.03 0.39 0.00 0.00 0.00 0.01
0.16 0.15 53.84 0.05 0.00 #### 0.00
0.12 #### 20.80 6.73 #### 9.99 0.20
0.71 #### 1.81 1.76 #### 1.07 1.02
0.10 0.09 0.00 0.01 0.01 0.00 0.01
0.00 0.00 0.00 0.00 0.00 0.00 0.00
4
Filtering after Evidence [0, 0, 0, 0]
0.04 0.01 0.10 0.00 0.00 0.00 0.00
0.04 0.04 90.32 0.08 0.00 #### 0.00
0.00 #### 5.51 1.78 #### 0.42 0.05
0.03 #### 0.48 0.47 #### 0.28 0.27
0.03 0.02 0.00 0.01 0.00 0.00 0.00
0.00 0.00 0.00 0.00 0.00 0.00 0.00
2 Submission
Form a group on Canvas if you want to work with another student. Specify the contribution made by
each member if you work as a group.
In your report, please provide the screenshots of all outcomes, and the highlighted code segments
and the detailed explanation on how you implement the followings:
ˆ Transitional probability;
ˆ Evidence conditional probability;
ˆ Filtering;
ˆ Prediction.
5

[ad_2]

Testimonials

Update Code In C++
We have updated our contact contact information. Text Us Or WhatsApp Us+1-(309) 295-6991