Rollout improves a sequentially improving heuristic (Prop. 6.4.2)
ProvedBertsekasDP.rollout_sequential_improvementProposition 6.4.2 (rollout improves on a sequentially improving heuristic). Let the base heuristic be sequentially improving, i.e. at every non-destination node , and let be a path generated by a terminating run of the rollout algorithm from a non-destination node to a destination . Then the rollout cost improves on the heuristic,
and is in fact the least of the heuristic cost at the start and at every neighbor visited along the way (Eq. (6.37)):
This is the "rollout never hurts" theorem — the formal warrant for policy improvement by simulation, and the ancestor of the improvement step in Monte-Carlo tree search and modern reinforcement learning. The second identity is stronger than the first: it says the rollout has an automatic cost sorting property, always ending at the best destination among all those its base heuristic proposed along the run, so it can exhibit good behavior that the base heuristic alone never would.
Formalization Note The equality is phrased as a least element (IsLeast) of the displayed set, which asserts both that is a lower bound and that it is attained by one of the listed values. Ties in the neighbor selection are permitted; the run is any complete node sequence satisfying the rollout selection rule.
import Mathlib import Definitions.Def_BertsekasGraphSearch
namespace BertsekasDP
theorem rollout_sequential_improvement {V : Type} [Fintype V] [DecidableEq V]
(G : BertsekasGraphSearch V) (H : BertsekasBaseHeuristic G)
(himp : BertsekasSeqImproving G H)
(l : List V) (hrun : BertsekasIsRolloutRun G H l)
(i₁ : V) (hhead : l.head? = some i₁) (hstart : i₁ ∉ G.dest)
(d : V) (hlast : l.getLast? = some d) :
G.cost d ≤ BertsekasHeurCost G H i₁ ∧
IsLeast {c : ℝ | c = BertsekasHeurCost G H i₁ ∨
∃ v ∈ l.dropLast, ∃ j ∈ BertsekasNbrs G v, c = BertsekasHeurCost G H j}
(G.cost d) := by sorry
end BertsekasDPRead-back
What the Lean code literally says, in plain math · claude-fable-5
Let be a finite type with decidable equality, a graph structure, a base heuristic, and assume BertsekasSeqImproving holds for (at every non-destination vertex with at least one out-neighbour, the minimum of over out-neighbours is at the vertex itself). Suppose is a list satisfying BertsekasIsRolloutRun for ; is the first element of , with ; and is the last element of . The conclusion is a conjunction:
- : the vertex cost of the run's final (destination) vertex is at most the heuristic cost of the starting vertex.
- is the least element (membership plus lower bound, in the
IsLeastsense) of the set
where is with its last element removed: the set consisting of together with the heuristic costs of all out-neighbours of all non-final vertices of the run. Conjunct (1) is the special case of the lower-bound half of (2) applied to the element ; the statement nevertheless asserts both explicitly. The proof is left as sorry.
Confirmed by the mission captain (proposal self-audit).