Papers
Topics
Authors
Recent
Search
2000 character limit reached

Monte Carlo Optimistic Policy Iteration

Updated 5 July 2026
  • Monte Carlo Optimistic Policy Iteration is a simulation-based policy iteration method that uses incomplete Monte Carlo evaluations and immediate policy improvements.
  • It operates on-policy by combining exploring starts, asynchronous updates, and partial state evaluations to address convergence in stochastic shortest path and discounted MDP setups.
  • Recent studies emphasize that proper stepsize scheduling, lookahead-based improvement, and uniform action updates are crucial to ensure convergence and avoid nonoptimal cyclic behaviors.

Monte Carlo optimistic policy iteration (MC-O-PI) denotes a class of simulation-based policy-iteration schemes in which a current policy is evaluated only approximately, using Monte Carlo returns or closely related rollout targets, and the policy is then improved immediately—typically greedily or via lookahead—before evaluation has converged. In finite Markov decision processes, the term encompasses Monte Carlo Exploring Starts, stochastic shortest path recursions, initial-visit and first-visit action-value updates, and asynchronous variants. The central theoretical issue has been to determine when this partial, noisy form of policy iteration converges to the optimal value function and when seemingly minor changes in update structure destroy convergence (Chen, 2018, Winnicki et al., 2023, Oliviers et al., 9 Jun 2026, Chen, 14 Jun 2026).

1. Canonical formulation and algorithmic structure

In its canonical state-value form, MC-O-PI alternates between a greedy policy-improvement step and a Monte Carlo policy-evaluation step. For a finite stochastic shortest path problem with state set S={1,,n}S=\{1,\dots,n\}, action sets U(i)U(i), one-step cost g(i,u)g(i,u), and a cost-free absorbing termination state $0$, the policy at iteration tt is chosen greedily with respect to the current value estimate JtJ_t: μt(i)argminuU(i){g(i,u)+jPi,j(u)Jt(j)}.\mu_t(i)\in \arg\min_{u\in U(i)}\Big\{g(i,u)+\sum_j P_{i,j}(u)J_t(j)\Big\}. Monte Carlo evaluation then simulates, for each state ii, a single trajectory starting at ii, following μt\mu_t until termination, and forms an unbiased sample return U(i)U(i)0. The value update is

U(i)U(i)1

with deterministic stepsizes satisfying

U(i)U(i)2

The method is called “optimistic” because policy improvement is performed before U(i)U(i)3 has converged to U(i)U(i)4; after one incomplete Monte Carlo evaluation, the algorithm recomputes a greedy policy and repeats (Chen, 2018).

A closely related action-value formulation is used in recent analyses of initial-visit MC-O-PI. There, the algorithm maintains U(i)U(i)5, chooses a deterministic greedy policy

U(i)U(i)6

samples an initial state-action pair U(i)U(i)7 from a start distribution, simulates one episode under U(i)U(i)8, and updates only the initial or first-visited state-action pairs through

U(i)U(i)9

Here g(i,u)g(i,u)0 is the visit indicator and g(i,u)g(i,u)1 is a zero-mean noise term with bounded conditional second moment. The same papers distinguish initial-visit and first-visit Monte Carlo, and explicitly exclude every-visit updates because they induce bias in general MDPs (Oliviers et al., 9 Jun 2026).

Two structural features recur across the literature. First, MC-O-PI is usually on-policy: the trajectories used for evaluation are generated under the same policy that is about to be improved. Second, the algorithm is a stochastic approximation recursion rather than an exact dynamic-programming method. This places convergence on the interplay among Bellman monotonicity, exploration or exploring starts, stepsize schedules, and the geometry induced by asynchronous updates.

2. Stochastic shortest path theory and early convergence results

A major line of work studies MC-O-PI for the undiscounted stochastic shortest path (SSP) problem, where g(i,u)g(i,u)2 and termination replaces discounting as the mechanism ensuring finiteness. In one influential formulation, every stationary policy is assumed to be proper: from any starting state, the termination state is reached with positive probability within at most g(i,u)g(i,u)3 steps, hence almost surely, and all cost-to-go functions g(i,u)g(i,u)4 are finite. Under this assumption, the optimal Bellman operator

g(i,u)g(i,u)5

has a unique fixed point g(i,u)g(i,u)6, value iteration converges to g(i,u)g(i,u)7, and for every proper policy g(i,u)g(i,u)8, the policy-evaluation operator g(i,u)g(i,u)9 has unique fixed point $0$0. The Monte Carlo OPI update above is then shown to generate a bounded sequence $0$1 whose Bellman residual

$0$2

satisfies $0$3 almost surely, leading to the theorem that $0$4 almost surely. The same paper analyzes $0$5-based OPI and proves almost sure convergence for every $0$6, with $0$7 reducing to Monte Carlo and $0$8 reducing to a value-iteration-like update (Chen, 2018).

A parallel SSP treatment appears under the name Monte Carlo Exploring Starts (MCES), explicitly identifying MCES with optimistic policy iteration. The algorithm updates

$0$9

and studies convergence in the undiscounted SSP setting with a terminal state tt0. Under the strong assumption that all policies are proper and Robbins–Monro stepsizes, the Bellman error’s positive part vanishes asymptotically, the iterates are trapped between upper and lower stochastic-approximation envelopes converging to tt1, and the method converges almost surely to the optimal cost vector. The same analysis also treats asynchronous exploring-starts variants and nonuniform state sampling, provided state-dependent stepsizes are used so that each state is updated infinitely often with diminishing effective stepsize (Liu, 2020).

These results established a core principle: in SSPs, Monte Carlo policy evaluation does not need to be exact at each policy-iteration step. Properness, bounded one-step costs, and standard stochastic-approximation conditions are sufficient to make partial evaluation plus immediate greedy improvement asymptotically safe. No explicit rates of convergence are given in these analyses; the guarantees are qualitative and almost sure.

3. Exploring starts, asynchronous updates, and partial-state evaluation

The practical appeal of MC-O-PI lies in not having to evaluate a policy on the full state space at every iteration. Several later papers therefore examine asynchronous versions in which only a subset of states or state-action pairs is updated from each sampled trajectory.

One discounted-MDP result considers the case where every stationary policy induces the same graph structure, recurrent classes are policy-independent, and the graph obtained after collapsing recurrent classes is acyclic. The associated stochastic OPI updates all states visited during each simulated trajectory, rather than updating only the starting state. At iteration tt2, a greedy policy tt3 is computed from tt4; a trajectory is generated under tt5 from a random initial state; for each visited state tt6, the first-visit tail return

tt7

is formed; and every visited state is updated by stochastic approximation. Under the acyclic transient-state assumption, convergence is proved by first showing convergence on recurrent classes and then propagating it upward through a reverse topological order on transient states. The outcome is almost sure convergence tt8 for both deterministic state-independent stepsizes and state-dependent visit-counter stepsizes (Lubars et al., 2021).

A more general recent result revisits the classical “uniform state-action updates” requirement. In its strict form, that condition means the update distribution tt9 is uniform over all state-action pairs, which for initial-visit MC-O-PI effectively requires uniform initialization over the entire state-action space. This is precisely the condition used in Tsitsiklis-style analyses, but it is impractical in large or unknown state spaces. A 2026 paper shows that this requirement can be relaxed substantially: for initial-visit MC-O-PI, it is enough that updates be uniform only over the actions within each state,

JtJ_t0

while the frequencies with which different states are initialized may vary arbitrarily. The proof abandons the classical commutativity argument and instead shows that the mean-field dynamics generate monotonically improving policies; noise is then controlled by a lock-in argument based on seed, growth, and lock-in events. Under strict exploring starts, tie-breaking that assigns every greedy action probability at least JtJ_t1, and Robbins–Monro stepsizes satisfying an additional comparability condition, the iterates converge almost surely to JtJ_t2 (Oliviers et al., 9 Jun 2026).

These asynchronous results clarify that “Monte Carlo” in MC-O-PI need not mean a full sweep over the state space. Partial-state evaluation can be enough, but only when the update geometry remains compatible with policy improvement. This suggests that the essential question is not simply how many states are updated, but how the induced update frequencies interact with Bellman monotonicity and stepsize normalization.

4. Lookahead-based improvement and the single-trajectory convergence theorem

A longstanding open problem concerns the most literal form of Monte Carlo policy iteration: estimate the value of a policy from data collected from a single sample path obtained by implementing that policy, and then improve greedily with respect to the estimate. A 2023 result resolves this problem for a first-visit variant, but only when the policy-improvement step uses lookahead rather than simple greedy improvement.

In the tabular discounted setting, let JtJ_t3 be the current value estimate. The improved policy JtJ_t4 is not chosen by the one-step greedy relation JtJ_t5. Instead, it is an JtJ_t6-step lookahead policy satisfying

JtJ_t7

A single trajectory is then generated under JtJ_t8 from an exploring-start distribution with full support. For each visited state JtJ_t9, first-visit Monte Carlo evaluation provides an μt(i)argminuU(i){g(i,u)+jPi,j(u)Jt(j)}.\mu_t(i)\in \arg\min_{u\in U(i)}\Big\{g(i,u)+\sum_j P_{i,j}(u)J_t(j)\Big\}.0-step rollout target

μt(i)argminuU(i){g(i,u)+jPi,j(u)Jt(j)}.\mu_t(i)\in \arg\min_{u\in U(i)}\Big\{g(i,u)+\sum_j P_{i,j}(u)J_t(j)\Big\}.1

and the value update is performed only on the visited states using diminishing stepsizes. The key technical step is a bound on the discrepancy between the lookahead policy’s exact value and the lookahead base value: μt(i)argminuU(i){g(i,u)+jPi,j(u)Jt(j)}.\mu_t(i)\in \arg\min_{u\in U(i)}\Big\{g(i,u)+\sum_j P_{i,j}(u)J_t(j)\Big\}.2 This leads to a contraction estimate for the composite operator μt(i)argminuU(i){g(i,u)+jPi,j(u)Jt(j)}.\mu_t(i)\in \arg\min_{u\in U(i)}\Big\{g(i,u)+\sum_j P_{i,j}(u)J_t(j)\Big\}.3. If

μt(i)argminuU(i){g(i,u)+jPi,j(u)Jt(j)}.\mu_t(i)\in \arg\min_{u\in U(i)}\Big\{g(i,u)+\sum_j P_{i,j}(u)J_t(j)\Big\}.4

then the iterates converge almost surely to μt(i)argminuU(i){g(i,u)+jPi,j(u)Jt(j)}.\mu_t(i)\in \arg\min_{u\in U(i)}\Big\{g(i,u)+\sum_j P_{i,j}(u)J_t(j)\Big\}.5 (Winnicki et al., 2023).

The same paper extends the argument to linear function approximation. With μt(i)argminuU(i){g(i,u)+jPi,j(u)Jt(j)}.\mu_t(i)\in \arg\min_{u\in U(i)}\Big\{g(i,u)+\sum_j P_{i,j}(u)J_t(j)\Big\}.6, the policy is still obtained from μt(i)argminuU(i){g(i,u)+jPi,j(u)Jt(j)}.\mu_t(i)\in \arg\min_{u\in U(i)}\Big\{g(i,u)+\sum_j P_{i,j}(u)J_t(j)\Big\}.7-step lookahead, but policy evaluation may be carried out by first-visit Monte Carlo least squares, finite-step gradient descent, or another routine satisfying a uniform error bound. If the evaluation method obeys

μt(i)argminuU(i){g(i,u)+jPi,j(u)Jt(j)}.\mu_t(i)\in \arg\min_{u\in U(i)}\Big\{g(i,u)+\sum_j P_{i,j}(u)J_t(j)\Big\}.8

then the paper proves asymptotic bounds on both the value-function error and the induced policy-performance gap; the resulting policies perform close to optimal within a function-approximation error term (Winnicki et al., 2023).

A common misconception is that the simple first-visit Monte Carlo ES scheme with one-step greedy improvement is fully settled by this result. The theorem is more specific: convergence is proved for a first-visit, single-sample-path policy-iteration scheme provided that policy improvement uses lookahead rather than a simple greedy step (Winnicki et al., 2023). This leaves the role of lookahead as a structural regularizer rather than a mere computational enhancement.

5. Beyond uniformity: positive results and a certified counterexample

Recent work gives both a broadened positive theory and a sharp impossibility result. Taken together, these papers delineate the boundary between benign and destructive nonuniform update structure.

A 2026 positive result proves that initial-visit MC-O-PI converges even when different states are updated at arbitrary frequencies, as long as updates are uniform over actions within each state. A second 2026 paper shows that a natural alternative—scalar-stepsize, unnormalized asynchronous state-value recursion with fixed nonuniform state-selection probabilities—can fail dramatically. In that counterexample, a three-state, two-action discounted MDP with update frequencies μt(i)argminuU(i){g(i,u)+jPi,j(u)Jt(j)}.\mu_t(i)\in \arg\min_{u\in U(i)}\Big\{g(i,u)+\sum_j P_{i,j}(u)J_t(j)\Big\}.9 induces a diagonally scaled greedy-policy mean field with a certified nonconstant attracting hybrid periodic orbit. With a bounded unbiased geometric-horizon estimator and Robbins–Monro stepsizes, the stochastic recursion remains trapped near that cycle with positive probability and therefore fails to converge. The geometric explanation is that uniform sampling yields radial residual contraction, whereas scalar nonuniform sampling anisotropically distorts the residual dynamics and can generate switched attracting cycles (Chen, 14 Jun 2026).

The current landscape can be summarized as follows:

Setting Update structure Asymptotic result
SSP Monte Carlo OPI Synchronous state-value Monte Carlo evaluation ii0 almost surely
SSP MCES Exploring starts; asynchronous variants with component-wise stepsizes ii1 almost surely
Discounted MDP with acyclic transient structure All states visited in each trajectory are updated ii2 almost surely
Initial-visit MC-O-PI Uniform only over actions within each state ii3 almost surely
Scalar-stepsize nonuniform asynchronous MC-O-PI Fixed nonuniform state-selection probabilities, unnormalized Failure to converge with positive probability

This comparison suggests that nonuniformity itself is not the decisive obstruction. A plausible implication is that the critical issue is whether the nonuniform update frequencies can be absorbed into a policy-improving mean field. When action symmetry within a state is preserved, policy monotonicity can still be recovered; when a single scalar stepsize is combined with strongly nonuniform state sampling, the diagonal distortion can overwhelm the residual geometry and create attracting cycles (Oliviers et al., 9 Jun 2026, Chen, 14 Jun 2026).

The core MC-O-PI template—partial simulation-based evaluation followed by immediate policy improvement—also appears outside the tabular convergence literature. A classic on-line policy-improvement method evaluates, at each decision state ii4, the long-term expected reward of every candidate action by Monte Carlo simulation while following a fixed base policy thereafter. The chosen action is

ii5

where ii6 is the Monte Carlo estimate of the action value under the base policy. Applied to backgammon, this approach yields a substantial reduction, by as much as a factor of 5 or more, in the error rate of the base players, across initial policies ranging from a random policy to TD-Gammon (Tesauro et al., 9 Jan 2025). Although this setting is presented as on-line Monte-Carlo search rather than as MC-O-PI, its structure is the same: partial Monte Carlo evaluation, then immediate greedy improvement at the current state.

The simulation-based OPI perspective has also been extended to multi-agent MDPs with Kullback–Leibler control cost. There, the greedy policy-improvement step has an explicit Boltzmann form

ii7

and policy evaluation uses finite-horizon ii8-step TD rollouts. Both synchronous and asynchronous versions converge asymptotically to the optimal value function and an optimal joint policy (Nakhleh et al., 2024). This suggests that Monte Carlo optimistic policy iteration is best regarded as a design pattern—greedy or softened improvement combined with simulation-based partial evaluation—rather than as a single fixed recursion.

At the same time, the convergence theory remains sharply conditional. Positive results require properness, acyclic transient structure, uniformity over actions within each state, sufficiently deep lookahead, or analogous structural devices. Negative results show that scalar nonuniform sampling can create stable nonoptimal cycles. The mature view of MC-O-PI is therefore neither that it is generically unstable nor that it converges under arbitrary asynchronous Monte Carlo updates. Rather, its behavior is now understood to depend on a precise interaction among rollout sampling, update normalization, policy-improvement depth, and the Bellman geometry of the underlying control problem.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Monte Carlo Optimistic Policy Iteration.