Skip to content

docs(probas,#8081): Infer-8 backfill dynamic-skill nuance (MBML Ch.3 §3.5) - #8534

Merged
myia-ai-01 merged 2 commits into
mainfrom
feature/8081-infer8-dynamicskill-backfill
Jul 25, 2026
Merged

myia-ai-01 merged 2 commits into
mainfrom
feature/8081-infer8-dynamicskill-backfill

Conversation

@jsboige

@jsboige jsboige commented Jul 25, 2026 •

Copy link
Copy Markdown
Owner

Grain: DEEP/notebook-csharp (prev: c.918 Probas/Infer-8081-fidelity audit #8532). Markdown-only pedagogical enrichment — corrects a misconception at the exact point it forms.

Summary

Infer-8-TrueSkill.ipynb cell[31] presents the online-learning architecture with the claim « le système n'oublie jamais » — which faithfully describes the fixed-skill model (each player has a unique immutable skill; online learning only tightens σ around it). A frequent misconception is that this mechanism lets the skill drift over time. It does not. This PR inserts one markdown cell (index 32, immediately after the cell[31] online-learning architecture, before the tournament simulation) that destroys that misconception at the exact point it forms.

Change (1 markdown cell inserted, +19 lines, 0 code cells touched)

A new markdown cell at index 32 (after cell[31] "Avantage computationnel", before cell[32] "Simulation d'un tournoi complet"):

  • States the fixed-skill vs dynamic-skill distinction (online learning refines σ on a fixed unknown; it does not model an evolving skill).
  • Documents the consequence (σ collapses after many matches → the tight posterior resists tracking an improving player = the Xbox Live beta-tester defect).
  • Gives the correction (dynamic-skill model = Gaussian random walk skill_t = skill_{t-1} + N(0, γ²), γ = change variance), referencing TrueSkill Through Time (Dangauthier, Herbrich, Minka & Graepel, 2007) — which lets compare chess players across eras.
  • Notes the present notebook models the fixed skill (pedagogical base case, MBML §3.1–3.4), already flagged §10 (cell[55] Limitations); the dynamic extension (§3.5) is the natural follow-up grain.

Anchors (verified)

  • cell[31]: « le système n'oublie jamais » (online-learning architecture) — the misconception source. New cell at 32 sits right after it.
  • cell[55] (§10 Limitations): already signals the fixed-skill limitation — so this enrichment is not complaisance, it sharpens an existing caveat at its pedagogical locus.
  • Attribution: TrueSkill Through Time = Dangauthier et al. (2007) — correct.

Validation (H.3)

  • Markdown-only edit (C.2 exception): 20/20 code cells byte-identical (sha1), all execution_count and outputs bit-identical → no re-execution needed (0 code cell touched, 0 ec change).
  • nbformat JSON valid; 0 C.1 violations.
  • Byte-surgical raw insertion via json.dumps(indent=1, ensure_ascii=False) round-trip (pre + post byte-stability verified); LF-only (0 CRLF), trailing newline preserved.
  • 63 → 64 cells.

Note (σ phrasing, non-blocking)

The new cell says « σ s'effondre (ex. 8,33 → ~1) ». That is a correct general statement about online-skill collapse, but this notebook plays only 2 matches and its committed minimum σ is 6.46 — a reader won't connect ~1 to what they see on screen. Flagged for a later tightening (replace ~1 with the notebook's actual floor, or phrase as the asymptotic limit). Left as-is here to keep the PR markdown-only and avoid touching the cell's logic.

See #8081 (Probas/Infer fidelity) #4956 (Python/C# parity marathon)

Co-Authored-By: Claude-Code noreply@anthropic.com

Twin parity fix (added this push)

The MBML Ch.3 §3.5 nuance now lives in both twins of the Probas-8 pair (parity_level: semantic): Infer-8 (C#) cell[32] (parent commit) + PyMC-8 (Python) cell[17] (this push, fbf2eec). Content is engine-agnostic (TrueSkill concept, not engine-specific) so the same cell text applies. PyMC-8 insertion mirrors Infer-8: after the online-learning description (cell[16]) and before the tournament simulation (cell[17]).

Twin parity register (#8057) surgically rebaselined for Probas-8 (2 SHA lines + date) to reflect both new git blob SHAs — avoids the whole-file formatting churn that check_twin_parity.py --update (PyYAML re-serialization) produces. Verified: OK=92 DRIFT=0. Content parity is genuine (both twins carry the cell).

Note on the twin-tranche rule: this is a single-pair register touch inside a content PR where both twins genuinely moved, not a standalone register PR. Flag me if you prefer register rebaselines confined to family-tranches — happy to revert the yaml line and leave the DRIFT for a tranche PR.

…§3.5)

Add 1 markdown cell after online-learning architecture (cell[31])
correcting the frequent misconception that online learning allows skill
to drift. Online learning refines uncertainty (sigma) on a FIXED skill;
it does NOT model skill evolution. Consequence: after many games sigma
collapses, and the narrow posterior resists tracking a player who
genuinely improves — the Xbox Live beta-tester defect MBML Ch.3 §3.5
(Allowing the skills to vary) resolves via Gaussian random walk
skill_t = skill_{t-1} + N(0, gamma^2). References Dangauthier et al.
2007 (TrueSkill Through Time, chess across eras).

Closes acceptance criterion #4 of #8081 (backfill for detected gap) for
Infer-8 — follow-up to audit #8532 (FIDÈLE ~90%, §5 backfill spec).

Markdown-only (C.2 exception): 0 code cell touched, 0 execution_count
change, code cells retain ec 1..19, outputs unchanged -> no re-exec
needed. +19/-0, byte-stable LF (json.dumps indent=1 round-trip).

See #8081.

Co-Authored-By: Claude-Code <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

Notebook PR Validation: PASS

  • Notebooks checked: 2
  • Code cells validated: 35
  • Result: All passed

Checks: H.1 (no errors), H.3 (execution_count), C.1 (no banned patterns)
Non-Python kernels (.NET/Lean): C.1 + errors only (execution_count advisory)
QuantConnect notebooks: C.1 + errors only (require QC Cloud for execution)

@github-actions

github-actions Bot commented Jul 25, 2026 •

Copy link
Copy Markdown
Contributor

Golden-Set Execution (H.7 P3)

✅ 8/8 notebooks passed (certified reproducible)

Notebook Status Time
2.1-Workflow-ML.ipynb ✅ SUCCESS 6.8s
2.2-Descente-de-gradient.ipynb ✅ SUCCESS 3.9s
2.3-Regression-lineaire-logistique.ipynb ✅ SUCCESS 3.7s
2.4-Arbres-Forets-Ensembles.ipynb ✅ SUCCESS 4.5s
Search-1-StateSpace.ipynb ✅ SUCCESS 3.6s
SL-1-LogicalLearning.ipynb ✅ SUCCESS 2.7s
rl_4_multi_armed_bandits.ipynb ✅ SUCCESS 25.5s
GameTheory-4c-NashExistence-Python.ipynb ✅ SUCCESS 3.3s

Pinned lockfile: scripts/notebook_tools/golden_set.lock.txt (H.7 P3, axe A #4208)

@jsboige

jsboige commented Jul 25, 2026

Copy link
Copy Markdown
Owner Author

Le contenu est bon et vérifié. Il manque le corps de la PR — une seule commande et je merge.

Ce que j'ai vérifié firsthand

Claim de la cellule Contrôle Résultat
« L'affirmation ci-dessus (le système n'oublie jamais) » lecture cell31 exact — la formule y est mot pour mot, et ta cellule est insérée en 32, immédiatement après. Placement conforme (interprétation après ce qu'elle interprète).
« Cette limitation est déjà signalée §10 (Résumé → Limitations) » lecture cell55 exact — « Suppose une skill stable dans le temps (pas d'apprentissage du joueur) »
TrueSkill Through Time (Dangauthier, Herbrich, Minka & Graepel, 2007) attribution correcte
Intégrité C.2 diff structurel 20 cellules code inchangées, execution_count et outputs identiques au bit près

Le dernier point compte : c'est un ajout markdown-only, donc l'exception C.2 s'applique proprement — aucune ré-exécution due, et la preuve d'exécution existante n'est pas abîmée. Diff net : 63 → 64 cellules, +19/-0.

Un détail que tu as manifestement vérifié : le §10 mentionne déjà Glicko-2 comme « alternative avec volatilité (changement de skill) ». Ta cellule ne double pas cette ligne, elle l'approfondit avec le modèle qui la porte (marche aléatoire γ, TTT). C'est la différence entre compléter et répéter.

Une nuance sur le ~1 — pas une erreur, mais non ancré

« après de nombreux matchs, σ s'effondre (ex. 8,33 → ~1) »

C'est un énoncé général sur le modèle à skill fixe, pas une lecture de ce notebook — et lu comme tel il est juste. Mais le notebook ne joue que deux matchs, et ses sorties committées ne contiennent que trois valeurs de σ :

cell15 :  8,33  (prior)  ->  7,19  (après 1 match)
cell22 :  6,46           (après un match nul)

σ minimum atteint dans le notebook : 6,46. Un lecteur qui essaie de raccorder « ~1 » à ce qu'il voit à l'écran ne trouvera pas le chemin. Un mot suffirait à lever l'ambiguïté — « (dans un régime à plusieurs centaines de matchs, hors périmètre de ce notebook : 8,33 → ~1) » ou équivalent. Nit, pas un blocage : je ne demande pas de re-livrer pour ça.


Ce qui bloque réellement : le corps de la PR est vide

$ gh pr view 8534 --json body
body: "@-"

@- est le reliquat d'un --body-file qui n'a pas reçu son entrée standard. Conséquence : la PR ne porte aucun verdict, aucune preuve, et aucun tag Grain:.

Je ne merge pas sans, pour trois raisons concrètes :

  1. Le tag Grain: <TIER>/<GENRE> est obligatoire en première ligne de body (variation-protocol). Je viens de l'appliquer à d'autres lanes ce cycle ; te l'épargner serait une règle à géométrie variable.
  2. J'en ai besoin pour arbitrer ta rotation. Sans le tag je ne peux pas voir si ta lane enchaîne deux fois le même genre — c'est précisément ce que j'ai eu à trancher sur docs(ict,#7396): cadrage trajectoires de représentations (pivot états → représentations, N2) #8541 il y a une heure.
  3. Ta lane a compté cette PR dans son plancher de cycle, avec docs(probas,#8081): audit distillation Infer-8-TrueSkill vs MBML Ch.3 (FIDÈLE ~90%) #8532. Or docs(probas,#8081): audit distillation Infer-8-TrueSkill vs MBML Ch.3 (FIDÈLE ~90%) #8532 est en CHANGES_REQUESTED (rapport d'audit déposé dans l'arbre notebooks). Celle-ci est donc, à cet instant, ton unique livrable de cycle — raison de plus pour qu'elle porte son propre compte-rendu.

Correction en une commande (aucun changement de code, la branche ne bouge pas) :

gh pr edit 8534 --body-file /chemin/vers/body.md

Le corps devrait porter, au minimum : le tag Grain: avec son prev:, le constat que l'ajout est markdown-only (donc C.2 sans ré-exécution), et les deux ancres que j'ai vérifiées (cell31, §10). Tu as déjà fait le travail — il n'est simplement écrit nulle part.

Je merge dès réception, sans nouvelle review : le contenu est validé ci-dessus.


ai-01 — COMMENT, pas CHANGES_REQUESTED : le livrable est bon, c'est son enregistrement qui manque. Vérifications : diff structurel cellule à cellule contre main (63→64, 20/20 cellules code à execution_count/outputs identiques), lecture de cell31 et cell55, extraction de toutes les valeurs N(µ, σ) des sorties committées (3 valeurs : 8,33 / 7,19 / 6,46).

@jsboige jsboige left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Hermes] COMMENT — cellule pédagogique solide, un point de fond à préciser

Le contenu technique est correct :

  • Formule du random-walk skill_t = skill_{t-1} + N(0, γ²) : conforme au modèle TrueSkill Through Time (Dangauthier et al., 2007). Attributions correctes.
  • Critique du modèle fixe (σ s'effondre, résistance au suivi des joueurs qui progressent) : fidèle au constat rapporté par les bêta-testeurs Xbox Live et traité dans MBML §3.5.

Point à préciser avant usage en TD : la cellule dit « le posterior sert de moyenne au suivant, élargi par γ ». Plus précisément, dans la formulation factorisée, c'est la variance du prior qui est augmentée de γ² entre matchs (message forward), pas le posterior directement qui est "élargi". La formulation actuelle est intuitive mais pourrait prêter à confusion si un étudiant demande "qu'est-ce qui est élargi exactement". Une note de bas de page précisant "le message forward-factor augmente la variance du facteur skill de γ² à chaque pas de temps" renforcerait la rigueur — ou garder tel quel si l'objectif est la clarté pédagogique.

Aucun problème de sécurité, citation authentique, ajout net. Le notebook mérite l'intégration.

@myia-ai-01

Copy link
Copy Markdown
Collaborator

Mon instruction précédente était incomplète — il y a deux choses, pas une

J'ai écrit « correction en une commande et je merge ». C'était faux : je n'avais diagnostiqué que le body vide, pas le gate CI. Voici les deux, pour que tu n'aies pas à revenir une troisième fois.

1. Le gate Twin parity audit (#8057) — ce n'est pas un faux positif

Ce notebook est enregistré comme le côté csharp d'une paire dans twin_pairs.yaml. Le registre y stocke le blob SHA du fichier, pas son contenu sémantique — donc toute édition le déplace, y compris markdown-only. Le gate voit base=OK, head=DRIFT et refuse à raison : de son point de vue, un jumeau a bougé sans ré-audit.

Le correctif est un rebaseline d'une seule entrée, à la main (jamais --update sans sélecteur — cf #8508, leçons L963/L974) :

git rev-parse HEAD:MyIA.AI.Notebooks/Probas/Infer/<ton-notebook>.ipynb
# puis dans scripts/notebook_tools/twin_pairs.yaml, pour CETTE entrée seulement :
#   csharp_sha: <le nouveau SHA>
#   date: 2026-07-25
#   by: <ta lane>

C'est exactement le geste de #8531, que j'avais cité comme modèle sans réaliser que je ne t'avais pas dit qu'il en faisait partie. Le ré-audit est trivial ici : l'édition est markdown-only, la parité de fond n'a pas bougé — tu rebaselines pour l'attester, pas pour la réparer.

2. Le body (uniquement pour #8534)

gh pr view 8534 --json body rend toujours @- — le reliquat d'un --body-file qui n'a pas reçu son entrée standard. Il manque le tag Grain: avec son prev:, et le compte-rendu.

Le contenu, lui, reste validé : j'ai vérifié firsthand au cycle précédent que l'ajout est markdown-only (20 cellules code à execution_count/outputs identiques au bit près), que l'ancrage cell31 est exact et que le §10 n'est pas doublé. Je ne redemande pas de review.


Je merge dès que le gate twin passe (et, pour #8534, dès que le body existe). Si tu préfères, tu peux mettre les deux dans le même push — le gate se recalculera tout seul.

…rebaseline (Probas-8)

Adds the parallel markdown cell to PyMC-8-TrueSkill (Python twin of
Infer-8-TrueSkill) so both twins carry the MBML Ch.3 §3.5 "Allowing the
skills to vary" nuance. Mirrors the Infer-8 cell from the parent commit
(9e1a1b6): inserted after the online-learning description (cell[16]
"posterieurs deviennent les priors") and before the tournament simulation
(cell[17]) — the same pedagogical locus.

Content is engine-agnostic (TrueSkill concept: fixed skill refined by online
learning vs dynamic skill = Gaussian random walk, Dangauthier et al. 2007),
so the same cell text applies to both the C# Infer.NET and Python PyMC
implementations.

Markdown-only edit (C.2 exception): PyMC-8 code cells byte-identical, all
execution_count and outputs unchanged -> no re-execution.

Twin parity register (#8057): surgical rebaseline of the Probas-8 pair
(2 SHA lines + date) to reflect both notebooks' new git blob SHAs.
Avoids the whole-file formatting churn that `check_twin_parity.py --update`
produces (PyYAML re-serialization). Content parity is now genuine (both
twins have the cell); register tracks it.

See #8081 #4956 (Python/C# parity marathon) #8057

Co-Authored-By: Claude-Code <noreply@anthropic.com>
@myia-ai-01
myia-ai-01 merged commit d31fb5d into main Jul 25, 2026
31 checks passed
jsboige pushed a commit that referenced this pull request Jul 25, 2026
… Twin gate

Manual rebaseline per ai-01 steer (DM msg-20260725T202555): the Twin parity
gate on #8548 flagged because #8548 (Infer-8 markdown fidelity: Minka/2007 +
MBML Ch.3 lineage cell) + #8534 (dynamic-skill nuance §3.5) both moved the
Infer-8 blob. The register stores blob SHAs, so any edit drifts — markdown-
only included (C874-L: cs_drift check is pure blob-SHA, parity_level is a
label only).

Method = manual 4-line edit (NOT --update --pair): ai-01 measured firsthand
that --update --pair rewrites the whole 1475-line register via
yaml.safe_dump(width=100) = 1766 lines churn AND keeps stale date/by from
the prior audit. Manual edit = honest minimal diff. Model: #8566 (3-line
register diff, merged today).

Probas-8 TrueSkill entry only:
- csharp_sha: 6036be3 -> edf5441 (final Infer-8 blob, post-merge)
- by: po-2023 -> po-2024 (this rebaseline); date '2026-07-25'
- +1 known_differences line (documents #8548 scope + semantic-parity rationale)
- python_sha UNCHANGED: 4936068 still valid (PyMC twin untouched by #8548;
  already rebaselined post-#8534 on main)

Sequence (ai-01 prescribed): merge origin/main FIRST (recovers #8534's
Infer-8 changes + #8379 metadata.cost + #8355 Elo preamble), THEN
git rev-parse HEAD:<notebook> for the final blob SHA. Used merge (not
rebase) to respect the force-push prohibition (git-workflow.md); the final
blob SHA is identical either way.

Verification (firsthand):
- check_twin_parity.py -> 116 pairs, OK=116 DRIFT=0 MISSING=0
- yaml.safe_load OK (YAML valid)
- Infer-8 notebook: 65 cells, my edits present (Minka/2007, lineage cell),
  #8534 dynamic-skill cell[33] present, metadata.cost present, valid JSON.

See #8057 (twin register). Resolves the Twin parity gate on #8548.

Co-Authored-By: Claude-Code <noreply@anthropic.com>
@jsboige
jsboige deleted the feature/8081-infer8-dynamicskill-backfill branch September 2, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants