feat: add a move legend and rebuild the difficulty ladder - #52
Conversation
Seven tiers now sit beside the move list. Four of them are standard chess annotation a player may already know; !!, ✓✓ and ✓ are this app's own, and colour alone is not an explanation. Collapsed by default, since it is reference material rather than something to read every game. The order lives next to the table as its own exported list. Deriving it from object key order would have worked until someone reordered the table, and a tier missing from the list would ship unexplained without anything failing — so a test holds the two together.
The first level searched two plies and played well above a beginner, which is the complaint that started this. Measuring the ladder by self-play showed the problem was not only the bottom rung. Against a player choosing moves at random, the old Novice scored 97%. The claimed ratings described gaps of 200, 300, 400 and 500 Elo; the measured gaps were roughly 470, then 220, then two so wide that the stronger level won all sixteen games. The numbers described nothing. The new ladder starts at depth 1, which cannot see a recapture coming and so hangs pieces the way a novice does, and narrows the top steps until every rung is measurable. Fourteen games per pairing, alternating colours: each level now beats the one below it between 61% and 96% of the time, and none of them wins everything. The Elo figures are gone rather than corrected. Without UCI_Elo — which this build does not expose — there is no calibrated opponent to anchor against, so any number would be invented like the last ones. Levels say what they do instead, which is more use to someone picking one. Those percentages carry hundreds of Elo of uncertainty at that sample size: two runs of one pairing gave 76 and 338. They establish the ordering and the absence of a wall, and the file says so rather than implying more precision than the method supports.
✅ Deploy Preview for chesstrainer-ai ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
PR Summary by QodoExplain move quality and recalibrate battle difficulty
AI Description
Diagram
High-Level Assessment
Files changed (8)
|
Code Review by Qodo
1.
|
Review read Stockfish's skill handling as only picking a weakened move when the search reaches 1 + Skill Level, which would leave the two strongest levels playing the top candidate at their capped depth and make their error settings decorative. Measured instead of argued: on one middlegame position, 30 searches at depth 5 with Skill Level 20 returned the same move every time, while the same depth with Avancé's settings returned five different moves and the engine's own choice only 3 times in 30. Depth 8 behaves the same way with Maître's settings. Stockfish 11 also picks a weakened move at the end of the search, so the cap does not bypass it. Written down so the settings are not removed later on the theory that they do nothing.
Two requests in one branch: a legend for the move marks, and a rework of the
battle difficulty levels.
Legend
Seven tiers now sit beside the move list in the coach, collapsed by default
since it is reference material rather than something to read every game. Four
of them are standard chess annotation a player may already know;
!!,✓✓and✓are this app's own, and colour alone is not an explanation.The order is its own exported list rather than object key order, so reordering
the table cannot silently reorder the legend. A test holds the two together: a
tier added to
MOVE_QUALITYand forgotten in the list would otherwise shipunexplained without anything failing.
Difficulty levels
The first level searched two plies and played well above a beginner. Measuring
the ladder by self-play showed the problem was not only the bottom rung.
The old ladder, measured. Sixteen games per pairing, alternating colours:
A ladder with a huge first step, a small second one, and then two walls the
weaker level never once crossed. The advertised ratings described none of it.
The new ladder. Starts at depth 1, which cannot see a recapture coming and
so hangs pieces the way a novice does, and narrows the top steps until every
rung is measurable. Fourteen games per pairing:
Every level beats the one below it, none of them wins everything.
The Elo figures are gone rather than corrected. This Stockfish build exposes
no
UCI_Elo— I asked it for its options to confirm, rather than trusting thecomment that claimed it — so there is no calibrated opponent to anchor against
and any number would be invented like the last ones. Each level now says what it
does, which is more use to someone choosing one.
On the confidence of these numbers
They carry hundreds of Elo of uncertainty at this sample size. Two runs of the
same pairing gave 76 and 338. They establish the ordering and the absence of a
wall, and nothing finer — the file says so rather than implying a precision the
method does not support.
The one claim that is robust is the wall:
AvancéandMaîtrewon 16/16 intheir pairings, reproduced across two separate runs.
Verified against broken code