Worlds
Consider a similar setup to Software Lab 9: we have a robot (whose location is unknown) moving down a known hallway. In this problem, we will consider a very small hallway with ideal readings:
ideal = [1,2,1,1]
Assume that these readings were discretized such that num_observations=4. That is, the possible discrete readings are: 0, 1, 2, and 3. For all parts below, assume that the robot's sensor is modeled as follows: with probability 0.75, the sensor reads the ideal value for the state it is in, and with probability 0.25, the sensor reads a random choice from the other 3 readings:
This problem will explore several transition models in this world. For each model, assume that we start out completely unaware of the robot's position, and so we start with a uniform belief:
Part 1: Bumper Car
In this model, the robot moves one state to the right with probability 0.6, and stays in its current state with probability 0.4. If the robot is in the right-most state, however (state 3), then it stays in that state with probability 1.
This model is represented in Python with:
def bumper_model(s): next = min(3,s+1) d = {s:0.4} d[next] = d.get(next,0) + 0.6 return DDist(d)
Starting with a uniform belief state, we observe a 2. What is the updated distribution over S_0 after we observe a 2 at time 0? Enter all probabilities as decimal numbers accurate to within 10^{-4}.
After the robot makes a transition, what is the distribution over S_1?
Part 2: Torus World
In this model, the robot still moves one state to the right with probability 0.6, and stays in the same state with probability 0.4. However, in this model, the world wraps around on itself, so that moving right from state 3 puts the robot in state 0.
Implement a Python function torus_model(s) representing the transition distribution \Pr(S_{t+1}~|~S_t) for this model. Assume that the classes and procedures from the lib601.dist module are available to you as though imported with:
from lib601.dist import *
For each of the probabilities, is it higher, lower, or the same under this model, when compared against the corresponding probability in Part 1?
Part 3: Mirror World
In this model, the robot still moves one state to the right with probability 0.6, and stays in the same state with probability 0.4. However, in this model, the world reflects back on itself, so that moving right from state 3 puts the robot in state 2.
Note, however, that the robot will keep moving to the right even after having been "reflected" back to state 2.
Implement a Python function mirror_model(s) representing the transition distribution \Pr(S_{t+1}~|~S_t) for this model. Assume that the classes and procedures from the lib601.dist module are available to you as though imported with:
from lib601.dist import *
Now assume that the robot was started in this world with a uniform belief state, and that, as above, it observed a 2 and then transitioned once.
For each of the probabilities, is it higher, lower, or the same under this model, when compared against the corresponding probability in Part 1?