Consider the $3 \times 3$ world shown in Figure grid-mdp-figure(a). The transition model is the same as in the $4\times 3$ Figure sequential-decision-world-figure: 80% of the time the agent goes in the direction it selects; the rest of the time it moves at right angles to the intended direction.
Implement value iteration for this world for each value of $r$ below. Use discounted rewards with a discount factor of 0.99. Show the policy obtained in each case. Explain intuitively why the value of $r$ leads to each policy.
1. $r = -100$
2. $r = -3$
3. $r = 0$
4. $r = +3$
grid-mdp-figure
(a) $3 \times 3$ world for Exercise 3x3-mdp-exercise. The reward for each state is indicated. The upper right square is a terminal state. (b) $101 \times 3$ world for Exercise 101x3-mdp-exercise (omitting 93 identical columns in the middle). The start state has reward 0.

Consider the $3 \times 3$ world shown in Figure grid-mdp-figure(a). The transition model is the same as in the $4\times 3$ Figure sequential-decision-world-figure: 80% of the time the agent goes in the direction it selects; the rest of the time it moves at right angles to the intended direction.
Implement value iteration for this world for each value of $r$ below. Use discounted rewards with a discount factor of 0.99. Show the policy obtained in each case. Explain intuitively why the value of $r$ leads to each policy.
1. $r = -100$
2. $r = -3$
3. $r = 0$
4. $r = +3$

grid-mdp-figure
(a) $3 \times 3$ world for Exercise 3x3-mdp-exercise. The reward for each state is indicated. The upper right square is a terminal state. (b) $101 \times 3$ world for Exercise 101x3-mdp-exercise (omitting 93 identical columns in the middle). The start state has reward 0.

4th edition: chapter 17, Making Complex Decisions

Tested in Python, Java, JavaScript, C#, Scala, Julia, Lisp





Submit an Answer

The button opens a form on GitHub, with this exercise filled in; you need a GitHub account. Your answer becomes a pull request, and once a maintainer merges it, it shows under Student Answers.