---
title: Optimistic Initial Model in Factored MDPs
url: https://www.emergentmind.com/topics/optimistic-initial-model-oim
type: topic
---

# Optimistic Initial Model in Factored MDPs

An Optimistic Initial Model (OIM) is a technique for reinforcement learning (RL) in which the agent’s empirical model is initialized with highly optimistic estimates, systematically biasing initial policy selection toward actions that appear maximally rewarding. In the context of factored Markov Decision Processes (FMDPs)—MDPs with structured state representations—FOIM (Factored Optimistic Initial Model) provides the first algorithm that is both “purely greedy” and guarantees polynomial time learning with respect to the fixed point of approximate value iteration (AVI), as established in [0904.3352].

## 1. Optimistic Initialization in Factored MDPs

FOIM initializes transition and reward factors to embody maximal optimism. For each state variable $X_i$, a fictitious “Garden-of-Eden” (GOE) substate $x_E$ is introduced, expanding each domain to $X_i \cup \{x_E\}$. Empirically, for each local context $z = x[\Gamma_i]$, action $a$, and possible next variable value $y_i$, two counts are maintained: $N_i^{\mathrm{vis}}(z,a)$ (context-action visit count) and $N_i(z,a,y_i)$ (transitions to $y_i$). 

Initialization is as follows:
\[
N_i^{\mathrm{vis}}(z, a) = 1
\]
\[
N_i(z, a, y_i) =
\begin{cases}
1 & \text{if } y_i = x_E \\
0 & \text{otherwise}
\end{cases}
\]
This yields empirical transition factors with $\hat P_i(x_E \mid z, a) = 1$ initially, so every action-context pair appears to deterministically yield the GOE state. Optimism is similarly infused into rewards: an extra factor $R_{E,i}(x_i, a)$ with large constant reward $R_E$ for $x_i = x_E$ is added,
\[
R_{E,i}(x_i, a) =
\begin{cases}
R_E & \text{if } x_i = x_E \\
0 & \text{otherwise}
\end{cases}
\]
Hence, all unexplored regions promise maximal possible future payoff, incentivizing thorough exploration.

## 2. Algorithmic Structure: FOIM Core Loop

FOIM operates by iteratively updating local empirical models and recomputing the greedy policy. At each step:

1. **Empirical Model Update**: Recalculate $\hat P_i(\cdot \mid z, a)$ using the current counts.
2. **Factored Value Iteration (FVI)**: Solve the empirical factored MDP (using FVI) to tolerance $\epsilon,\delta$, producing new basis weights $w_t$.
3. **Policy Extraction**: Greedily select actions,
\[
\pi_t(x) = \arg\max_{a \in A} \Bigg\{ \sum_j R_j\big(x[Z_j],a\big) + R_E \sum_i \mathbf{1}\{x_i = x_E\} + \gamma \sum_{i} \left[\hat P_i(\cdot\mid x[\Gamma_i],a)\right]^\top(H_i w_t) \Bigg\}
\]
4. **Interaction**: Execute $a_t = \pi_t(x_t)$, observe $x_{t+1}$.
5. **Count Update**: For each factor $i$, increment $N_i^{\mathrm{vis}}(z_t,a_t)$ and $N_i(z_t,a_t,y_{t+1}^i)$.
6. **Iterate**: Repeat from Step 1.

Each step’s dominant computational operations—the empirical update and planner invocation—incur polynomial cost in all relevant parameters: number of factors $m$, local table size $N_f$, action space size $|A|$, number of basis functions $K$, and accuracy/confidence parameters.

## 3. Approximate Value Iteration with Factored Structure

FOIM employs Factored Value Iteration (FVI) as its planning subroutine: the agent’s value function is projected onto a basis $\{h_k\}_{k=1}^K$ with
\[
V(x) \approx \sum_{k=1}^K w_k\,h_k(x)
\]
and managed through a normalized projection matrix $G$. FVI applies repeated AVI steps,
\[
w_{t+1} = G \max_{a \in A} \left\{ r^a + \gamma\,P^a\,(H w_t) \right\}
\]
where $r^a$ is the extended reward vector, $P^a$ the (Kronecker-factorized) transition operator, and $H$ is the matrix of basis functions. The Bellman backup integrates the optimistic GOE-reward bonus at each step.

## 4. Polynomial-Time Learning Guarantees

FOIM’s main theoretical result is that, for suitable $R_E$, with high probability, the number of time steps where the action selected is not $\epsilon$-close to the AVI-optimal $Q$-value is polynomial in all problem parameters. Specifically, letting $N_f = n^{m_f}$ for local-scope size $m_f$, and with discount $\gamma\in[0,1)$ and accuracy/confidence parameters $\epsilon > 0$, $\delta > 0$,
\[
R_E \geq C \frac{m R_{\max}^2}{(1-\gamma)^4 \epsilon} \ln\left(\frac{m^2 N_f |A|}{\delta\epsilon}\right)
\]
for constant $C$ ensures,
\[
\#\{ t : Q^{\mathrm{AVI}}(x_t,a_t) - Q_{\mathrm{FOIM}}(x_t,a_t) > \epsilon \} \leq O\left( \frac{m^4 N_f |A|}{(1-\gamma)^4 \epsilon^4} \ln^2(m N_f |A|) \ln \frac{1}{\delta} \right)
\]
Thus, except for polynomially many steps, FOIM’s policy is nearly as good as obtained by running approximate value iteration on the true model [0904.3352].

## 5. Outline of the Proof Approach

The convergence argument follows two main pillars:

**(a) Persistent Optimism through Initialization and Greediness:** When $R_E$ is sufficiently large, induction shows that at every iteration
\[
V_t(x) \geq V^{\mathrm{AVI}}(x) - O(\epsilon), \quad Q_t(x, a) \geq Q^{\mathrm{AVI}}(x, a) - O(\epsilon)
\]
The optimism established through initialization persists due to the monotonicity of $HG$ and the per-factor maximally optimistic starting conditions.

**(b) Bounded Sample Complexity via Factor-Component Counting:** Each local component $(z, a)$ is declared $(\epsilon, \delta)$-known once visited $k_0 = O(1/(1-\gamma)^2\epsilon^2 \ln(1/\delta))$ times. Using uniform Azuma/Hoeffding arguments, all factor-components (at most $m N_f |A|$) eventually become known, after at most polynomially many visits. A specialized simulation lemma then ensures that once all components are known, the empirical model’s value is within $\epsilon$ of the true (AVI) value; further mistakes are rare and coincident only with component discovery.

## 6. Computational Complexity Analysis

Each FOIM iteration involves:

- Empirical model update: $O(m N_f |A|)$ operations
- Factored Value Iteration: Each Bellman backup is $O(|A| m N_f K)$, repeated $O(\log(1/(1-\gamma)))$ times per contraction.

Consequently, total planner time per step is $O(|A| m N_f K \log(1/(1-\gamma)))$, which is polynomial in all input and accuracy parameters. This renders FOIM, unlike prior approaches, tractable for high-dimensional structured domains.

## 7. Comparison to Tabular OIM and Algorithmic Implications

Tabular OIM applies the same exploration principle by injecting a GOE pseudo-transition for each global $(x,a)$ and employs standard, exact value iteration. FOIM diverges in two respects:

- **Factorization of Counts:** FOIM maintains per-factor transition counts, reducing storage and computation versus flat $(x,a) \to y$ tables.
- **Use of Approximate Factored Planning:** FVI is used in place of exact value iteration, so the performance benchmark is not the true optimum $V^*$, but the AVI fixed point $V^{\mathrm{AVI}}$.

Despite these differences, the explorative behavior—driven entirely by initial optimism, with no explicit exploration bonus—remains the same. As real experience accrues, optimism fades in locally explored regions, focusing planning on true models. FOIM is distinguished as the first factored-MDP learning algorithm that is greedy, polynomial-time per-iteration, and sample-efficient, staying $\epsilon$-close to best AVI policy except for a polynomial number of steps [0904.3352].

Source: https://www.emergentmind.com/topics/optimistic-initial-model-oim