Disciplines · Compliance

Optimizer Card — mcts-lats v1.0.0

Szepesvári 2006) extended with LATS (Language Agent Tree Search, Zhou et al.

9sections3 minread

On this page

1. Identity#

  • Optimizer name: mcts-lats
  • Algorithm family: Monte Carlo Tree Search (UCT, Coulom 2006; Kocsis & Szepesvári 2006) extended with LATS (Language Agent Tree Search, Zhou et al. 2023) — value-augmented selection.
  • Implementation source: libs/nous/agreement-search/src/mcts-lats.ts with shared GA primitives in ga-operators.ts.
  • Intended use: trajectory-interpretable search where the workbench must replay the path from root to winning leaf as an explicit clause- edit sequence ("this is how we arrived at the agreement"). Also the natural integration point for §179.9.4.2 mediator-value models.

2. Scoring rule#

  • Utility aggregation: scalar fitness Q(c) per node, caller-supplied via FitnessFn.
  • Selection score: score(c) = (1 − λ) · Q(c) + λ · V(c) + C · sqrt(ln N(p) / N(c)). λ = valueWeight. λ = 0 recovers plain UCT; λ = 1 recovers pure value-function rollout. C is the UCB exploration constant.
  • Fairness metrics reported: caller selects; full fairness-metrics.ts set attaches to the run summary.
  • Handling of hard constraints: every node passes through filterCandidates; failing nodes are not added to the tree.
  • Handling of uncertainty: rollout fitness can be posterior mean, LCB, or Thompson; the kernel is agnostic.

3. Inputs#

  • Candidate space: sandboxed clause-mutator DSL + recombination borrows from a reference pool.
  • Initial population / seeds: root from §179.4.1.1; reference pool from §179.4.1.2 decomposition.
  • Time / iteration budget: iteration count + wall-clock cap + rollout depth.
  • Randomness: seeded mulberry32.

4. Outputs#

  • Accepted candidate contract: highest-Q leaf along the recorded path from root.
  • Pareto-frontier diagnostics: not the goal; route to NSGA-II / MAP-Elites for frontier coverage.
  • Trajectory record: the path from root to leaf as an ordered list of (action, child-id, Δ-fitness) tuples — consumed by the workbench audit replay.
  • Uncertainty propagation: leaf carries posterior detail; tree visit-count distribution is reported for confidence visualization.

5. Evaluation#

Metric Value Evaluator card Date
Trajectory faithfulness replay byte-identical for given seed n/a — mcts-lats.test.ts reproducibility assertion 2026-04-25
Diversity preservation not the goal here n/a 2026-04-25
Fairness (Nash / KS / max-min) reported per leaf; gate runs against fairness-suite 2026-04-25
§179.10.6 baseline
Regret vs oracle bounded by UCT regret baseline-benchmark-gate 2026-04-25
(O(sqrt(ln N · N)))
Specification-gaming resistance spec-gaming-audit.ts on winning leaf fairness-suite 2026-04-25
Runtime (typical) sub-second to seconds for 50 clauses; n/a — deterministic synchronous kernel 2026-04-25
interruptible at any iteration
Cost per run $0 LLM-free; with valueEstimate n/a — orchestrator scoring-cost trace 2026-04-25
callback the cost is value-model cost

6. Known limitations#

  • Tree size grows with iterations; memory is O(nodes × clauses). Practical cap: ~100k nodes for 50-clause cases.
  • Without a value model (valueWeight = 0), MCTS falls back to UCT; convergence on adversarial landscapes can be slow.
  • Rollout depth and exploration constant C are caller-supplied; misconfiguration yields shallow or biased exploration.

7. Guardrails#

  • Candidate safety gate: filterCandidates on every node.
  • Clause static validation: inside filterCandidates.
  • Redline separation: hard constraints filtered before tree insertion.
  • Trajectory audit: trajectory record is part of the §179.5.3.3 reproducibility manifest.

8. References#

  • libs/nous/agreement-search/src/mcts-lats.ts
  • Coulom (2006), "Efficient selectivity and backup operators in Monte-Carlo tree search".
  • Kocsis, Szepesvári (2006), "Bandit based Monte-Carlo planning".
  • Zhou et al. (2023), "Language Agent Tree Search Unifies Reasoning, Acting, and Planning in Language Models" (LATS).
  • docs/research/bibliography.md §tree-search-reasoning