Example (unique solution to Bellman equation)
In machine learning, a Markov decision process is a model for decision making.
At each time step, the process is in state $s\in S$ ($S$ is a discrete finite set). It can choose an action $a\in A$ ($A$ is also discrete finite). This will result in a reward $R(a,s)$, and the action will move you from $s$ to $s'$ with probability $P(s,s',a)$ (satisfying $\sum_{s'\in S} P(s,s',a) = 1$). The future rewards come with a discount factor of $\gamma\in (0,1)$.
The optimal value curve is the solution to the Bellman equation $$ \begin{align*} V_\star(s) = \max_{a\in A}\left(R(s,a) + \gamma\sum_{s'\in S} P(s,s',a) V_\star(s')\right). \end{align*} $$
We will prove the Bellman equation has a unique solution $V_\star : S\to \R$ using the contraction mapping theorem.
-
$C(S) = \big(\set{\text{continuous functions } S\to\R} = \set{\text{all functions }S\to \R}, \text{sup metric})$ is a complete metric space by the uniform limit theorem.
-
Consider the Bellman operator $B$ on $C(S)$ given by $$ \begin{align*} B\ V(s) = \max_{a\in A} \left(R(s,a) + \gamma\sum_{s'\in S} P(s,s',a) V(s')\right). \end{align*} $$ Fixed points of $B$ are solutions to the Bellman equation.
-
$B$ is $C(S) \to C(S)$.
-
$B$ is a contraction since $$ \begin{align*} \|BV_1 - BV_2\|_\infty ={}& \sup_{s\in S}|BV_1(s) - BV_2(s)| \\ ={}& \sup_{s\in S} \Bigg|\max_{a\in A}\Big(R(s,a) + \gamma \sum_{s'\in S} P(s,s',a) V_1(s')\Big) \\ &- \max_{a\in A}\Big(R(s,a) + \gamma\sum_{s'\in S} P(s,s',a)V_2(s')\Big)\Bigg| \\ \leq{}& \sup_{s\in S} \Bigg|\max_{a\in A} \gamma \sum_{s'\in S} P(s,s',a)\big(V_1(s') - V_2(s')\big)\Bigg| \\ \leq{}& \gamma\Big(\sup_{s'\in \in S} |V_1(s') - V_2(s')| \Big) \Big(\sup_{s\in S} \max_{a\in A} \underbrace{\sum_{s'\in S} P(s,s',a)}_{1}\Big) \\ \leq {}& \gamma \|V_1 - V_2\|_\infty \end{align*} $$ so $B$ is $\gamma$-Lipschitz, where $\gamma<1$.