In the maze as illustrated in Figure 10.1, some of the states are not reachable as they represent a wall. We can take this into account by making the transition matrix state dependent. Here we simply consider that when taking an action that would drive the robot into a wall would simply though back the robot in the starting position.