Implementation source:libs/nous/agreement-search/src/nash-genetic.ts
with shared GA primitives in libs/nous/agreement-search/src/ga-operators.ts.
Intended use: baseline single-survivor candidate selection where the
parties have agreed Nash optimality is the decision rule. Reference baseline
against Mediator.ai's public architecture; the kernel preserves that baseline
and adds uncertainty-aware fitness and formal clause validation.
Fairness metrics reported: Nash product as primary; Concordia's
fairness-metric module (@nous/preference-inference/fairness-metrics.ts)
attaches the rest to the run summary.
Handling of hard constraints: §179.3.3.2 hard constraints are filtered by
filterCandidates BEFORE scoring; only soft preferences enter the fitness
function. A hard-constraint violation in any child kills that child
immediately.
Handling of uncertainty: four selection modes —
posterior_mean | lcb | ucb | thompson — drawn from the preference-inference
posterior. lcb (lower-confidence bound) is the default for legal/restorative
use-case classes; posterior_mean is the Mediator.ai-baseline mode.
Accepted candidate contract:AgreementCandidate (from
@concordia/contracts). Survivor is the highest-Nash-product candidate under
the configured selection mode.
Pareto-frontier diagnostics: Nash GA does not maintain a frontier; for
that, route to the NSGA-II or MAP-Elites cards.
Uncertainty propagation: survivor record carries the per-party posterior
mean / std-error / credible interval / comparison count that drove the
fitness, plus the selection mode used.
Single-survivor output collapses the choice architecture; mediators who want
to show parties a frontier must route to NSGA-II or MAP-Elites.
Mode collapse onto a local Nash optimum is possible if the population size is
too small; convergence-patience early stop guards against wasted iterations
rather than mode collapse.
BATNA misspecification poisons the Nash product directly. The kernel inherits
batna-plausibility.ts checks upstream and uses the BATNA posterior credible
interval (not the point estimate) when the selection mode is lcb.
Candidate safety gate: §179.4.1.5 filterCandidates runs on every child
before scoring. Failures are recorded in FilterDiagnostic for audit.
Clause static validation: §179.2.3.4 static validation is part of
filterCandidates. Contradictory, unlawful, unenforceable, or unsafe clauses
cannot enter the population.
Redline separation: §179.3.3.2 hard constraints are filtered out; the
optimizer never trades them off against soft preferences.
Coercive-choice audit: before the survivor is presented, the candidate set
passes through coercive-choice-audit.ts.