AIMech AI

Accumulating Sarsa(lambda)

Algorithms AIMech:AccumulatingSarsaLambda DRAFT
An episodic tabular on-policy control algorithm that propagates each selected-next-action temporal-difference error through accumulating state-action eligibility traces, retaining learned action values and resetting traces between episodes.
Identity Notes & Concept Scope The selected source-defined episodic tabular on-policy control algorithm uses the pre-update selected next action, accumulating state-action traces and the official first-edition correction resetting traces inside each episode. It differs from one-step Sarsa, neural MCQ-L gradient traces, true-online Sarsa with Dutch traces, replacing-trace variants, and the max-target Watkins and two-error Peng–Williams constructions. Unqualified Sarsa(lambda) references are contextual family mentions rather than exact aliases. Owner 265 retains MCQ-L and its cohort342 resolution and historical Cambridge pointer; the selected source is Sutton and Barto 1998 with official errata. The fresh collection after PR389 merged, on 15 October 2026 at 18:42:28–18:45:19 UTC, covered 775 maintained native and 442 pinned AIO records. IDs, local IDs, names, aliases and scoped synonyms supplied 4,843 identity fields. Canonical names and explicit source spellings, including Greek lambda, produced no normalized candidate collision. Four fixed-string searches included ignored and hidden paths and retained 6,064 occurrences in 1,351 distinct content groups. Two supporting agents read all grouped contents in disjoint partitions; root read all 37 filtered candidate-named groups, twelve normalized neighbor definitions, 29 fields and full owners 264,265,266 and269. Candidate-named matches are source-lead, history, review and existing-neighbor context. All 1,216 pre-WIS-TD inventory rows and the newly merged WIS-TD record were reconciled at the actual base. Historical research snapshots remain separately dated. This supports a bounded identity decision for these roots, probes and pinned AIO snapshot; it does not claim a manual semantic reading of every corpus record or worldwide absence.

Claims & Grounded Evidence

6 Claims
Mechanism #tabular-on-policy-control
The selected episodic tabular Sarsa(lambda) procedure learns an action-value table Q(s,a) and derives an exploratory behavior policy from its current values, for example an epsilon-greedy policy. It assigns credit using an accumulating eligibility trace for each state-action pair rather than only the current pair.
Mechanism #selected-next-action-error
After executing A_t in S_t and observing R_(t+1) and a nonterminal S_(t+1), select A_(t+1) from the policy derived from the pre-update table Q_t. Form delta_t=R_(t+1)+gamma*Q_t(S_(t+1),A_(t+1))-Q_t(S_t,A_t), then carry that already selected action into the next transition. The bootstrap uses the selected action value, not a maximum over actions or an expected action value.
Mechanism #accumulating-trace-credit
Let E_t be the trace used in the value update at time t, with E_(-1)=0 at an episode start. For every tabulated pair, E_t(s,a)=gamma*lambda*E_(t-1)(s,a)+1{(s,a)=(S_t,A_t)} and Q_(t+1)(s,a)=Q_t(s,a)+alpha*delta_t*E_t(s,a). The Q values used to compute delta_t are pre-update values. Figure 7.11 implements this recurrence by incrementing the stored current-pair trace, updating Q using the resulting traces, and then decaying the stored traces by gamma*lambda; that decay is not applied again before the next increment.
Mechanism #episodic-terminal-and-reset
Initialize Q before learning and retain its learned entries between episodes. Reset all eligibility traces to zero at each episode start, following the author errata. At a terminal successor, use zero continuation value, so the final error is R_(t+1)-Q_t(S_t,A_t); apply that reward update to all eligible pairs before starting the next episode. No further environment action is executed from the terminal state.
Scope #trace-memory-and-one-step-limit
From zero episode traces, a pair receives the discounted sum of its visit indicators: E_t(s,a)=sum_(k=0..t)(gamma*lambda)^(t-k)*1{(S_k,A_k)=(s,a)}. Repeated visits therefore accumulate credit rather than resetting the chosen trace to one. At lambda=0, only the current pair receives credit, giving one-step tabular Sarsa under the same action timing and terminal convention. Selecting an exploratory action does not by itself cut the traces in this accumulating rule.
Scope #table-update-and-sparse-boundary
The literal tabular algorithm visits every state-action entry to update its value and trace at each transition. An implementation can omit operations on exactly zero trace entries without changing these updates. Discarding small but nonzero traces is an approximation; neither the recurrence nor sparse storage guarantees a fixed small number of active pairs.

⚠️ Curated Limitations & Negative Results

Artificial Intelligence Ontology (AIO) Grounding

Mapped AIO Classes
AIO Target Class Mapping Relation Mapping Rationale
AIO:ReinforcementLearning
Reinforcement Learning
related_match The selected algorithm learns action values from environmental reward while selecting exploratory actions to improve control. The pinned target is a machine-learning task emphasizing exploration/exploitation, not this update procedure; related_match avoids equivalence or a subclass assertion.

Evidence Sources & Primary Literature

8 Sources
Source ID Publication / Document Type / Access Reference & Checksum
sutton-barto1998-s75
Richard S. Sutton, Andrew G. Barto
primary monograph
full_text
sha256:546b8fe90563…
sutton-barto1998-q-update
Richard S. Sutton, Andrew G. Barto
primary monograph
full_text
sha256:2af9e9fb5f53…
sutton-barto1998-td-error
Richard S. Sutton, Andrew G. Barto
primary monograph
full_text
sha256:6f0f40b2db9b…
sutton-barto1998-trace
Richard S. Sutton, Andrew G. Barto
primary monograph
full_text
sha256:54257b2eca74…
sutton-barto1998-algorithm
Richard S. Sutton, Andrew G. Barto
primary monograph
full_text
sha256:5900f3d7eb1b…
sutton-barto1998-terminal
Richard S. Sutton, Andrew G. Barto
primary monograph
full_text
sha256:e390c9b3185d…
sutton-barto1998-implementation
Richard S. Sutton, Andrew G. Barto
primary monograph
full_text
sha256:92cfb4ed08a9…
sutton-barto1998-errata
Richard S. Sutton, Andrew G. Barto
official documentation
documentation
sha256:d0b2da4a7d85…

Curation Provenance

Curator: Codex
Method: ai_assisted
Model: GPT-6
Created: 2026-10-15T18:58:39Z
Updated: 2026-10-15T18:58:39Z
Source File: data/curated/AccumulatingSarsaLambda.yaml