Skip to content

0101. A ranking floor, W1 compared with the opponents, and W5 compared with the evaluation

Source: docs/decisions/0101-weakness-ranking-floor-and-baselines.md. Generated at build time; edit the source file.

Date: 2026-11-23. Status: accepted (lane ranking, branch fix/weakness-ranking). Fixes issues #10 and #12. Amends ADRs 0080 and 0081 (which rows the peer benchmark compares) and ADR-R2-5 (when a priority is positive).

The Tier 1 benchmark (ADR 0100, docs/benchmark.md) found two ranking faults on its first smoke run.

  • #10. Hanging pieces (W1) and not winning won games (W5) were measured correctly but never ranked. is_peer_comparable left both out of the peer benchmark, so their estimates had no band_median, estimate_weakness returned NoBenchmark and the priority was 0. bench-hang hangs a piece at 5% of eligible moves (W1 0.019 [0.016, 0.023] against the clean control’s 0.0036) and was pointed at W9b instead.
  • #12. Any posterior mean above the peer median with one event got a positive priority, and claimable_weakness let every positive priority through. The clean control’s W9b, 11 of 846 against a peer median of 0.008 (range 0.0075 to 0.018, confidence 0.87), ranked first; its W4.allowed, 3 of 4,274, ranked second.

The two keys were left out for different reasons, and only one of them still holds.

  • W1 was left out because the opponent side “has no enrichment”. W1 needs one piece of it, the refutation line, and the player’s own refutation line is not a separate search: enrich_game sets refutation_pv = evals[i+1].pv, the main eval’s PV of the position after the move, and only probes when that PV is empty. The main evals of both sides are cached. So the opponent’s W1 is computable with no engine call, by the same rule.
  • W5 was left out because it is mirrored (ADR 0081): an opponent’s winning episode in a game against the player is the player’s losing episode, and the opponent failing to win it is the player saving it. The peers’ W5 rate is one minus the player’s own W6 rate, a comparison of the player with themselves. That reason holds.
  1. The opponent side gets refutation lines from the cached main evals. peer_benchmark::opponent_raw gives each of the opponent’s moves refutation_pv = evals[i + 1].pv and nothing else (no best line, MultiPV, threat, tablebase or difficulty). W1 joins is_peer_comparable (and the web’s PEER_COMPARABLE_KEYS). A decisive move whose position-after has no PV is left out of W1’s chances, on both sides, as refutation_opportunity already does; it is never a non-event. The migration 20261123070000_opponent_refutation_lines.sql empties the opponent_game_metrics cache, which was computed without the lines at the same metrics version; the next build-profile recomputes it from the cached evals.
  2. W5 is compared with what the evaluation predicts (profile_core::stats::priority::model_baseline). A winning episode starts at W ≥ T_WIN (85), and the win chance is the expected score, so the evaluation expects the episode to lose at most MODEL_LOSS_PER_WINNING_EPISODE = 0.15 of a point. W5’s benchmark row is the failure rate that loses exactly that, 0.15 / e, where e is the player’s own points lost per failure in the window (Σ epl / Σ events; 0.5 for a draw, 1 for a loss, 1 without a failure). All four quartiles and the pooled rate are that rate, and epl_per_event is e, so the existing excess formula gives the points lost per game from winning positions beyond the prediction. It is the absolute cost of the issue’s option 2, put on the same scale (points per game) as every other key’s excess. The row sets the comparison only: the evaluation’s prediction is no population of players, so it is not a prior, and W5’s posterior keeps the flat Beta(1, 1) (estimate_weakness_against_model). With the row as a prior (n0 = 30) the first run pulled bench-noconvert from 0.53 to 0.29, away from its true 0.545.
  3. Where the evaluation baseline applies. Only to keys with a model_baseline (W5 today), only when the side has a benchmark at all (no benchmark still compares nothing), only to keys that benchmark lacks (a Lichess band row wins), and only to the all-games side. The colour pages and the coach name every colour comparison as that colour’s peers, so a colour’s W5 stays not compared. The timeline reads the same merged reference (estimates::with_model_baselines), so W5’s state and its estimate agree. An estimate on this baseline is marked model_baseline and is never offered as a strength (“Few errors”), which is named against the peers.
  4. The ranking floor. An estimate is credible when its reason is Ok, its 80% interval’s lower end lies above the benchmark median (the interval excludes the median on the bad side, which for an equal-tailed interval is a confidence of at least 0.9), and its excess is at least RANK_MIN_EXCESS_PER_GAME = 0.02 points per game. Only a credible estimate has a positive priority. Below the floor the rate, its range, the excess and the confidence are still stored and shown; the priority is 0 and the web files a costing state under “Worth watching”, with “not enough evidence yet to rank them”.
  5. Why 0.02. It is one game’s result every 50 games, about 14 Elo by the research’s upper-bound conversion (0.03 points per game ≈ 20 Elo, docs/research/improvement-engine.md section 5). On the smoke run at 80 games the detected flaws cost far more (W1 0.147, W5 0.092, W9b 0.090 points per game) and the clean control’s two old alarms less (W9b 0.0096, W4.allowed 0.0127). The interval rule alone would not have stopped W4.allowed (its range 0.0002 to 0.0012 clears the peers’ 0.0001); the excess rule alone would not stop a large excess measured on a handful of events.
  6. Nothing stands out is an answer. With no credible estimate the CoachingInput’s weaknesses is empty and validates; the coach’s focus is general (“no weakness has enough evidence yet”). The overview says “Nothing stands out yet. Across N games, no weakness is both clearly more often than your benchmark and costly enough to work on first”, and the report says “Nothing stands out above … in this report”.
  7. The coach names W5’s median honestly. report/report v4 and chat/system v6 add one paragraph: W5’s bandMedian and bandPercentile are what the evaluation predicts from winning positions, never the players faced. v3 and v5 stay for stored hashes. The web names it “What the evaluation predicts” wherever a row names its group (baselineGroupLabel), and the weekly focus never takes it as a peer target.
  1. Re-admit W5 to the peer benchmark (the issue’s option 1). Rejected: the peers’ W5 is the player’s own saves, so the comparison carries no information about other players. In the bench it would have worked only because every opponent defends like the clean policy.
  2. Rank W5 on its total cost, with no baseline. Rejected: every failed conversion counts, so a player converting at the population’s rate would rank W5 first, and W6 (lost positions lost, which the evaluation expects) would rank first for nearly everyone.
  3. Enrich the opponent side with threat and MultiPV searches for W2 and W3 as well. Not now: it costs engine time per opponent move. W1 needed none.
  4. A confidence floor of 0.9 alone, or an excess floor alone (#12 options). Rejected for the reasons in decision 5; the two together are the rule.
  • The smoke scorecard (docs/benchmark.md, bench/baseline.json): recall at 2 from 0.4 to 0.6, top-1 precision from 0.4 to 0.6, clean false alarms from 1 to 0, plan hits from 0.4 to 0.6, mean games to detection from 55 to 45, top-2 overlap from 0.83 to 1.0. bench-hang ranks W1 first from 45 games and bench-noconvert ranks W5 first from 60. #10 and #12 are marked resolved there.
  • Coverage fell from 0.8 to 0.6. W1’s four intervals now miss its true rate: the detector reads 0.019 against 0.023, and the interval is now shrunk towards the opponents’ rate (0.0008, n0 = 300 chances) as every compared key’s is. The flat-prior interval held the true rate only at its top edge before. This is a measured gap with no issue yet, not a tuning target.
  • bench-opening is ranked as W1, not W7.traps. Its injected opening blunders mostly hang a piece. A move’s cost goes once, to the first key in W4 > W2 > W1 > W3 > W8 > W7 > W10, and the opponents’ side now has W1 events, so W7.traps keeps 1.2 of its 31 events’ points lost and its peer row’s EPL per event is 0. Before, the opponents had no W1 and their W7 row kept the full cost, which the player’s own row never did. Whether ranking should use a key’s full cost per event rather than the attributed one is open; no issue yet.
  • The games-against-you bias reaches W1. The opponents of the flawed bench players hang less per eligible move than the clean control’s opponents (0.0008 to 0.0030 against 0.0041), so bench-missmate ranks W1 first at 0.0043, barely above the clean control’s 0.0033. The web states this bias with every comparison (ADR 0080). #11 (its W4.missed row) is unchanged.
  • A stricter standard for W5. The win-chance curve (0.00368208) was fitted to strong players’ results, and weaker players convert less of a +2 position (docs/research/improvement-engine.md section 4). So W5 is judged against what a strong player would score, and a club player with many winning episodes may see it ranked where a peer comparison would not. We don’t know yet how often that happens with real players; Tier 2 (predictive validity) is the measurement.
  • Fewer ranked weaknesses. Rows that ranked on thin excesses before now show as “not enough evidence yet”. The owner’s own rapid W4.allowed (range 0.0029 to 0.0078 around a peer rate of 0.0035, ADR 0084) is one: it moves from “Costing you games” to “Worth watching”.
  • The first build after deploy recomputes every account’s opponent sides from cached evals (no engine), so W1 is compared from then on.