<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ChessVox</title>
    <description>The latest articles on DEV Community by ChessVox (@chessvox).</description>
    <link>https://dev.to/chessvox</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4276917%2Fc66ffacb-d1e8-4f8f-903d-ccad0711ec28.png</url>
      <title>DEV Community: ChessVox</title>
      <link>https://dev.to/chessvox</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chessvox"/>
    <language>en</language>
    <item>
      <title>Classifying chess moves from Stockfish evals: the rules behind "blunder", "mistake" and "inaccuracy"</title>
      <dc:creator>ChessVox</dc:creator>
      <pubDate>Tue, 01 Dec 2026 17:24:27 +0000</pubDate>
      <link>https://dev.to/chessvox/classifying-chess-moves-from-stockfish-evals-the-rules-behind-blunder-mistake-and-inaccuracy-4j45</link>
      <guid>https://dev.to/chessvox/classifying-chess-moves-from-stockfish-evals-the-rules-behind-blunder-mistake-and-inaccuracy-4j45</guid>
      <description>&lt;p&gt;Every chess site shows the same badges after a game: best, inaccuracy, mistake, blunder. They look like facts, but each one is a rule somebody chose. We build ChessVox, an app that reviews your Chess.com and Lichess games and turns the mistakes into training, so we had to choose these rules too. This post covers what we chose, what broke along the way, and what we would still change.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The raw signal: eval before vs eval after
&lt;/h2&gt;

&lt;p&gt;Stockfish gives a score for a position from the side to move's view, in centipawns (100 = about one pawn). To judge a move, we evaluate the position before it and the position after it, flip both into the mover's view, and take the difference:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// scores are side-to-move perspective; convert both to White's view first&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;loss&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;mover&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s2"&gt;"w"&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;beforeWhite&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;afterWhite&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;afterWhite&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;beforeWhite&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That number, the centipawn loss, is what the badge is built on.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The thresholds
&lt;/h2&gt;

&lt;p&gt;Our current cut-offs, from the code that ships today:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Loss (centipawns)&lt;/th&gt;
&lt;th&gt;Tag&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;more than 200&lt;/td&gt;
&lt;td&gt;blunder&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;100 to 200&lt;/td&gt;
&lt;td&gt;mistake&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;50 to 99&lt;/td&gt;
&lt;td&gt;inaccuracy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;20 to 49&lt;/td&gt;
&lt;td&gt;good&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;under 20, not the engine move&lt;/td&gt;
&lt;td&gt;excellent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;engine move&lt;/td&gt;
&lt;td&gt;best&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two extra tags sit on top:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Great&lt;/strong&gt;: the played move is the engine's first choice &lt;em&gt;and&lt;/em&gt; the second-best line is at least 150 cp worse. Finding the only good move is different from picking one of five fine ones, and MultiPV tells you which case you are in.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Brilliant&lt;/strong&gt;: a sound sacrifice. We keep this one rare on purpose. The move must be the engine's choice (or within 10 cp), leave a piece worth 3+ en prise that the engine's main line really takes, the mover must not already be winning by more than +5 without it, must not stand worse after it, and it can't be the only legal move. Trades, recaptures and a threatened piece simply stepping away do not count.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Mate scores
&lt;/h2&gt;

&lt;p&gt;Engines report &lt;code&gt;score mate N&lt;/code&gt; instead of centipawns. We map a forced mate to ±10,000 cp, so the same subtraction still works. Two cases needed special handling:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The mating move itself.&lt;/strong&gt; A checkmated position has no search to run. Engines answer it with &lt;code&gt;mate 0&lt;/code&gt; or no score at all, which came through as 0 cp and made the move that &lt;em&gt;delivered&lt;/em&gt; mate look like a huge blunder. Now a move that ends in checkmate always scores zero loss.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mate before, centipawns after.&lt;/strong&gt; At review depth, the engine sometimes sees a forced mate before a move and only a large centipawn score after it. That reads as a ~9,000 cp "loss". It tagged the first move of the mating line in Morphy's Opera Game (Bxd7+) as a blunder. Fix: if the played move &lt;em&gt;is&lt;/em&gt; the engine's best move, it can never get a negative tag. Small losses on the best move still count, so it can show as "excellent" instead of "best", but never as a mistake.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. Why accuracy uses a different curve
&lt;/h2&gt;

&lt;p&gt;Centipawn loss is fine for tags, but bad for a single accuracy number. Losing 300 cp when you are +15 changes nothing. Losing 300 cp at 0.00 decides the game. So for accuracy we first turn the eval into a win probability with a logistic curve, then score the drop in win probability:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;winPercent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;0.00368208&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;cp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;moveAccuracy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;winLoss&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
  &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;103.1668&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;0.04354&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;winLoss&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mf"&gt;3.1669&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are the public constants Lichess uses, so a ChessVox accuracy is roughly comparable with a Lichess one. Game accuracy is the average over the side's moves. We also split it by phase (moves 1-12, 13-35, 36+), which is often more useful than the total: a strong opening can hide a weak endgame.&lt;/p&gt;

&lt;p&gt;One small trap: a game set up from a custom FEN has no known eval for its first position. Measuring the first move from 0.00 would invent a gain or a loss, so we skip it.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Running Stockfish in the browser
&lt;/h2&gt;

&lt;p&gt;The free tools run Stockfish 19 lite as single-threaded WebAssembly in a Web Worker, so quick evaluations cost no server CPU. Full game reviews run deeper (depth 24) on the server. On some iOS WebKit browsers the Stockfish 19 WASM build can trap with &lt;code&gt;RuntimeError: Unreachable code should not be executed&lt;/code&gt;. After one crash in a tab, we switch that tab to a smaller Stockfish 10 build, so the page keeps working rather than failing on every position.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. From tags to training
&lt;/h2&gt;

&lt;p&gt;A tag is only useful if it changes what you practise. Every blunder and mistake you made that has an engine move to learn becomes a puzzle from your own game: same position, find the move you missed. We pull these from your last 100 reviewed games, so the puzzle set is the mistakes you actually repeat, not random tactics.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. What we would change
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Thresholds should depend on the position.&lt;/strong&gt; A flat 200 cp blunder line is too harsh when you are already +8 and too soft at 0.00. Tagging on win-probability loss (as we already do for accuracy) would fix this; the catch is that the familiar "a blunder loses two pawns" rule is easier for players to understand.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Thresholds should probably depend on the player.&lt;/strong&gt; A 100 cp slip at 800 rating is normal; at 2200 it is a real error.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Depth matters more than people think.&lt;/strong&gt; Shallow evals swing, and every swing becomes a fake inaccuracy. Before blaming a threshold for a "wrong" tag, check the search depth.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you work on chess tools, we would like to hear how you set your cut-offs, especially if you tag on win probability.&lt;/p&gt;

&lt;p&gt;You can try the review on your own games, free and without an account: &lt;a href="https://chessvox.com/tools/game-review?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=move-classification" rel="noopener noreferrer"&gt;https://chessvox.com/tools/game-review?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=move-classification&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ChessVox is an independent app, not affiliated with Chess.com or Lichess.&lt;/p&gt;

</description>
      <category>chess</category>
      <category>javascript</category>
      <category>webassembly</category>
      <category>gamedev</category>
    </item>
  </channel>
</rss>
