feat: refine the move quality scale - #51
Conversation
Finding the best move and playing one ten centipawns short of it read identically, which is the one distinction a coach should be making. Losing nothing at all is the only tier here that is measured rather than chosen: it means the move is the one the engine would have played, or one it rates identically. Every other boundary is a threshold someone picked. Checkmate takes the new tier too, since nothing outranks ending the game. Good moves also get a mark. They were the only tier rendering no symbol at all, so a move the engine approved of was indistinguishable from one the coach had not finished analysing. Cyan for the top tier rather than a deeper green: it sits directly above excellent in the move list, and two shades of one hue would not tell them apart.
✅ Deploy Preview for chesstrainer-ai ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
PR Summary by QodoAdd a distinct best-move quality tier
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
1.
|
Losses of 11 and 29 centipawns both read as Bon coup, which covers most of what a decent player produces and tells them nothing about which half they are in. The band splits at 20. The symbol doubles the one below it, as !! does over !, so the two approving tiers read as one family rather than two unrelated glyphs. Adjacent shades of green are acceptable here where they were not for the top tier, because the symbols already separate these two: ✓✓ against ✓ carries the distinction, and the colour only reinforces it.
The top tier claimed to mark the move the engine would have played. A zero loss does not establish that, in two separate ways. Losses are clamped at zero, so a move the engine did not choose reads as zero whenever its separately searched position comes out ahead of the baseline — and two searches of one position disagreeing by a centipawn is ordinary, not exceptional. Every forced mate also collapses to the same score, so preserving mate in ten scored exactly like finding mate in one. The played move is now compared against the engine's chosen move in UCI, which is the thing the tier was always meant to name. classifyMove goes back to being purely threshold-driven and documents that it never returns the top tier. Both failure shapes are covered: a different move whose position evaluates higher, and a slower mate than the engine saw. Each is excellent now, not best.
What changed
The scale goes from five tiers to seven, and every tier now renders a mark.
!!!✓✓✓?!???Why these two tiers
Meilleur coup is the only tier that names something rather than dividing a
range: the move the engine actually chose. It is the distinction a coach should
be drawing — finding the best move and playing one ten centipawns short of it
previously produced identical feedback. Checkmate takes this tier too, since
nothing outranks ending the game.
It is identified by comparing the played move against the engine's chosen move,
not inferred from a zero centipawn loss. Review caught that inference, and
it was wrong twice over: losses are clamped at zero, so a move the engine did
not choose reads as zero whenever its separately searched position comes out
ahead of the baseline; and every forced mate collapses to one score, so
preserving mate in ten scored exactly like finding mate in one.
classifyMoveis now purely threshold-driven and documents that it never returns this tier.
A residual limitation, pre-existing and left alone: because mates collapse to
±10000, a slower mate is graded
Excellentrather than penalised. It is nolonger promoted to
Meilleur coup, which was the part this PR introduced.Très bon splits a band that was doing too much work. Losses of 11 and 29
centipawns both read as
Bon coup, which covers most of what a decent playerproduces and says nothing about which half they are in.
Bon coupwas also the only tier rendering no symbol at all, so a move theengine approved of was indistinguishable from one the coach had not finished
analysing yet.
On the symbols
Doubling marks the stronger of a pair —
!!over!,✓✓over✓— so theseven tiers read as families rather than seven unrelated glyphs.
Cyan for the top tier rather than a deeper green, since it sits directly above
excellent and two shades of one hue would not separate them. The two green
tiers are adjacent shades, which is acceptable there because their symbols
already carry the distinction and the colour only reinforces it.
Both new colour classes were verified present in the built CSS: a class dropped
by Tailwind's purge would render the mark unstyled rather than fail a test.
Verified against broken code
Each mutation asserts its anchor exists before applying, so a no-op edit cannot
be mistaken for a passing check.
Not included
There is still no legend anywhere in the app explaining the symbols.
!,?!,?and??are standard chess notation, but!!,✓✓and✓are worthspelling out if the coach page is meant to teach.