In infinite horizon discounted cost problems, we consider scenarios without a termination state and an infinite sequence of decisions. Let’s understand the key components and mathematical formulation.
Problem Setting
- State Space: Set of states $S = {1,2,…,n}$. Note that there is no terminal state unlike in finite horizon problems.
- Action Space: For each state $i$, set of feasible actions $A(i)$
- Total action space: $A = \bigcup_{i \in S} A(i)$
- Cardinality: Both $|S|$ and $|A|$ are finite
Optimal Cost Function
The optimal cost function $J^*(i)$ represents the minimum total discounted cost starting from state $i$:
where:
- $\alpha \in (0,1)$ is the discount factor
- $g(i,u,j)$ is the single stage transitioncost for transition from state $i$ to $j$ prescribed by policy $\mu$ at stage $k$
- $i_k$ represents the state at stage $k$
- $\mu(i_k)$ is the policy decision at stage $k$
Bellman Operators
There are two key Bellman operators in infinite horizon problems:
- Optimal Bellman Operator $T$ (maps any value function $J$ to another value function):
where:
- $p_{ij}(u)$ is the transition probability from state $i$ to $j$ under action $u$
- $J$ is any value function
- $\alpha$ is the discount factor that weighs future costs less than immediate costs
- $\mu$ is a specific policy mapping states to actions
Matrix Notation
The policy Bellman operator can be expressed in matrix form for computational convenience:
Let’s break down the components:
- Transition Probability Matrix $P_{\mu}$:
where:
- Each row sums to 1: $\sum_{j \in S} p_{ij}(\mu(i)) = 1$ for all $i \in S$
- No terminal states in infinite horizon problems
- Stage Cost Vector $g_{\mu}$:
Bellman Equation Under Policy $\mu$
The Bellman equation for a given policy $\mu$ can be written in matrix form:
This compact notation helps in:
- Understanding the structure of the problem
- Implementing efficient computational methods
- Analyzing convergence properties of solution algorithms
Monotonicity Lemma
For any vectors $J, \bar{J} \in \mathbb{R}^n$ such that $J(i) \leq \bar{J}(i)$ for all $i \in S$ and for any stationary policy $\mu$, the following monotonicity properties hold:
For the optimal Bellman operator $T$:
$$ (T^kJ)(i) \leq (T^k\bar{J})(i) \quad \forall i \in S, k=1,2,\ldots $$
For the policy Bellman operator $T_\mu$: $$ (T_\mu^kJ)(i) \leq (T_\mu^k\bar{J})(i) \quad \forall i \in S, k=1,2,\ldots $$
This lemma establishes that:
- Both Bellman operators preserve ordering between value functions
- If we start with a lower value function, applying the operators repeatedly will still result in lower values
- The monotonicity property is crucial for proving convergence of value iteration and policy iteration algorithms
Linearity Lemma
For any vectors $J, r \in \mathbb{R}^n$, scalar $\alpha$, and stationary policy $\mu$, where $e$ is a vector of all ones ($e = [1,1,\ldots,1]^T \in \mathbb{R}^n$), the following linearity properties hold:
For the optimal Bellman operator $T$:
$$ (T^k(J+re))(i) = (T^kJ)(i) + \alpha^k r \quad \forall i \in {1,2,\ldots,n}, k \geq 1 $$
For the policy Bellman operator $T_\mu$: $$ (T_\mu^k(J+re))(i) = (T_\mu^kJ)(i) + \alpha^k r \quad \forall i \in {1,2,\ldots,n}, k \geq 1 $$
This lemma establishes that:
- The Bellman operators exhibit linear behavior with respect to constant shifts
- Adding a constant to the value function results in a scaled addition to the operated value
- The scaling factor $\alpha^k$ reflects the discount factor raised to the power of iterations
- This property is useful in analyzing convergence and error bounds of dynamic programming algorithms
The linearity property complements the monotonicity lemma and helps in:
- Understanding how value functions change under constant shifts
- Analyzing the behavior of value iteration and policy iteration
- Deriving error bounds and convergence rates
- Simplifying theoretical analysis of dynamic programming algorithms
Converting Discounted Cost Problems(DCP) to Stochastic Shortest Path Problems(SSPP) by adding a terminal state
Let’s understand how we can convert a discounted cost problem (DCP) into a stochastic shortest path problem (SSPP) by adding a terminal state.
Key Idea
The main concept is to introduce an artificial terminal state that captures the discounting effect through transition probabilities.
Mathematical Formulation
For a DCP with discount factor $\alpha$, we can construct an equivalent SSPP where:
Terminal State Properties:
- Add a terminal state $t$ to the state space
- Set $g(i,u,t) = 0$ for all states $i$ and controls $u$
- Make state $t$ cost-free and absorbing: $g(t,u,t) = 0$
Transition Probabilities: For any state $i$ and control $u$:
Non-termination Probability: The probability of not terminating by stage $k$ is:
$$ \begin{align*} P(\text{non-termination by stage }k) &= 1-{(1-\alpha) + \alpha(1-\alpha) + … + \alpha^{k-1}(1-\alpha)} \ &= 1-\frac{(1-\alpha)(1-\alpha^k)}{1-\alpha} = \alpha^k \end{align*} $$
Expected Stage Cost: For the $k$th stage:
$$ \underbrace{\text{Expected single stage cost}}_{\text{In }k\text{th stage}} = \alpha^k \sum_{j=1}^n p_{ij}(u)g(i,u,j) $$ where $g(i,u,t) = 0$ for the terminal state $t$
Proposition (DP Convergence)
For a discounted cost problem (DCP) with:
- Bounded stage costs $g(i,u,j) \leq M$ for all $i,j \in S$ and $u \in A(i)$
- Discount factor $\alpha < 1$
The optimal cost function $J^*$ satisfies:
where:
- $T$ is the Bellman operator
- $T^N$ denotes N successive applications of $T$
- $J$ is any bounded function
In simple words, I can start with any bounded function $J$ and apply the Bellman operator $T$ $N$ times, then take the limit as $N$ approaches infinity. The limit will be the optimal cost function $J^*$.
Corollary (Policy Convergence)
For any stationary policy $\mu$, the associated cost function satisfies:
where:
- $T_{\mu}$ is the policy Bellman operator
- $T_{\mu}^N$ denotes N successive applications of $T_{\mu}$
- $J$ is any bounded function
In simple words, I can start with any bounded function $J$ and apply the policy Bellman operator $T_{\mu}$ $N$ times, then take the limit as $N$ approaches infinity. The limit will be the cost function $J_{\mu}$.
Corollary (Bellman Equation for Policy)
For any stationary policy $\mu$, the associated cost-to-go function $J_{\mu}$ satisfies:
Moreover, $J_{\mu}$ is the unique solution to this equation within the class of bounded functions.
Necessary and Sufficient Condition for Optimality
Proposition: A stationary policy $\mu$ is optimal if and only if it attains the minimum in the Bellman equation for all states $i \in S$, i.e.:
$$ \underbrace{T_{\mu}J^* = TJ^*}_{\substack{\text{Policy } \mu \text{ achieves minimum} \ \text{in Bellman equation}}} $$
This means:
This condition establishes that:
- A policy is optimal if and only if it selects actions that achieve the minimum in the Bellman equation
- The policy Bellman operator $T_{\mu}$ coincides with the optimal Bellman operator $T$ when applied to $J^*$
- No other policy can achieve a lower cost than an optimal policy satisfying this condition
Max Norm and Contraction Properties
Let’s define the max norm $|\cdot|_{\infty}$ on $\mathbb{R}^n$ as:
Proposition: For any two bounded functions $J: S \to \mathbb{R}$ and $\bar{J}: S \to \mathbb{R}$ and for all $k = 0,1,2,…$:
(a)
(b)
These inequalities establish that:
- Both Bellman operators are contraction mappings with factor $\alpha$
- The distance between value function iterates decreases exponentially
- The convergence rate is governed by the discount factor $\alpha$
- The results hold for both optimal and policy-specific operators
Corollary on Rate of Convergence of Value Iteration
For any bounded function $J: S \to \mathbb{R}$, we have the following convergence properties:
- For the optimal Bellman operator:
- For the policy Bellman operator:
- The convergence to both optimal and policy-specific value functions is geometric
- The rate of convergence is determined by the discount factor $\alpha$
- The initial distance from the target value function affects the absolute error bound
- The convergence is uniform across all states
Error Bounds for Value Iteration
For any bounded function $J: S \to \mathbb{R}$ and state $i \in S$, at iteration $k \geq 0$:
where:
- Lower bound sequence:
- Upper bound sequence:
These bounds provide:
- A sandwich theorem for the optimal value function
- Computable error estimates during value iteration
- Monotonically improving lower bounds
- Monotonically decreasing upper bounds
- Convergence guarantees based on the discount factor $\alpha$
In simple words, the value iteration algorithm works by:
- Starting with any bounded function $J$ as an initial estimate
- Repeatedly applying the Bellman operator $T$ to get better estimates:
- $J_1 = TJ$
- $J_2 = TJ_1 = T^2J$
- $J_3 = TJ_2 = T^3J$ And so on…
- As we apply the operator more times ($N \to \infty$), our estimate converges to the optimal cost function $J^*$
- The error bounds above tell us exactly how close we are to $J^*$ at each iteration
This convergence is guaranteed by the contraction mapping property of the Bellman operator and the discount factor $\alpha < 1$.