# Question
Title: Weird Stockfish UCI output for d2d4 before and after
I am currently trying to code a training tool and am a bit confused by what Stockfish returns.

Before doing d2d4 it states that this move will have a 56 centipawn advantage for White - which is what I would expect.

But, after I make the move and it evaluates Black's next best move, it even favors Black.

**Update 3:** Turned out to be a twofold problem. I misunderstood that point value swapps depending on the side (see accepted answer) and the js version seems to run buggy, the webassembly version behaves differently

**Continuing original question**

```
Tell Stockfish: setoption name MultiPV value 2 stockfishIntegration.js:22:10
Tell Stockfish: position fen rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 stockfishIntegration.js:22:10
Tell Stockfish: go depth 15 stockfishIntegration.js:22:10
Stockfish says: info depth 1 seldepth 1 multipv 1 score cp 112 nodes 39 nps 39000 tbhits 0 time 1 pv e2e4 StockfishParser.js:10:12
Stockfish says: info depth 1 seldepth 1 multipv 2 score cp 112 nodes 39 nps 39000 tbhits 0 time 1 pv d2d4 StockfishParser.js:10:12
Stockfish says: info depth 2 seldepth 2 multipv 1 score cp 109 nodes 96 nps 96000 tbhits 0 time 1 pv e2e4 b7b6 StockfishParser.js:10:12
Stockfish says: info depth 2 seldepth 2 multipv 2 score cp 101 nodes 96 nps 96000 tbhits 0 time 1 pv e2e3 c7c6 StockfishParser.js:10:12
Stockfish says: info depth 3 seldepth 3 multipv 1 score cp 155 nodes 227 nps 113500 tbhits 0 time 2 pv e2e3 c7c6 d2d4 StockfishParser.js:10:12
Stockfish says: info depth 3 seldepth 3 multipv 2 score cp 141 nodes 227 nps 113500 tbhits 0 time 2 pv d2d4 d7d6 e2e4 StockfishParser.js:10:12
Stockfish says: info depth 4 seldepth 4 multipv 1 score cp 130 nodes 498 nps 124500 tbhits 0 time 4 pv d2d4 e7e6 e2e4 b7b6 StockfishParser.js:10:12
Stockfish says: info depth 4 seldepth 4 multipv 2 score cp 83 nodes 498 nps 124500 tbhits 0 time 4 pv e2e3 e7e6 d2d4 c7c5 StockfishParser.js:10:12
Stockfish says: info depth 5 seldepth 5 multipv 1 score cp 91 nodes 1493 nps 124416 tbhits 0 time 12 pv d2d4 d7d5 c1g5 g8f6 e2e3 StockfishParser.js:10:12
Stockfish says: info depth 5 seldepth 5 multipv 2 score cp 69 nodes 1493 nps 124416 tbhits 0 time 12 pv g1f3 d7d5 d2d4 e7e6 e2e3 StockfishParser.js:10:12
Stockfish says: info depth 6 seldepth 6 multipv 1 score cp 47 nodes 3450 nps 138000 tbhits 0 time 25 pv d2d4 d7d5 g1f3 e7e6 e2e3 g8f6 StockfishParser.js:10:12
Stockfish says: info depth 6 seldepth 6 multipv 2 score cp 45 nodes 3450 nps 138000 tbhits 0 time 25 pv e2e3 e7e6 d2d4 d7d5 g1f3 b8c6 StockfishParser.js:10:12
Stockfish says: info depth 7 seldepth 7 multipv 1 score cp 65 nodes 5361 nps 148916 tbhits 0 time 36 pv d2d4 d7d5 c1f4 b8c6 g1f3 e7e6 e2e3 StockfishParser.js:10:12
Stockfish says: info depth 7 seldepth 7 multipv 2 score cp 56 nodes 5361 nps 148916 tbhits 0 time 36 pv e2e3 d7d5 g1f3 b8c6 d2d4 e7e6 c1d2 StockfishParser.js:10:12
Stockfish says: info depth 8 seldepth 8 multipv 1 score cp 55 nodes 16225 nps 195481 tbhits 0 time 83 pv c2c4 d7d5 d2d4 g8f6 e2e3 b8c6 b1c3 e7e6 StockfishParser.js:10:12
Stockfish says: info depth 8 seldepth 8 multipv 2 score cp 49 nodes 16225 nps 195481 tbhits 0 time 83 pv d2d4 e7e6 b1c3 f8b4 e2e4 d7d5 e4e5 b8c6 StockfishParser.js:10:12
Stockfish says: info depth 9 seldepth 13 multipv 1 score cp 96 nodes 35799 nps 213089 tbhits 0 time 168 pv d2d4 d7d5 b1c3 g8f6 g1f3 e7e6 c1g5 b8c6 e2e3 StockfishParser.js:10:12
Stockfish says: info depth 9 seldepth 10 multipv 2 score cp 90 nodes 35799 nps 213089 tbhits 0 time 168 pv b1c3 d7d5 d2d4 g8f6 g1f3 e7e6 f3e5 b8c6 c1g5 StockfishParser.js:10:12
Stockfish says: info depth 10 seldepth 14 multipv 1 score cp 69 nodes 86669 nps 228678 tbhits 0 time 379 pv g1f3 d7d5 e2e3 e7e6 f1e2 g8f6 d2d4 c7c5 e1g1 b8c6 b1c3 StockfishParser.js:10:12
Stockfish says: info depth 10 seldepth 13 multipv 2 score cp 61 nodes 86669 nps 228678 tbhits 0 time 379 pv d2d4 d7d5 c1f4 e7e6 c2c3 c7c5 e2e4 b8c6 d4c5 d5e4 d1d8 c6d8 StockfishParser.js:10:12
Stockfish says: info depth 11 seldepth 17 multipv 1 score cp 95 nodes 137593 nps 234001 tbhits 0 time 588 pv e2e4 d7d5 e4d5 c7c6 d2d4 c6d5 b1c3 e7e6 g1f3 b8d7 f3e5 d7e5 d4e5 StockfishParser.js:10:12
Stockfish says: info depth 11 seldepth 13 multipv 2 score cp 44 nodes 137593 nps 234001 tbhits 0 time 588 pv d2d4 d7d5 c1f4 e7e6 c2c3 c7c5 e2e4 b8c6 d4c5 f8c5 e4e5 StockfishParser.js:10:12
Stockfish says: info depth 12 seldepth 19 multipv 1 score cp 89 nodes 210484 nps 229035 tbhits 0 time 919 pv e2e4 e7e5 g1f3 g8f6 d2d4 d7d5 f3e5 d5e4 f1c4 f6d5 e1g1 c7c6 StockfishParser.js:10:12
Stockfish says: info depth 12 seldepth 14 multipv 2 score cp 51 nodes 210484 nps 229035 tbhits 0 time 919 pv d2d4 d7d5 c1f4 e7e6 e2e3 g8f6 b1c3 f8d6 f4d6 c7d6 g1f3 e8g8 StockfishParser.js:10:12
Stockfish says: info depth 13 seldepth 20 multipv 1 score cp 81 nodes 338986 nps 226292 hashfull 141 tbhits 0 time 1498 pv e2e4 e7e5 g1f3 b8c6 d2d4 e5d4 f3d4 d7d5 f1b5 c8d7 b1c3 d5e4 b5c6 d7c6 d4c6 StockfishParser.js:10:12
Stockfish says: info depth 13 seldepth 16 multipv 2 score cp 50 nodes 338986 nps 226292 hashfull 141 tbhits 0 time 1498 pv d2d4 d7d5 e2e3 e7e6 g1f3 g8f6 f1d3 b8c6 e1g1 f8d6 c1d2 e8g8 b1c3 c6b4 c3b5 StockfishParser.js:10:12
Stockfish says: info depth 14 seldepth 19 multipv 1 score cp 69 nodes 724748 nps 221906 hashfull 303 tbhits 0 time 3266 pv d2d4 d7d5 e2e3 e7e6 g1f3 g8f6 c2c4 c7c5 b1c3 f8d6 c4d5 e6d5 d4c5 d6c5 f1e2 e8g8 e1g1 StockfishParser.js:10:12
Stockfish says: info depth 14 seldepth 24 multipv 2 score cp 54 nodes 724748 nps 221906 hashfull 303 tbhits 0 time 3266 pv e2e4 e7e5 b1c3 g8f6 g1f3 b8c6 f1c4 f8e7 c3d5 e8g8 d5f6 e7f6 d2d3 d7d6 e1g1 c8e6 c4d5 e6d5 StockfishParser.js:10:12
Stockfish says: info depth 15 seldepth 23 multipv 1 score cp 76 nodes 812038 nps 222964 hashfull 337 tbhits 0 time 3642 pv e2e4 e7e5 g1f3 b8c6 d2d4 e5d4 f3d4 g8f6 d4c6 d7c6 d1d8 e8d8 b1c3 f8b4 c1g5 h7h6 g5f6 g7f6 e1c1 d8e7 g2g3 StockfishParser.js:10:12
Stockfish says: info depth 14 seldepth 23 multipv 2 score cp 69 nodes 812038 nps 222964 hashfull 337 tbhits 0 time 3642 pv d2d4 g8f6 StockfishParser.js:10:12
Stockfish says: info depth 15 seldepth 23 multipv 1 score cp 76 nodes 838223 nps 223585 hashfull 343 tbhits 0 time 3749 pv e2e4 e7e5 g1f3 b8c6 d2d4 e5d4 f3d4 g8f6 d4c6 d7c6 d1d8 e8d8 b1c3 f8b4 c1g5 h7h6 g5f6 g7f6 e1c1 d8e7 g2g3 StockfishParser.js:10:12
Stockfish says: info depth 15 seldepth 16 multipv 2 score cp 59 nodes 838223 nps 223585 hashfull 343 tbhits 0 time 3749 pv d2d4 g8f6 e2e3 e7e6 g1f3 d7d5 c2c4 c7c5 b1c3 b8c6 c4d5 f6d5 e3e4 d5c3 b2c3 c5d4 StockfishParser.js:10:12
Stockfish says: bestmove e2e4 ponder e7e5 StockfishParser.js:10:12
Evaluated Moves:
[
  {
    "depth": 15,
    "multipv": 1,
    "move": "e2e4",
    "score": 76
  },
  {
    "depth": 15,
    "multipv": 2,
    "move": "d2d4",
    "score": 59
  }
]

Best Move:  e2e4 StockfishParser.js:86:12
Best move player can do:  Object { depth: 15, multipv: 1, move: "e2e4", score: 76 } stockfishIntegration.js:76:12

```

Here he says best move is e2e4 with score 76. but d2d4 still gets 59

Now I give him the FEN for the d2d4 move and let him evaluate blacks best move.

```
Tell Stockfish: position fen rnbqkbnr/pppppppp/8/8/3P4/8/PPP1PPPP/RNBQKBNR b KQkq d3 0 1 stockfishIntegration.js:22:10
Tell Stockfish: go depth 14 stockfishIntegration.js:22:10
Stockfish says: info depth 1 seldepth 1 multipv 1 score cp -59 nodes 43 nps 43000 tbhits 0 time 1 pv g8f6 StockfishParser.js:10:12
Stockfish says: info depth 1 seldepth 1 multipv 2 score cp -62 nodes 43 nps 43000 tbhits 0 time 1 pv d7d5 StockfishParser.js:10:12
Stockfish says: info depth 2 seldepth 2 multipv 1 score cp -59 nodes 97 nps 97000 tbhits 0 time 1 pv g8f6 e2e3 StockfishParser.js:10:12
Stockfish says: info depth 2 seldepth 2 multipv 2 score cp -59 nodes 97 nps 97000 tbhits 0 time 1 pv d7d5 e2e3 e7e6 c2c4 g8f6 g1f3 StockfishParser.js:10:12
Stockfish says: info depth 3 seldepth 3 multipv 1 score cp -59 nodes 156 nps 78000 tbhits 0 time 2 pv g8f6 e2e3 e7e6 StockfishParser.js:10:12
Stockfish says: info depth 3 seldepth 3 multipv 2 score cp -59 nodes 156 nps 78000 tbhits 0 time 2 pv d7d5 e2e3 e7e6 StockfishParser.js:10:12
Stockfish says: info depth 4 seldepth 4 multipv 1 score cp -59 nodes 236 nps 118000 tbhits 0 time 2 pv g8f6 e2e3 e7e6 g1f3 StockfishParser.js:10:12
Stockfish says: info depth 4 seldepth 4 multipv 2 score cp -59 nodes 236 nps 118000 tbhits 0 time 2 pv d7d5 e2e3 e7e6 c2c4 g8f6 StockfishParser.js:10:12
Stockfish says: info depth 5 seldepth 5 multipv 1 score cp -59 nodes 357 nps 59500 tbhits 0 time 6 pv g8f6 e2e3 e7e6 g1f3 d7d5 StockfishParser.js:10:12
Stockfish says: info depth 5 seldepth 5 multipv 2 score cp -59 nodes 357 nps 59500 tbhits 0 time 6 pv d7d5 e2e3 e7e6 c2c4 g8f6 StockfishParser.js:10:12
Stockfish says: info depth 6 seldepth 6 multipv 1 score cp -59 nodes 548 nps 49818 tbhits 0 time 11 pv g8f6 e2e3 e7e6 g1f3 d7d5 c2c4 StockfishParser.js:10:12
Stockfish says: info depth 6 seldepth 6 multipv 2 score cp -59 nodes 548 nps 49818 tbhits 0 time 11 pv d7d5 e2e3 e7e6 c2c4 g8f6 g1f3 StockfishParser.js:10:12
Stockfish says: info depth 7 seldepth 7 multipv 1 score cp -59 nodes 826 nps 51625 tbhits 0 time 16 pv g8f6 e2e3 e7e6 g1f3 d7d5 c2c4 c7c5 StockfishParser.js:10:12
Stockfish says: info depth 7 seldepth 7 multipv 2 score cp -59 nodes 826 nps 51625 tbhits 0 time 16 pv d7d5 e2e3 e7e6 c2c4 g8f6 g1f3 c7c5 StockfishParser.js:10:12
Stockfish says: info depth 8 seldepth 8 multipv 1 score cp -59 nodes 1181 nps 56238 tbhits 0 time 21 pv g8f6 e2e3 e7e6 g1f3 d7d5 c2c4 c7c5 b1c3 StockfishParser.js:10:12
Stockfish says: info depth 8 seldepth 8 multipv 2 score cp -59 nodes 1181 nps 56238 tbhits 0 time 21 pv d7d5 e2e3 e7e6 c2c4 g8f6 g1f3 c7c5 b1c3 StockfishParser.js:10:12
Stockfish says: info depth 9 seldepth 9 multipv 1 score cp -59 nodes 1704 nps 65538 tbhits 0 time 26 pv g8f6 e2e3 e7e6 g1f3 d7d5 c2c4 c7c5 b1c3 b8c6 StockfishParser.js:10:12
Stockfish says: info depth 9 seldepth 9 multipv 2 score cp -59 nodes 1704 nps 65538 tbhits 0 time 26 pv d7d5 e2e3 e7e6 c2c4 g8f6 g1f3 c7c5 b1c3 b8c6 StockfishParser.js:10:12
Stockfish says: info depth 10 seldepth 10 multipv 1 score cp -59 nodes 3047 nps 89617 tbhits 0 time 34 pv g8f6 e2e3 e7e6 g1f3 d7d5 c2c4 c7c5 b1c3 b8c6 c4d5 StockfishParser.js:10:12
Stockfish says: info depth 10 seldepth 10 multipv 2 score cp -62 nodes 3047 nps 89617 tbhits 0 time 34 pv d7d5 e2e3 e7e6 c2c4 g8f6 g1f3 c7c5 b1c3 b8d7 c4d5 e6d5 StockfishParser.js:10:12
Stockfish says: info depth 11 seldepth 11 multipv 1 score cp -59 nodes 4447 nps 108463 tbhits 0 time 41 pv g8f6 e2e3 e7e6 g1f3 d7d5 c2c4 c7c5 b1c3 b8c6 c4d5 f6d5 StockfishParser.js:10:12
Stockfish says: info depth 11 seldepth 11 multipv 2 score cp -59 nodes 4447 nps 108463 tbhits 0 time 41 pv d7d5 e2e3 e7e6 c2c4 g8f6 g1f3 c7c5 b1c3 b8c6 c4d5 f6d5 StockfishParser.js:10:12
Stockfish says: info depth 12 seldepth 20 multipv 1 score cp -43 nodes 24933 nps 209521 tbhits 0 time 119 pv d7d5 e2e3 e7e6 c2c4 b8d7 g1f3 b7b6 c4d5 e6d5 f1e2 c8b7 e1g1 c7c5 StockfishParser.js:10:12
Stockfish says: info depth 12 seldepth 15 multipv 2 score cp -51 nodes 24933 nps 209521 tbhits 0 time 119 pv g8f6 e2e3 e7e6 g1f3 d7d5 c2c4 c7c5 b1c3 b8c6 c4d5 f6d5 e3e4 d5c3 b2c3 d8c7 StockfishParser.js:10:12
Stockfish says: info depth 13 seldepth 21 multipv 1 score cp -39 nodes 68517 nps 227631 tbhits 0 time 301 pv d7d5 e2e3 e7e6 g1f3 g8f6 f1e2 f8d6 c2c4 c7c5 e1g1 e8g8 b1c3 b8c6 d4c5 StockfishParser.js:10:12
Stockfish says: info depth 13 seldepth 18 multipv 2 score cp -45 nodes 68517 nps 227631 tbhits 0 time 301 pv g8f6 e2e3 e7e6 g1f3 d7d5 c2c4 c7c5 b1c3 b8c6 f1d3 f8d6 d4c5 d6c5 e1g1 d5c4 d3c4 e8g8 StockfishParser.js:10:12
Stockfish says: info depth 14 seldepth 21 multipv 1 score cp -16 nodes 208642 nps 240648 tbhits 0 time 867 pv g8f6 e2e3 e7e6 g1f3 d7d5 c2c4 c7c5 b1c3 b8c6 c4d5 f6d5 f1b5 c5d4 f3d4 c8d7 e1g1 f8d6 c3d5 e6d5 StockfishParser.js:10:12
Stockfish says: info depth 14 seldepth 20 multipv 2 score cp -25 nodes 208642 nps 240648 tbhits 0 time 867 pv d7d5 e2e3 e7e6 g1f3 g8f6 c2c4 c7c5 b1c3 b8c6 c4d5 e6d5 f1b5 a7a6 b5c6 b7c6 e1g1 c5d4 f3d4 StockfishParser.js:10:12
Stockfish says: bestmove g8f6 ponder e2e3 StockfishParser.js:10:12

Best Move:  g8f6 StockfishParser.js:86:12

Score after d2d4: -16

```

Through all depths it favors Black. How can that be? I use the stockfish.js version from Lichess.

**UPDATE:** @ferdy points out, that the score is flopped if black is evaluated. And it makes a bit more sense. But still I find the results strange.

1. When evaluating white, it was 100+ for the first few depths and ended at 59 at depth 15. But for black it was below 100 right from the start and ended at a very low 16cp for depth 14.
2. It gets even weird if I start evaluatong the d2d4 position right away without evaluating the start position beforehand to make sure that caching isn't the reason (I still would wonder about the result even taking caching into account).

```
08:06:10.239 Tell Stockfish: uci stockfishIntegration.js:27:10
08:06:10.731 Stockfish says: Stockfish 2018-07-25 64 POPCNT Multi-Variant by D. Dugovic, F. Fichter et al. StockfishParser.js:11:12
08:06:10.796 Stockfish says: id name Stockfish 2018-07-25 64 POPCNT Multi-Variant StockfishParser.js:11:12
08:06:10.796 Stockfish says: id author D. Dugovic, F. Fichter et al. StockfishParser.js:11:12
08:06:10.797 Stockfish says: StockfishParser.js:11:12
08:06:10.797 Stockfish says: option name Debug Log File type string default StockfishParser.js:11:12
08:06:10.797 Stockfish says: option name Contempt type spin default 21 min -100 max 100 StockfishParser.js:11:12
08:06:10.797 Stockfish says: option name Analysis Contempt type combo default Both var Both var Off var White var Black StockfishParser.js:11:12
08:06:10.797 Stockfish says: option name Threads type spin default 1 min 1 max 1 StockfishParser.js:11:12
08:06:10.797 Stockfish says: option name Hash type spin default 16 min 16 max 16 StockfishParser.js:11:12
08:06:10.797 Stockfish says: option name Clear Hash type button StockfishParser.js:11:12
08:06:10.797 Stockfish says: option name Ponder type check default false StockfishParser.js:11:12
08:06:10.797 Stockfish says: option name MultiPV type spin default 1 min 1 max 500 StockfishParser.js:11:12
08:06:10.797 Stockfish says: option name Skill Level type spin default 20 min 0 max 20 StockfishParser.js:11:12
08:06:10.797 Stockfish says: option name Move Overhead type spin default 30 min 0 max 5000 StockfishParser.js:11:12
08:06:10.797 Stockfish says: option name Minimum Thinking Time type spin default 20 min 0 max 5000 StockfishParser.js:11:12
08:06:10.797 Stockfish says: option name Slow Mover type spin default 84 min 10 max 1000 StockfishParser.js:11:12
08:06:10.797 Stockfish says: option name nodestime type spin default 0 min 0 max 10000 StockfishParser.js:11:12
08:06:10.797 Stockfish says: option name UCI_Chess960 type check default false StockfishParser.js:11:12
08:06:10.797 Stockfish says: option name UCI_Variant type combo default chess var chess var giveaway var atomic var crazyhouse var horde var kingofthehill var racingkings var 3check StockfishParser.js:11:12
08:06:10.797 Stockfish says: option name UCI_AnalyseMode type check default false StockfishParser.js:11:12
08:06:10.797 Stockfish says: uciok StockfishParser.js:11:12

08:06:10.241 Tell Stockfish: setoption name MultiPV value 1 stockfishIntegration.js:27:10
08:06:10.241 Tell Stockfish: position fen rnbqkbnr/pppppppp/8/8/3P4/8/PPP1PPPP/RNBQKBNR b KQkq d3 0 1 stockfishIntegration.js:27:10
08:06:10.241 Tell Stockfish: go depth 14 stockfishIntegration.js:27:10
08:06:10.798 Stockfish says: info depth 1 seldepth 1 multipv 1 score cp 12 nodes 20 nps 10000 tbhits 0 time 2 pv d7d5 StockfishParser.js:11:12
08:06:10.798 Stockfish says: info depth 2 seldepth 2 multipv 1 score cp 21 nodes 47 nps 23500 tbhits 0 time 2 pv d7d5 a2a3 StockfishParser.js:11:12
08:06:10.799 Stockfish says: info depth 3 seldepth 3 multipv 1 score cp 12 nodes 152 nps 50666 tbhits 0 time 3 pv e7e6 e2e3 d7d5 StockfishParser.js:11:12
08:06:10.800 Stockfish says: info depth 4 seldepth 4 multipv 1 score cp 1 nodes 330 nps 82500 tbhits 0 time 4 pv e7e6 e2e3 d7d5 c2c3 StockfishParser.js:11:12
08:06:10.806 Stockfish says: info depth 5 seldepth 5 multipv 1 score cp -25 nodes 831 nps 75545 tbhits 0 time 11 pv e7e6 e2e3 d7d5 c2c3 d8d7 StockfishParser.js:11:12
08:06:10.816 Stockfish says: info depth 6 seldepth 7 multipv 1 score cp -7 nodes 1951 nps 97550 tbhits 0 time 20 pv d7d5 e2e3 c8f5 h2h3 e7e6 c1d2 StockfishParser.js:11:12
08:06:10.825 Stockfish says: info depth 7 seldepth 7 multipv 1 score cp 12 nodes 3184 nps 109793 tbhits 0 time 29 pv d7d5 e2e3 c8f5 b1d2 e7e6 c2c4 b8d7 c4d5 StockfishParser.js:11:12
08:06:10.845 Stockfish says: info depth 8 seldepth 8 multipv 1 score cp -10 nodes 7190 nps 146734 tbhits 0 time 49 pv d7d5 e2e3 c8f5 c2c4 e7e6 c4c5 c7c6 b1d2 StockfishParser.js:11:12
08:06:10.898 Stockfish says: info depth 9 seldepth 11 multipv 1 score cp -12 nodes 19495 nps 191127 tbhits 0 time 102 pv d7d5 c2c4 e7e6 e2e3 c7c5 b1c3 c5d4 e3d4 b8c6 StockfishParser.js:11:12
08:06:11.013 Stockfish says: info depth 10 seldepth 14 multipv 1 score cp -17 nodes 46297 nps 213350 tbhits 0 time 217 pv d7d5 c2c4 e7e6 e2e3 c7c5 d4c5 f8c5 c4d5 d8d5 f1b5 b8c6 d1d5 e6d5 StockfishParser.js:11:12
08:06:11.273 Stockfish says: info depth 11 seldepth 17 multipv 1 score cp 6 nodes 108856 nps 227732 tbhits 0 time 478 pv d7d5 c2c4 g8f6 b1c3 c7c6 e2e3 e7e6 c1d2 b8d7 g1f3 f6e4 c3e4 d5e4 StockfishParser.js:11:12
08:06:11.630 Stockfish says: info depth 12 seldepth 16 multipv 1 score cp -3 nodes 191087 nps 229121 tbhits 0 time 834 pv g8f6 b1c3 d7d5 c1f4 a7a6 g1f3 e7e6 e2e3 f8b4 f1e2 b4c3 b2c3 e8g8 StockfishParser.js:11:12
08:06:12.235 Stockfish says: info depth 13 seldepth 18 multipv 1 score cp -17 nodes 323218 nps 224456 hashfull 130 tbhits 0 time 1440 pv g8f6 b1c3 d7d5 c1f4 a7a6 e2e3 e7e6 f1d3 c7c5 g1f3 b8c6 e1g1 h7h6 d4c5 f8c5 a2a3 StockfishParser.js:11:12
08:06:12.831 Stockfish says: info depth 14 seldepth 21 multipv 1 score cp -9 nodes 453263 nps 222733 hashfull 194 tbhits 0 time 2035 pv g8f6 e2e3 e7e6 g1f3 f8e7 f1d3 c7c5 c1d2 d7d5 d4c5 e8g8 e1g1 b8c6 d2c3 StockfishParser.js:11:12
08:06:12.839 Stockfish says: bestmove g8f6 ponder e2e3

```

Now he reaches only 9 centipawns advantage for white, and the evaluation at various depth is all over the place

**Update 2:** Depth 25, not any better:

```
08:16:53.386 Stockfish says: Stockfish 2018-07-25 64 POPCNT Multi-Variant by D. Dugovic, F. Fichter et al. StockfishParser.js:11:12
08:16:53.441 Stockfish says: id name Stockfish 2018-07-25 64 POPCNT Multi-Variant StockfishParser.js:11:12
08:16:53.442 Stockfish says: id author D. Dugovic, F. Fichter et al. StockfishParser.js:11:12
08:16:53.442 Stockfish says: StockfishParser.js:11:12
08:16:53.442 Stockfish says: option name Debug Log File type string default StockfishParser.js:11:12
08:16:53.442 Stockfish says: option name Contempt type spin default 21 min -100 max 100 StockfishParser.js:11:12
08:16:53.442 Stockfish says: option name Analysis Contempt type combo default Both var Both var Off var White var Black StockfishParser.js:11:12
08:16:53.442 Stockfish says: option name Threads type spin default 1 min 1 max 1 StockfishParser.js:11:12
08:16:53.442 Stockfish says: option name Hash type spin default 16 min 16 max 16 StockfishParser.js:11:12
08:16:53.442 Stockfish says: option name Clear Hash type button StockfishParser.js:11:12
08:16:53.442 Stockfish says: option name Ponder type check default false StockfishParser.js:11:12
08:16:53.442 Stockfish says: option name MultiPV type spin default 1 min 1 max 500 StockfishParser.js:11:12
08:16:53.442 Stockfish says: option name Skill Level type spin default 20 min 0 max 20 StockfishParser.js:11:12
08:16:53.442 Stockfish says: option name Move Overhead type spin default 30 min 0 max 5000 StockfishParser.js:11:12
08:16:53.442 Stockfish says: option name Minimum Thinking Time type spin default 20 min 0 max 5000 StockfishParser.js:11:12
08:16:53.442 Stockfish says: option name Slow Mover type spin default 84 min 10 max 1000 StockfishParser.js:11:12
08:16:53.442 Stockfish says: option name nodestime type spin default 0 min 0 max 10000 StockfishParser.js:11:12
08:16:53.442 Stockfish says: option name UCI_Chess960 type check default false StockfishParser.js:11:12
08:16:53.442 Stockfish says: option name UCI_Variant type combo default chess var chess var giveaway var atomic var crazyhouse var horde var kingofthehill var racingkings var 3check StockfishParser.js:11:12
08:16:53.442 Stockfish says: option name UCI_AnalyseMode type check default false StockfishParser.js:11:12
08:16:53.442 Stockfish says: uciok StockfishParser.js:11:12
08:16:53.443 Stockfish says: info depth 1 seldepth 1 multipv 1 score cp 12 nodes 20 nps 20000 tbhits 0 time 1 pv d7d5 StockfishParser.js:11:12
08:16:53.443 Stockfish says: info depth 2 seldepth 2 multipv 1 score cp 21 nodes 47 nps 23500 tbhits 0 time 2 pv d7d5 a2a3 StockfishParser.js:11:12
08:16:53.444 Stockfish says: info depth 3 seldepth 3 multipv 1 score cp 12 nodes 152 nps 76000 tbhits 0 time 2 pv e7e6 e2e3 d7d5 StockfishParser.js:11:12
08:16:53.445 Stockfish says: info depth 4 seldepth 4 multipv 1 score cp 1 nodes 330 nps 110000 tbhits 0 time 3 pv e7e6 e2e3 d7d5 c2c3 StockfishParser.js:11:12
08:16:53.451 Stockfish says: info depth 5 seldepth 5 multipv 1 score cp -25 nodes 831 nps 92333 tbhits 0 time 9 pv e7e6 e2e3 d7d5 c2c3 d8d7 StockfishParser.js:11:12
08:16:53.460 Stockfish says: info depth 6 seldepth 7 multipv 1 score cp -7 nodes 1951 nps 108388 tbhits 0 time 18 pv d7d5 e2e3 c8f5 h2h3 e7e6 c1d2 StockfishParser.js:11:12
08:16:53.469 Stockfish says: info depth 7 seldepth 7 multipv 1 score cp 12 nodes 3184 nps 113714 tbhits 0 time 28 pv d7d5 e2e3 c8f5 b1d2 e7e6 c2c4 b8d7 c4d5 StockfishParser.js:11:12
08:16:53.489 Stockfish says: info depth 8 seldepth 8 multipv 1 score cp -10 nodes 7190 nps 152978 tbhits 0 time 47 pv d7d5 e2e3 c8f5 c2c4 e7e6 c4c5 c7c6 b1d2 StockfishParser.js:11:12
08:16:53.543 Stockfish says: info depth 9 seldepth 11 multipv 1 score cp -12 nodes 19495 nps 193019 tbhits 0 time 101 pv d7d5 c2c4 e7e6 e2e3 c7c5 b1c3 c5d4 e3d4 b8c6 StockfishParser.js:11:12
08:16:53.659 Stockfish says: info depth 10 seldepth 14 multipv 1 score cp -17 nodes 46297 nps 212371 tbhits 0 time 218 pv d7d5 c2c4 e7e6 e2e3 c7c5 d4c5 f8c5 c4d5 d8d5 f1b5 b8c6 d1d5 e6d5 StockfishParser.js:11:12
08:16:53.922 Stockfish says: info depth 11 seldepth 17 multipv 1 score cp 6 nodes 108856 nps 226783 tbhits 0 time 480 pv d7d5 c2c4 g8f6 b1c3 c7c6 e2e3 e7e6 c1d2 b8d7 g1f3 f6e4 c3e4 d5e4 StockfishParser.js:11:12
08:16:54.281 Stockfish says: info depth 12 seldepth 16 multipv 1 score cp -3 nodes 191087 nps 227755 tbhits 0 time 839 pv g8f6 b1c3 d7d5 c1f4 a7a6 g1f3 e7e6 e2e3 f8b4 f1e2 b4c3 b2c3 e8g8 StockfishParser.js:11:12
08:16:54.880 Stockfish says: info depth 13 seldepth 18 multipv 1 score cp -17 nodes 323218 nps 224612 hashfull 130 tbhits 0 time 1439 pv g8f6 b1c3 d7d5 c1f4 a7a6 e2e3 e7e6 f1d3 c7c5 g1f3 b8c6 e1g1 h7h6 d4c5 f8c5 a2a3 StockfishParser.js:11:12
08:16:55.460 Stockfish says: info depth 14 seldepth 21 multipv 1 score cp -9 nodes 453263 nps 224610 hashfull 194 tbhits 0 time 2018 pv g8f6 e2e3 e7e6 g1f3 f8e7 f1d3 c7c5 c1d2 d7d5 d4c5 e8g8 e1g1 b8c6 d2c3 StockfishParser.js:11:12
08:16:56.157 Stockfish says: info depth 15 seldepth 19 multipv 1 score cp -4 nodes 615064 nps 226459 hashfull 269 tbhits 0 time 2716 pv d7d5 c2c4 e7e6 g1f3 c7c5 e2e3 f8e7 d4c5 e7c5 c1d2 b8c6 c4d5 e6d5 b1c3 g8f6 StockfishParser.js:11:12
08:16:56.585 Stockfish says: info depth 16 seldepth 20 multipv 1 score cp -12 upperbound nodes 713047 nps 226796 hashfull 311 tbhits 0 time 3144 pv d7d5 c2c4 StockfishParser.js:11:12
08:16:57.134 Stockfish says: info depth 16 seldepth 20 multipv 1 score cp -4 lowerbound nodes 834941 nps 226087 hashfull 362 tbhits 0 time 3693 pv d7d5 StockfishParser.js:11:12
08:16:57.281 Stockfish says: info depth 16 seldepth 20 multipv 1 score cp -7 nodes 868397 nps 226203 hashfull 372 tbhits 0 time 3839 pv d7d5 c2c4 e7e6 g1f3 g8f6 b1c3 f8b4 c1d2 e8g8 e2e3 c7c6 h2h3 b8d7 c4d5 e6d5 f1e2 StockfishParser.js:11:12
08:16:58.247 Stockfish says: info depth 17 seldepth 20 multipv 1 score cp -14 upperbound nodes 1082271 nps 225285 hashfull 454 tbhits 0 time 4804 pv d7d5 c2c4 StockfishParser.js:11:12
08:16:59.252 Stockfish says: info depth 17 seldepth 24 multipv 1 score cp -22 upperbound nodes 1300745 nps 223841 hashfull 532 tbhits 0 time 5811 pv d7d5 c2c4 StockfishParser.js:11:12
08:16:59.901 Stockfish says: info depth 17 seldepth 26 multipv 1 score cp -14 lowerbound nodes 1441970 nps 223249 hashfull 583 tbhits 0 time 6459 pv d7d5 StockfishParser.js:11:12
08:17:00.320 Stockfish says: info depth 17 seldepth 26 multipv 1 score cp -14 nodes 1540149 nps 223923 hashfull 615 tbhits 0 time 6878 pv d7d5 c2c4 e7e6 g1f3 g8f6 b1c3 f8b4 c1d2 e8g8 e2e3 c7c5 a2a3 b4c3 d2c3 c5d4 e3d4 d8c7 StockfishParser.js:11:12
08:17:01.146 Stockfish says: info depth 18 seldepth 23 multipv 1 score cp -6 lowerbound nodes 1723744 nps 223775 hashfull 674 tbhits 0 time 7703 pv d7d5 StockfishParser.js:11:12
08:17:02.764 Stockfish says: info depth 18 seldepth 27 multipv 1 score cp -21 upperbound nodes 2087673 nps 223951 hashfull 765 tbhits 0 time 9322 pv d7d5 c2c4 StockfishParser.js:11:12
08:17:03.843 Stockfish says: info depth 18 seldepth 32 multipv 1 score cp -10 lowerbound nodes 2322356 nps 223260 hashfull 816 tbhits 0 time 10402 pv d7d5 StockfishParser.js:11:12
08:17:04.197 Stockfish says: info depth 18 seldepth 32 multipv 1 score cp -18 nodes 2400901 nps 223215 hashfull 831 tbhits 0 time 10756 pv d7d5 c2c4 e7e6 g1f3 g8f6 b1c3 f8b4 e2e3 e8g8 c1d2 b7b6 c4d5 b4c3 d2c3 d8d5 f1d3 b8d7 e1g1 c8b7 a1b1 StockfishParser.js:11:12
08:17:05.861 Stockfish says: info depth 19 seldepth 24 multipv 1 score cp -12 nodes 2761268 nps 222342 hashfull 881 tbhits 0 time 12419 pv d7d5 c2c4 e7e6 g1f3 g8f6 b1c3 f8b4 c1d2 e8g8 e2e3 b7b6 a2a3 b4c3 d2c3 c8b7 f1d3 f6e4 e1g1 d5c4 d3c4 b8d7 c4d3 e4c3 b2c3 c7c5 StockfishParser.js:11:12
08:17:09.494 Stockfish says: info depth 20 seldepth 32 multipv 1 score cp -16 nodes 3534849 nps 220212 hashfull 954 tbhits 0 time 16052 pv d7d5 c2c4 e7e6 g1f3 g8f6 b1c3 f8b4 c1d2 e8g8 e2e3 b7b6 f1e2 d5c4 e1g1 c8b7 f3e5 b8d7 e5c4 b4c3 d2c3 f6e4 e2d3 e4c3 StockfishParser.js:11:12
08:17:11.770 Stockfish says: info depth 21 seldepth 27 multipv 1 score cp -8 lowerbound nodes 4030454 nps 219906 hashfull 972 tbhits 0 time 18328 pv d7d5 StockfishParser.js:11:12
08:17:13.641 Stockfish says: info depth 21 seldepth 27 multipv 1 score cp -15 nodes 4428020 nps 219219 hashfull 978 tbhits 0 time 20199 pv d7d5 c2c4 e7e6 g1f3 g8f6 b1c3 f8b4 e2e3 e8g8 f1d3 c7c5 e1g1 b8c6 a2a3 b4c3 b2c3 b7b6 f3e5 c6e5 d4e5 f6e4 c4d5 e6d5 StockfishParser.js:11:12
08:17:16.329 Stockfish says: info depth 22 seldepth 26 multipv 1 score cp -7 lowerbound nodes 5002505 nps 218574 hashfull 988 tbhits 0 time 22887 pv d7d5 StockfishParser.js:11:12
08:17:21.069 Stockfish says: info depth 22 seldepth 28 multipv 1 score cp 0 lowerbound nodes 5972553 nps 216185 hashfull 998 tbhits 0 time 27627 pv d7d5 StockfishParser.js:11:12
08:17:27.891 Stockfish says: info depth 22 seldepth 30 multipv 1 score cp -10 nodes 7411843 nps 215147 hashfull 999 tbhits 0 time 34450 pv d7d5 c2c4 e7e6 g1f3 g8f6 b1c3 f8b4 e2e3 e8g8 c1d2 b7b6 c4d5 b4c3 d2c3 d8d5 f1d3 b8d7 e1g1 c8b7 b2b3 c7c5 d3c4 d5c6 d4c5 d7c5 StockfishParser.js:11:12
08:17:35.212 Stockfish says: info depth 23 seldepth 33 multipv 1 score cp -2 lowerbound nodes 8950454 nps 214279 hashfull 999 tbhits 0 time 41770 pv d7d5 StockfishParser.js:11:12
08:17:38.858 Stockfish says: info depth 23 seldepth 33 multipv 1 score cp -7 nodes 9735420 nps 214361 hashfull 999 tbhits 0 time 45416 pv d7d5 c2c4 e7e6 g1f3 g8f6 b1c3 f8b4 e2e3 e8g8 c1d2 b7b6 c4d5 e6d5 f1d3 b8d7 e1g1 c8b7 a1c1 c7c5 d1c2 b4c3 d2c3 f6e4 d4c5 d7c5 f1d1 StockfishParser.js:11:12
08:17:52.724 Stockfish says: info depth 24 seldepth 30 multipv 1 score cp -7 nodes 12599788 nps 212536 hashfull 999 tbhits 0 time 59283 pv d7d5 c2c4 e7e6 g1f3 g8f6 b1c3 f8b4 e2e3 e8g8 c1d2 b7b6 c4d5 e6d5 f1d3 b8d7 e1g1 c8b7 a1c1 c7c5 a2a3 b4a5 d1c2 a5c3 d2c3 f6e4 d4c5 b6c5 StockfishParser.js:11:12
08:18:08.498 Stockfish says: info depth 25 seldepth 31 multipv 1 score cp -7 nodes 15886035 nps 211652 hashfull 999 tbhits 0 time 75057 pv d7d5 c2c4 e7e6 g1f3 g8f6 b1c3 f8b4 e2e3 e8g8 c1d2 b7b6 f1e2 d5c4 e2c4 c8b7 e1g1 b4d6 f1e1 c7c5 d4c5 d6c5 a1c1 f6e4 c3e4 b7e4 StockfishParser.js:11:12
08:18:08.507 Stockfish says: bestmove d7d5 ponder c2c4

```

# Answer
> 6 votes
Stockfish is an engine that follows the UCI protocol. In this protocol, the score shown is from the side point of view (SPOV) and not white point of view (WPOV).

When you push d2d4, the side to move is now black. With negative score that means black is at a disadvantage meaning white is still ahead.

### SPOV (Side Point Of View)

* Positive score favors the side to move
* Negative score favors the side not to move.

---
Tags: engines, stockfish, uci, fen
---


# Question
Title: How to access high level tournament game data
I am currently in need of data from high level tournaments for a project and the data needs to include information like each individual move, the engine evaluation after each move, and the time remaining after each move. (https://web.chessdigits.com/data) See this link for an example. Would anyone know how I could access data like this outside of paying for Chessbase? And if so how to extract it into a CSV file ready for analysis in R, Stata etc.

# Answer
> 4 votes
You can use Lichess api for this. Lichess provides broadcasts of high level tournaments with both clock times and evals. You can get list of such events with going to https://lichess.org/api/broadcast endpoint. Going to it with your browser will start downloading `broadcast` file.

Example file:

```
{"tour":{"id":"ycy5D2r8","name":"Tata Steel Masters 2024",
"slug":"tata-steel-masters-2024","description":"January 13th - 28th
...

```

Note the **id** of the event you want games for. In this case (Tata Steel Masters 2024) the event id is **ycy5D2r8**.

With you browser go to https://lichess.org/api/broadcast/ycy5D2r8.pgn (replace **ycy5D2r8** with id of whichever tournament you want). Download of pgn file with all games from this tournament will start.

Example game:

```
[Event "Tata Steel Masters 2024"]
[Site "Wijk aan Zee, Netherlands"]
[Date "2024.01.13"]
[Round "1.1"]
[White "Donchenko, Alexander"]
[Black "Wei, Yi"]
[Result "0-1"]
[WhiteElo "2643"]
[WhiteTitle "GM"]
[WhiteFideId "24603295"]
[BlackElo "2740"]
[BlackTitle "GM"]
[BlackFideId "8603405"]
[UTCDate "2024.01.13"]
[UTCTime "13:28:16"]
[Variant "Standard"]
[ECO "E60"]
[Opening "King's Indian Defense: Normal Variation, King's Knight Variation"]
[Annotator "https://lichess.org/@/AAArmstark"]

1. d4 { [%eval 0.13] [%clk 1:40:56] } 1... Nf6 { [%eval 0.16] [%clk 1:40:50] } 2. c4 { [%eval 0.16] [%clk 1:41:11] } 2... g6 { [%eval 0.28] [%clk 1:41:08] } 3. Nf3 { [%eval 0.3] [%clk 1:41:06] } 3... Bg7 { [%eval 0.13] [%clk 1:41:23] } 4. e3 { [%eval 0.22] [%clk 1:41:10] } 4... O-O { [%eval 0.0] [%clk 1:41:14] } 5. Be2 { [%eval 0.0] [%clk 1:41:26] } 5... c5 { [%eval 0.31] [%clk 1:40:55] } 6. d5 { [%eval 0.0] [%clk 1:41:31] } 6... e6 { [%eval 0.14] [%clk 1:40:16] } 7. Nc3 { [%eval 0.12] [%clk 1:41:40] } 7... d6 { [%eval 0.14] [%clk 1:40:37] } 8. O-O { [%eval 0.2] [%clk 1:41:08] } 8... exd5 { [%eval 0.19] [%clk 1:40:36] } 9. cxd5 { [%eval 0.18] [%clk 1:41:20] } 9... Bg4 { [%eval 0.15] } 10. Nd2 { [%eval -0.3] [%clk 1:34:42] } 10... Bxe2 { [%eval -0.32] [%clk 1:41:06] } 11. Qxe2 { [%eval -0.37] } 11... Na6 { [%eval -0.17] [%clk 1:41:10] } 12. e4 { [%eval -0.27] [%clk 1:17:33] } 12... Re8 { [%eval -0.33] [%clk 1:40:55] } 13. Nc4 { [%eval -0.23] [%clk 1:05:07] } 13... b5 { [%eval -0.28] } 14. Nxb5 { [%eval -0.43] [%clk 1:04:53] } 14... Nxe4 { [%eval -0.21] } 15. Qf3 { [%eval -0.25] [%clk 0:58:07] } 15... Qd7 { [%eval -0.22] } 16. a4 { [%eval -0.34] } 16... Nb4 { [%eval -0.32] } 17. Bf4 { [%eval -0.32] [%clk 0:48:02] } 17... Nc2 { [%eval -0.41] [%clk 1:16:45] } 18. Rad1 { [%eval -0.31] [%clk 0:46:32] } 18... Nd4 { [%eval -0.38] [%clk 1:15:41] } 19. Rxd4 { [%eval -0.9] [%clk 0:37:00] } 19... cxd4 { [%eval -0.94] [%clk 1:09:14] } 20. Ncxd6 { [%eval -0.9] [%clk 0:36:52] } 20... Nxd6 { [%eval -0.96] [%clk 1:09:33] } 21. Nxd6 { [%eval -0.77] [%clk 0:37:16] } 21... Red8 { [%eval -0.92] [%clk 0:42:40] } 22. b3 { [%eval -0.96] [%clk 0:35:32] } 22... g5 { [%eval -0.87] [%clk 0:36:09] } 23. Bg3 { [%eval -0.82] [%clk 0:35:31] } 23... f5 { [%eval -0.78] [%clk 0:36:24] } 24. Qxf5 { [%eval -0.78] [%clk 0:35:01] } 24... Qxf5 { [%eval -0.89] [%clk 0:36:49] } 25. Nxf5 { [%eval -0.79] [%clk 0:35:25] } 25... Bf6 { [%eval -0.89] [%clk 0:37:11] } 26. Nd6 { [%eval -0.85] [%clk 0:30:55] } 26... h5 { [%eval -0.8] [%clk 0:32:09] } 27. h3 { [%eval -0.78] [%clk 0:28:30] } 27... h4 { [%eval -1.0] [%clk 0:32:29] } 28. Bh2 { [%eval -0.77] [%clk 0:28:54] } 28... Be7 { [%eval -0.65] [%clk 0:32:32] } 29. Nb5 { [%eval -0.87] [%clk 0:24:26] } 29... Bc5 { [%eval -1.22] [%clk 0:25:51] } 30. d6 { [%eval -0.91] [%clk 0:08:22] } 30... Rac8 { [%eval -0.92] [%clk 0:26:07] } 31. Be5 { [%eval -0.87] [%clk 0:07:24] } 31... d3 { [%eval -0.21] [%clk 0:26:14] } 32. Bf6 { [%eval -1.6] [%clk 0:02:54] } 32... Rd7 { [%eval -1.95] [%clk 0:26:35] } 33. Bxg5 { [%eval -1.69] [%clk 0:02:56] } 33... a6 { [%eval -1.4] [%clk 0:13:04] } 34. Nc3 { [%eval -1.65] [%clk 0:03:14] } 34... Bxd6 { [%eval -2.02] [%clk 0:13:15] } 35. Ne4 { [%eval -2.09] [%clk 0:01:41] } 35... Be7 { [%eval -2.03] [%clk 0:13:36] } 36. Rd1 { [%eval -5.21] [%clk 0:00:34] } 36... Bxg5 { [%eval -5.74] [%clk 0:13:53] } 37. Nxg5 { [%eval -5.83] [%clk 0:01:02] } 37... d2 { [%eval -5.5] [%clk 0:14:11] } 38. Kf1 { [%eval -6.22] [%clk 0:00:59] } 38... Re7 { [%eval -6.11] [%clk 0:14:36] } 0-1

```

Eval after move is in **\[%eval\]** comment, while clock time is in **\[%clk\]** comment. To extract this data to desired format you can use python-chess library for Python (I am sure something similiar also exists for R). Just walk through mainline moves, extracting comments on each step.

---
Tags: engines, software, programming, statistics, database
---


title: Check for checkmate

text:
# Question
Title: Check for checkmate
So I am implementing an intelligent chess agent but I can't get the checkmate working.

I was wondering if there is a program that takes the chessboard notation and returns a result of yes or no to whether it is a checkmate or not.

# Answer
> 9 votes
I imagine any chess engine must have such function. Find an open source one in your programming language of choice and draw inspiration from there.

I often use the python-chess package for simple chess programming and data mining tasks, as it offers a good API with many useful functions (available here: https://pypi.python.org/pypi/python-chess). For your purposes, it has a function:

> is\_checkmate() Checks if the current position is a checkmate.

The package is open source, so you can see its code, too.

You could also try implementing the function yourself! Stockfish, for example, has a simple, efficient implementation - it produces a list of legal moves, and if the list is empty and the king is in check, then it clearly is a checkmate. See the code: https://github.com/mcostalba/Stockfish/blob/master/src/search.cpp

# Answer
> 2 votes
It's actually quite easy to check for a checkmate:

* Can I move out of mate?
* Can I block mate?
* Can I take the attacker?

The king only has 8 spots to move. You should already have a list of squares under attack from enemy pieces, just check if that square is in that list.

You should have a list of squares that are movable. Check if one of those blocks every attacker.

You can easily tell who is attacking the king by checking each enemy piece's attacked squares for the king's square. If there's only one attacker, and that piece's squares is in one of your piece's attacked squares, you're all set.

# Answer
> 2 votes
What I did in my program was to only look for checkmates if the king was in check. I only generate pseudo-legal moves in my move generation function so I simply play out all the moves generated and check if the king still is in check. If this is the case I undo that move and delete it from my list of moves. This is repeated until I find a legal move or the list is exhausted. When the list is exhausted I know it must be checkmate.

# Answer
> 1 votes
Most engines will read a pgn. To find if it is checkmate you have to play through the game. From your comments I think you want the program to do that automatically. None of the engines that I have looked at have this capability.

My first suggestion is to rewrite your code to remove your bug(s).

The other is to search for the pgn for (#)the mate symbol.

https://www.cs.kent.ac.uk/people/staff/djb/pgn-extract/help.html pgn extract claims to have a match criteria for checkmate and stalemate and many others.

# Answer
> 1 votes
From Chess Programming Wiki, this article (https://www.chessprogramming.org/Checkmate) explains some rules that you can use to implement checkmate detection.

1) double check - only the king can move on this situation. So, if the king has no valid moves, you have a checkmate.

2) single check - in this situation, the king may move out of check position, or if the attacker piece is a knight or a pawn, you should detect if they may be captured. For the attacking from queen, rook and bishop, they could be captured or some opposite piece should be placed between the attacked king and the attacker.

-

To start the above, you may create a function that lists the pieces that are attacking the king. If the list is empty, no check. If the list has a single pice, a single check. And, finnaly, if the list has two pieces, you have a double check.

# Answer
> 1 votes
If you are implementing either min-max search or alpha–beta search for a chess engine, one very simple (but rather inefficient) way of checking for checkmate is to consider the king a normal but very valuable piece, search two plys ahead from the current position and see whether the opponent can capture your king (which they will if they can if the king is valuable enough). If they can capture the king, the current position is a terminal position (the game is over).

Besides, if you in the current position switch the active color to your opponent’s color and search one ply ahead and the opponent can capture your king, you are in check in the current position.

If you are not in check and the position is terminal (because of a king capture in two plys), the position is a stalemate. If you are in check and the position is terminal, the position is a checkmate.

When doing these one and two ply searches, you need to ignore the threefold and fivefold repetition rules, as well as the fifty-move and seventyfive-move rules.

---
Tags: checkmate, programming
---


# Question
Title: At what age did Szymon Winawer learn chess?
Szymon Winaver was one of the best players in the late 19th century and is today remembered by Winaver variation of the French defence. It is well known that he first participated in international tournament in Paris 1867, when he was already 29 years old. At this point he was already very strong player, tying with Wilhelm Steinitz for the second place.

My question is, when did he learn to play chess, at what age?

# Answer
According to the book *The Wizard of Warsaw: A Chess Biography of Szymon Winawer*, he learned chess around age 20. based on an article by Lipski in *Sport*

> Winawar started playing chess at the age of around twenty, but his immense natural talent helped him achieve great progress in a small amount of time and successfully challenge the strongest Warsaw chess players.

Additional commentary from the book:

> The Warsaw chess life mostly existed in coffee houses... Only adults were allowed into coffee houses.
> 5 votes

---
Tags: history, famous-players
---


title: What, exactly, is "development"?

text:
# Question
Title: What, exactly, is "development"?
I am an intermediate player (around 1400 on chess dot com); I've been playing, off and on, a long time. I thought I knew what "development" meant: Getting your pieces (esp. minor pieces) off the back rank and onto good squares; getting castled; getting rooks to open files (if there are any). But especially the first. Get those knights and bishops to good squares!

But in several YouTubes by GMs and IMs (Naroditsky and others) they will look at a position where each side has the same number of minor pieces onto what look like reasonable squares and then say "Black is way behind in development, so White wants to open the center" (or whatever).

So, what exactly is "development"?

# Answer
Not all pieces that moved out of back rank are developed - for example in IQP positions a common mistake by begineers is playing **Bd2**, thinking that they developed their bishop (they didn't, bishop was working just as good on *c1*, so they wasted a tempo).

Alternatively something in position changed, so now one side's piece layout makes much less sense - for example in Sicilian Scheveningen common idea is to play **Bd7-Nxd4-Bc6**. If white moves his knight away from *d4*, thus preventing **Nxd4**, bishop on *d7* isn't doing anything - it is practically undeveloped, and needs to be redeployed soon. Or maybe center got closed and suddenly one side's pieces are on "wrong" side of the board, while the advantaged side is ready to attack.

Or maybe the pieces are just too exposed. For example in Classical sicilian line **1. e4 c5 2. Nf3 d6 3. d4 cxd4 4. Nxd4 Nf6 5. Nc3 Nc6 6. Be3?** bishop on e3 is too exposed, black can take advantage of this with **Ng4**. At first glance white has a small advantage in development (3 pieces out vs 2), however after next few moves he will either have to sacrifice a pawn for dubious compensation or waste few tempi with the bishop, giving black lead in development.

Development is not just a question of how the squares on which pieces are look - you also have to consider, if they are doing anything and if they are established securely. This of course strongly depends on particular position, so please add some examples to your question if you have them.
> 4 votes

# Answer
Development in the most conventional sense would simply mean moving a piece (often a knight or bishop) from the back rank. In general, this tends to increase the mobility of the piece but also can have other beneficial side effects such as enabling castling and/or connecting rooks. In many cases of "opening the center" the question who can castle first is of paramount importance, so these side effects of development can be as significant as the improvement of the developed piece.

Chess practice is rife with examples of this principle (particularly in the games of 19th century masters, who specialized more in "open" games where this matters more):

```
[Event "Rook Odds game"]
[Site "New Orleans, LA USA"]
[Date "1849.??.??"]
[EventDate "?"]
[Round "?"]
[Result "1-0"]
[White "Paul Morphy"]
[Black "Charles Le Carpentier"]
[ECO "000"]
[WhiteElo "?"]
[BlackElo "?"]
[PlyCount "25"]
[SetUp "1"]
[FEN "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/1NBQKBNR w Kkq - 0 1"]

1.e4 e5 2.Nf3 Nc6 3.d4 exd4 4.Bc4 Bb4+ 5.c3 dxc3 6.O-O cxb2
7.Bxb2 Bf8 8.e5 d6 9.Re1 dxe5 10.Nxe5 Qxd1 11.Bxf7+ Ke7
12.Ng6+ Kxf7 13.Nxh8# 1-0

```

Here is an example of development mattering even in modern chess praxis with its increased emphasis on closed and "semi-open" positions:

```
[Event "Hoogovens"]
[Site "Wijk aan Zee NED"]
[Date "1974.01.31"]
[EventDate "1974.01.15"]
[Round "14"]
[Result "1-0"]
[White "Walter Shawn Browne"]
[Black "Miguel A Quinteros"]
[ECO "B52"]
[WhiteElo "?"]
[BlackElo "?"]
[PlyCount "35"]
[FEN ""]

1.e4 c5 2.Nf3 d6 3.Bb5+ Bd7 4.Bxd7+ Qxd7 5.c4 Qg4 6.O-O Qxe4
7.d4 cxd4 8.Re1 Qc6 9.Nxd4 Qxc4 10.Na3 Qc8 11.Bf4 Qd7 12.Nab5
e5 13.Bxe5 dxe5 14.Rxe5+ Be7 15.Rd5 Qc8 16.Nf5 Kf8 17.Nxe7
Kxe7 18.Re5+ 1-0

```
> 3 votes

# Answer
Development is about getting your army out as optimally as possible. There are arguably 5 key principles you need to concern yourself with in the opening, Force (Material), Space, Time, Pawn structure and King Position. Development is about getting your army out quickly so that you gain advantage in material distribution on the board (Material), controlling more squares in your opponent's territory (Space), Having the initiative (tempo/time), controlling the centre of the board as most of the action on a chessboard happens through the central squares and importantly keeping your Achilles heel (the king) in a secure position on the board such that it cannot be easily attacked by e.g. castling. Yasser Seirawan eloquently lays this out in his book Play Winning Chess available in online book stores and Chessable
> 2 votes

# Answer
Development is piece activity combined with king safety. Piece activity is in general the number of squares in your opponent's territory (fifth rank or beyond for white, opposite for black) that your pieces control. King safety is in general how vulnerable your king is to attack.

Those GMs might have been noticing, for example, that white is castled and has many of his/her pieces center forward, but black's king is still un-castled. But there are many situations where a player will feel the need to "act quickly". An opponent's king in the center while yours is safe is just the first one you should learn.
> 2 votes

---
Tags: opening, development
---


title: Stockfish evaluation bar like chess.com

text:
# Question
Title: Stockfish evaluation bar like chess.com
I programmed my own chess website and I have Stockfish included (v16) to play against.

I’m trying to make an evaluation bar like on chess.com but I can’t seem to figure out how. I thought about using the "eval" command on the current position, let Stockfish calculate with a depth of 20 and evaluate each position add up and take the average.

But first I don’t know if that’s how chess.com is doing it, and second, I can’t get an eval when a king is checked.

Also it seems a bit difficult to get the results from eval out of the cmd. I’m using angular for frontend and C# for my backend.

# Answer
> 1 votes
The evaluation on chess.com is simply a graphical display of the result of the eval command of the UCI interface for Stockfish. Likely they are using a WebAssembly version of the engine.

How you display that graphic is up to you.

---
Tags: stockfish, programming, evaluation
---


title: Resources To Learn How To Use Chessbase

text:
# Question
Title: Resources To Learn How To Use Chessbase
Chessbase comes up practically everywhere as key software to use for chess improvement, accessing and playing through games, researching etc. As an adult improver (1900 Chess.com), beginner chess coach and budding chess content creator, I identified it was probably a good idea to get Chessbase.

Having made the bold decision to buy the Chessbase 17 and Fritz 18 bundle, I’ve found it is incredibly hard to learn to use and haven’t come across a quick way to get to fully appreciate its optimal usage for my development and work. As a result I’m under utilising it and am yet to reap a return on my investment.

Part of the problem is that I’m hopeless with user manuals, my approach has always been to just dive in and figure it all out. In Chessbase, I’ve however met my match. Admittedly I have a technical knowledge gap, which I’m slowly filling with regards to what Chessbase really is and all it’s associated databases, engines, file formats etc. It’s a whole new world for me.

I see some user frustration with Chessbase in online comments. There seems to be a common theme that it’s difficult to learn and use. I take some solace in knowing that I am not alone. I’m however determined to learn and to benefit from Chessbase by using it as an effective tool.

Please help by pointing me to resources I can access to help me learn all about Chessbase in an efficient and structured way. With your help, I will not be defeated .

# Answer
The best comprehensive guide for Chessbase that I have found is the two books of Jon Edwards. In 2014 Russel Enterprises published his 350 page "*ChessBase Complete*" covering Chessbase up to version 12 and in 2019 this was followed up by a slim 90 page booklet by the same author bringing the main work up to date for versions 13, 14 and 15, "*ChessBase Complete, 2019 Supplement covering ChessBase 13, 14 &15*".

Of course Chessbase has continued to extend and improve. So, I would also recommend the YouTube video on the ChessBase India channel by IM Sagar Shah, All the ChessBase 17 new features explained in depth, from December 2022.
> 2 votes

---
Tags: learning, beginner, database, chessbase, coach
---


title: Tailored Chess Improvement guidance

text:
# Question
Title: Tailored Chess Improvement guidance
I'm 14 years old and I've been playing chess for the past 16 months. I've a rating of 970 in rapid on chess.com, a blitz rating of 614 and a highest puzzle rating of 2414. Although I have a \<1000 ELO rating on chess.com, my skills might prove to be 1450-1500. I've analyzed my games on chess.com and I have achieved a constant accuracy between 75% and 90%. It usually shows my estimated ELO as 1340-1400. I usually play with higher rated opponents to improve myself in chess.

I've got books like *Complete Book of Chess Strategy*, *The Chess Fundamentals*, *Under the Surface* and *Practical Chess Endings*. Furthermore, I bought diamond membership in chess.com because I thought it could help me.

Problems:
I'm planning to reach the 2200 mark by the start of next year like January end or something, my next goal is to attain the FM title (or NM). Also I'm very keen to get the GM title one day and I know the only way to do that is giving some dedication to it. Attaining that title by end of my school life is my plan.

Although I have a problem balancing my academics with this, I'm still having problems trying to improve. I think I hit the 1000 ELO mark 6.3 months after learning chess. However since last May I'm not improving at all except maybe learning some cool concepts from my book(I've not finished the books).

It might sound surrealistic to reach the FM title within a year from now. But believe me, I've got the dedication and self-esteem, once I've hit the 1000 ELO within half a year. I'm a fast learner too. I'm looking for some advice to improve exponentially to avoid the plateau in my growth.

Based on my age, skill, rating, problem and the time I've been playing chess, the info I've provided and the resources I have, how do I improve?

# Answer
> my next goal is to attain the FM title

The FM title is a FIDE, over-the-board title which requires you to achieve a FIDE rating of at least 2300 at standard time controls.

According to the information you have given, you only ever play online. If that continues then you will never, ever achieve the FM title because you will never, ever get an over-the-board FIDE rating.

> how do I improve?

The single best thing you can do is join a chess club where people play real chess, over-the-board. They can help you and encourage you. Oh, and they can beat you like a drum, but if you persist then you *will* improve and break out of your plateau. You then need to go on and play in real, over-the-board chess tournaments where you get a real rating. The online bubble you are currently living in is almost meaningless.

When you are playing real, OTB chess you also need to ask your opponents, after they beat you, to go over the game with you and tell you where they think you went wrong.
> 3 votes

# Answer
It's good to have goals in mind, but I think your timeline might be a bit ambitious. At your current level I would suggest you focus on the basics; there's an excellent Great courses series on chess, I suggest you borrow it from your local library.

I hesitate to say this, because novice players generally take opening far too seriously, however if you want to improve quickly, I would suggest you focus your early efforts on the "Italian game" and the Caro-Kann", the Italian game will force you to learn tactics, and the Caro-Kann will force you to appreciate pawn structures. Not because openings are that important, but knowing them well enough to get into the middle game in an equal position will facilitate your development of tactics, which are the soul of chess.

however more importantly than those two openings, I would focus my efforts on opening principles, tactics, matting patterns and end games.
> 1 votes

# Answer
The only way you're going to make that kind of progress is to get a coach that will build a personalized plan for you. There's no way by self-study and just playing you will make that kind of progress. Find a coach and get ready to work hard on your chess.
> 1 votes

---
Tags: learning
---


title: Most mate options after 6 moves

text:
# Question
Title: Most mate options after 6 moves
Found this construction problem from '83 and liked it. I don't know the best solution (yet), and maybe you can top it anyway.

Consider the (help) "game" 1.e4 a6 2.Bc4 a5 3.Qh5 a4. Now White can mate in two ways (and I doubt this value can be increased having 6 preceding half-moves). Maximize the number of possible White mates after 12 half-moves (which you choose).

# Answer
> 2 votes
15:

```
[FEN ""]
1. e3 f6 2. a4 Kf7 3. a5 Kg6 4. Ra4 Kf5 5. Bc4 Ke4 6. Qh5 Qe8

```

There are 11. discovered check mates plus 7. Qd5# 7. d3# 7. f3# and 7. Nc3#

# Answer
> 10 votes
11 without discovered checks:

```
[FEN ""]
[startply "12"]

1. e3 e6 2. d4 Ke7 3. Bc4 Kf6 4. Nh3 Kf5 5. Bxe6+ Ke4 6. Qh5 Qe8

```

# Answer
> 8 votes
5.5 moves to 14 fool's mates:

```
[FEN ""]
[startply "11"]

1. b4 e6 2. Bb2 Qh4 3. Bxg7 Ne7 4. Bb2 Rg8 5. g3 Rxg3 6. f4

```

For 6.0 moves, start with something like 1. a3 and then reverse the colors (1. a3 b5 2. e3 Bb7 3. Qh5 Bxg2 etc.).

# Answer
> 3 votes
I bid 7.

```
[FEN ""]
[startply "12"]

1. e4 f6 2. Qf3 Kf7 3. Be2 Kg6 4. e5 Kg5 5. d4+ Kh4 6. d5 e6

```

---
Tags: problems, checkmate, puzzles, records
---


# Question
Title: How to keep track of material when calculating?
If you're calculating a sequence, suppose you calculate it correctly( for example, you know you're gaining +2 points) but can't really evaluate the final material count correctly(can't tell that you're up a rook for some pawns), if the opponent doesn't really have any proper counterplay in that line, would this still be considered improper calculation? Is it better to track material count during the line or at the end of the line?

# Answer
Calculating a line means visualizing the positions along the way, and yes, in particular you must be aware of the material count. The reason is simply that it strongly affects the candidate moves (e.g., if you are attacking down material, you watch out for adversary moves forcing queen trade) and also the decision of where to stop calculating the line.

If you *"can't tell that you're up a rook for some pawns"*, then this is not really a calculation: you cannot visualize the final position, what do you *actually know* about it? What do you mean by having calculated it?

In general, calculating a long chess line correctly is a *vastly more difficult* task than keeping track of the material along the calculation, which becomes somewhat automatic as you gain experience. If you have trouble with the material count it is unlikely that your calculation will be of any use.
> 2 votes

---
Tags: calculation
---


title: Is there a mate in two moves for white?

text:
# Question
Title: Is there a mate in two moves for white?
How is this a mate in two? I can't see it.

```
[fen "k4r2/1rQ1b1p1/2Rp1n2/1p2p2p/P7/1P3PBq/5P1P/4K2R w - - 0 1"]

```

# Answer
After Ra6+ black's only possible move is Ra7 when white has Qxa7# and Rxa7# both of which are mate

```
[fen "k4r2/1rQ1b1p1/2Rp1n2/1p2p2p/P7/1P3PBq/5P1P/4K2R w - - 0 1"]

1. Ra6+ Ra7 2. Qxa7# (2. Rxa7#)

```
> 17 votes

# Answer
In a puzzle like this, first look at the ways in which white can give Check. That will force black to respond to the check which dramatically reduces the number of possibilities.

White has five possible checks with the queen, but none of them work out. If white gives check on the back rank, black can simply capture it with their rook. If white captures the black rook on B7 with their queen then black can capture it with their king. If white gives check with the queen on A5 then black can either block with their rook or move the king. In either case white lacks a good follow-up.

However, white also has a check with the rook. Black doesn't have any pieces that can capture white's rook and can't move their king since all the squares it could move to are covered. So they are forced to block with their rook.

That leaves black's rook under double attack, either the rook or the queen can capture it to deliver checkmate.
> 11 votes

---
Tags: engines, problems
---


# Question
Title: Chess.js -- How to access the various fields in .moves({ verbose: true})
I am an experienced Delphi programmer but totally new to JavaScript/TypeScript and I don't understand the structure of what is returned by .moves({ verbose: true}) and the appropriate JS/TS syntax to retrieve the data from the fields of the list of possible moves. For example, the following simple code lists 50 possible moves from the position given by the FEN string.

```
import { Chess } from "chess.js"
const analysisBoard = new
Chess("r1bq1rk1/ppppbppp/4p3/4P3/5Q2/2NB1NP1/PP1P3P/R1B1K2R w KQ - 1 11")
console.log(analysisBoard.moves({ verbose: true}))

```

Move 26 in the list is both a capture and a check \[san: "Bxh7+"\]

```
26: (10) {color: "w", piece: "b", from: "d3",...}
color: "w"
piece: "b"
from: "d3"
to: "h7"
san: "Bxh7+"
flags: "c"
lan: "d3h7"
before: "r1bq1rk1/ppppbppp/4p3/4P3/5Q2/2NB1NP1/PP1P3P/R1B1K2R w KQ - 1 11"
after: "r1bq1rk1/ppppbppB/4p3/4P3/5Q2/2N2NP1/PP1P3P/R1B1K2R b KQ - 0 11"
captured: "p"

```

I thought that the structure might be just a list of strings. However, syntax like let `MoveStr=analysisBoard.moves[26]`, isn't getting me anywhere. When I try `console.log(MoveStr)`, it is undefined.

Would someone who is familiar with the structure and the appropriate JS/TS syntax please be so kind as to tell me how I would loop through the available moves, finding any that are checks (i.e., contain the character "+") and/or are captures (either they contain the character "x", or flags: contains "c" or the captured field is present) and then be able to access the data from some of the fields of those moves, for example, "piece:", "from:", "san:" and "after:"?

# Answer
The structure returned is a list of objects. Here is the schema according to the `chess.js` docs ...

```
chess.moves({ verbose: true }) // return verbose moves
// -> [{ color: 'w', from: 'a2', to: 'a3',
//       flags: 'n', piece: 'p',
//       san 'a3', 'lan', 'a2a3',
//       before: 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1'
//       after: 'rnbqkbnr/pppppppp/8/8/8/P7/1PPPPPPP/RNBQKBNR b KQkq - 0 1'
//       # a `captured` field is included when the move is a capture
//       # a `promotion` field is included when the move is a promotion
//     },
//     ...
//     ]

```

You would want to do something like this ...

```
var lstMvs = analysisBoard.moves({ verbose: true})
lstMvs[26].san // for example

```

Your mistake is that you are indexing into a function call. `.moves()` is a function that takes a set of arguments and returns a list of structures. You must call the function and then index into the results, not the function call itself. That is `moves({verbose:true})[26]` not `moves[26]`.
> 0 votes

---
Tags: software
---


# Question
Title: How many queens can check a king without it being checkmate (with no other pieces on the board)?
I am going to write an autobiographical story. The motive is therapeutic. I suffered abuse from my father, and at the age of 20, I developed delusional disorder; the psychosis lasted for 20 years, and I am starting to emerge from it after three years of psychotherapy. A series of coincidences occurred: I was born in 1984 like the novel, appeared in the newspaper at the age of 9 after scoring 3 points in an International Open, well, there are more coincidences, but I won't delve into them.... I will only add that I knew a girl in my town whose name, translated from Spanish to English, is something like Cristine Youkill.

I believed I was selected by Intelligence Services, and that girl was my destiny. Recently, I had lunch with that girl and her family, and not only did I discover that she wanted nothing to do with me, but she also said that my psychosis was due to cannabis, when I had been abused by my father and had experienced the Al-Qaeda attacks as something close; they attacked me for being the character: Winston Smith. I couldn't bear it and, as a recovered addict, I took amphetamines and had a kind of dream. It wasn't exactly a dream; I was awake because I wrote it to a friend via WhatsApp, telling her that it was really happening. It was a kind of trance.

I was Bobby Fisher playing with white pieces. I was both the white king, and Cristine Youkill was the white queen. At a certain moment, I became the black king, and 17 white queens were checking me. 16 of the queens were Princess Leonor, the future Queen of Spain, and the 17th was Cristine herself. I threw the king out the window. The king caught a piece of curtain that served as a parachute. I fell into the street unharmed, holding Jeff Hwang's three volumes of Omaha Pot Limit. A new life awaited me as a survivor and poker player in Malta.

Well, now I want to write a book telling my whole story, including the trance. I want to show at the beginning of each chapter the 16th game that appears in Bobby Fischer's "My 60 Memorable Games" titled 'Four Queens between Fischer and Petrosian.' I want the game to transform at the end, and I am playing as black, attacked by those queens.

Well, I think it's not possible 17 queens, I mean, the puzzle is only a black king and only queens in white. The whites are only queens, no other pieces on the board.

What is the maximum number of white queens giving check to a king without it being checkmate, with no other pieces on the board?

If I receive a response, the position will be published, and the winner will be quoted in my book as they wish to be cited.

# Answer
> 27 votes
The question asks for "no other pieces on the board" apart from white queens and a black king. So the other answers looking for *legal* positions seem to be missing the point.

If we're looking for placements of pieces satisfying all queens are checking the king and it is not checkmate, the maximum is seven. There are only eight directions the queens can be giving check from, and only one white queen can actually be checking the king from each direction (since white queens can't jump). However, since it is not checkmate, the king must be able to move in one direction, which means no queen can be checking from the *opposite* direction. The queen in the direction the king moves can be captured, which means seven is possible. An example is as follows.

```
8/8/8/Q3Q3/8/Q1k1Q2/2Q5/Q3Q3 b - - 0 1

```

# Answer
> 10 votes
The only way black can be in check from more than one queen is if a pawn moves forward one move, queens and discovers a check from another queen behind it like this:

```
[fen "8/3kPQ2/8/8/8/8/8/4K3 w - - 0 1"]

1. e8=Q+

```

# Answer
> 10 votes
I'm pretty sure the maximum number is two (under current rules). I can think of two different ways to achieve it. One is a discovered check by a promoting pawn, as in Brian Towers's answer. The other is a double discovered check by an en passant capture:

```
8/3p4/4k3/4P3/2Q1Q3/8/8/4K3 b - - 0 1

1...d5 2.exd6

```

# Answer
> 6 votes
@Brian Towers answer is correct under current chess conventions.

However, you if want to be cheeky, you could abuse the 1980 FIDE rules to achieve 'eight', like so.

```
[FEN "8/3kPQ2/QQ2r3/2QK4/7Q/7Q/7Q/8 w - - 0 1"]

1. e8=Q Rd6+ 2. Qhxd6 Ke7 3. Qhe6 Kd8 4. Qac8 Ke7 5. Qbc7 Kd8 6. Q5c6 Kd7 7. Qhd8

```

# Answer
> 3 votes
I believe, if we are talking legal moves to get to that position, the answer would be 6, assuming a Queen captures some black piece at C6 to put the black player in check.

With that said, if you are asking the maximum number that you could put down on a board to have the black player in check, but not mate, the best answer I can come up with is 18:

# Answer
> 0 votes
There could be 7 queens all lined up checking the king if one captured a black chess piece which was blocking the rest.

More would be impossible during play.

It’s much more likely that you would get checkmate much earlier or a stalemate.

---
Tags: problems, check, queens
---


title: How should I play against the Alekhine?

text:
# Question
Title: How should I play against the Alekhine?
I like to play the variation below, although it may seem a little bit awkward.

```
[FEN ""]
1. e4 Nf6 2. e5 Nd5 3. c4 Nb6 4. c5 Nd5

```

From here you can play `Nc3` or `Bc4`. White will have a lot of space and if the black player is going to play it wrong, he will have a disadvantage for the complete game.

# Answer
> 5 votes
1.e4 Nf6 2.e5 Nd5 3.c4 Nb6 4.c5 Nd5 is known as the Chase Variation and is playable, though not considered to be particularly great for White.

At the highest levels, the most popular variation for White is the Modern Variation, 1.e4 Nf6 2.e5 Nd5 3.d4 d6 4.Nf3. However, Black is left with a lot of freedom about how to continue, so White needs to be ready to handle a lot of continuations.

At club level the most common continuation seems to be the Exchange Variation, 1.e4 Nf6 2.e5 Nd5 3.d4 d6 4.c4 Nb6 5.exd6 (note that moves 3 and 4 are often reversed). Play proceeds differently depending on how Black recaptures the pawn.

The most aggressive (and most principled) choice for White is the Four Pawns Attack, 1.e4 Nf6 2.e5 Nd5 3.d4 d6 4.c4 Nb6 5.f4. White stakes out a ton of space but has to prove that he hasn't become overextended. Play often becomes very tactical.

# Answer
> 5 votes
I usually play the Saemisch Attack ...

**1.e4 Nf6 2.e5 Nd5 3.Nc3**

```
[Title "Saemisch Attack to Alekhine's Defense"]
[FEN ""]
[startply "5"]

1.e4 Nf6 2.e5 Nd5 3.Nc3

```

# Answer
> 0 votes
Well you can play a sort of system in the Alekhine against most black (reasonable) moves, its called the Voronezh system if I am not mistaken. It arises after the Exchange Variation, 1.e4 Nf6 2.e5 Nd5 3.d4 d6 4.c4 Nb6 5.exd6

And now regardless of which capture is used by black, white should proceed with Nc3-Be3-Rc1-b3 unless black plays some very provocative move. This system has the advantage of nullifying the fianchettoed DSB so common in the Alekhine and giving you a pleasant position as white

---
Tags: opening, analysis, alekhines-defense
---


# Question
Title: Why is the Scheveningen Sicilian almost never seen nowadays at top-level chess?
It seems to me that, although we see lots of Sicilians, especially Najdorfs, Tajmanovs, and Kans, the once popular Scheveningen variation (1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 e6 -- or 2...e6 and 5...d6) recently lost a lot of its popularity at top level chess. Nobody seems to play it any more even at club level chess. Is there a clear reason for that?

```
[FEN ""]
1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 e6

```

# Answer
As far as I know the theoretical reason for this is the Keres attack. (As stated by Jan Gustafsson in one of many live commentaries.)

```
[Event "Tata Steel"]
[Site "Wijk aan Zee NED"]
[Date "2013.01.23"]
[EventDate "2013.01.12"]
[Round "10"]
[Result "0-1"]
[White "Pentala Harikrishna"]
[Black "Yifan Hou"]
[ECO "B81"]
[WhiteElo "2698"]
[BlackElo "2603"]
[FEN ""]

1. e4 c5 2. Nf3 d6 3. d4 cxd4 4. Nxd4 Nf6 5. Nc3 e6 6. g4 h6
7. h4

```

In fact this line is even entered by white a tempo down, via the h3-Najdorf, so it seems to be just very comfortable for white.

That being said, Hou Yifan still plays the Scheveningen with black and does so extremely successfully. In fact she won the game from which I took the above opening moves, so white's advantage in the Keres attack is probably nothing that should concern us lesser mortals.
> 7 votes

# Answer
Style and preferences come and go.

Looking at opening databases this is not a bad variation.

Maybe some 'experts' feel that they get a slightly larger winning % chance with other variations.
> 2 votes

# Answer
I agree with Joe. A lot of this is style. It's pretty solid, and is still played, although often by transposition.

My guess is that it's a combination of the fact that people favor other variations of the Sicilian and that the Scheveningen is difficult to handle against something as aggressive and the English Attack. It's also been worked for a couple of decades and its variations are pretty familiar to GMs.
> 2 votes

# Answer
As somebody already said, it's mostly the Keres attack, the e6 move solidifies blacks central control but also hems in the c8 bishop, allowing G4!. Indeed it is also worth noting that the scheveningen is not refuted or dubious by any means, kasaprov was a huge proponent of it back in the 80s and indeed when karpovs team found improvements in the keres attack, it led to the decline in popularity. The keres attack leads to very sharp positions for black where any mistake can lead to being overrun by the white pawn mass
> 0 votes

---
Tags: opening, sicilian-defense
---


title: Classical french for a repertoire

text:
# Question
Title: Classical french for a repertoire
I am crafting an E4 repertoire from scratch and I am looking for a dynamic approach for white against the french and have shortlisted the classical with Nc3, but here I am not sure whether the Steinitz with E5 is the more aggressive option or the classical main line with Bg5, or should I scrap the classical and use the advance?

# Answer
Strongly depends on personal taste and on how much theory you would like to learn.

> I have been using the 3. e5 system against the French Defence for about thirty years. \[...\] I understood that the move 3. e5 was not objectively the strongest, but I had no desire to compete with such experienced French-specialists as, for instance, Vaganian, in the long and complex lines that arise after the main continuation 3. Nc3. Thus I chose the 3. e5 system \[...\] for practical reasons, since I understood that my opponents would be focusing their attention on the moves 3. Nc3 and 3. Nd2 which were much more popular at that time.
>
> — GM Evgeny Sveshnikov, French Defence Advance Variation volume 1, Introduction.

# 1. e4 e6 2. d4 d5 3. Nc3

More theoretical, since black now has choice between three systems, which all accomulated quite a large body of theory. That is:

1. The very sharp **Winaver** with **3. ... Bb4**.
2. The **Classical** with **3. ... Nf6**:
    * If you go for aggressive **4. Bg5** black has choice between **4. dxe4** and the razorsharp MacCutcheon with **4. Bb4**.
    * **4. e5** leads to more logical positions.
3. The calmer **Rubinstein** with **3. ... dxe4**.

These lines usually lead to sharp play, which favours better prepared player. The good side is, that with good preparation play prefers White side. The bad side is, black is the one which chooses the line.

# 1. e4 e6 2. d4 d5 3. e5

More forgiving (it leads to positions that can be played "by ear" and not solely "by book") and, more importantly, it gives white bigger say in choosing the resulting position.

You have space advantage, while black has a little advantage in development. In a lot of lines you will see white sacrificing his *d4* pawn to catch up in development, while keeping space advantage. Remember: protect *e5* for all costs, don't worry if you lose *d4*.

Looking at pieces - black obviously has big problems with development of his light squared bishop, while white has some issues with his queenside knight, since *c3* is occupied with the pawn. That's why early **cxd4** is not very good idea for black, since it gives white c3 for his knight after recapture.

If black doesn't go for one of the dubious tries to exchange of his light squared bishop (e.g. **b6 - Ba6** or **Qb6 - Bd7**, etc. - these give white very strong iniative, if he blasts the centre open at the right moment), he has two good choices:

1. **1. e4 e6 2. d4 d5 3. e5 c5 4. c3 Nc6 5. Nf3 Qb6** is modern **Mainline**.
2. **1. e4 e6 2. d4 d5 3. e5 c5 4. c3 Nc6 5. Nf3 Bd7** the very reliable **Euwe** variation.

Today against the mainline the most common try for advantage is improved Milner-Barry gambit: **1. e4 e6 2. d4 d5 3. e5 c5 4. c3 Nc6 5. Nf3 Qb6 6. Bd3 cxd4 7. O-O** (the "old" **7. cxd4** gives black equality at least) **Bd7 8. Re1**. If black takes on *c3* you have advantage, since you are able to deploy your knight with **Nc3**. Otherwise you go for grab space on kingside with **h4** and then usually play switches to queenside expansion with **a3 - b4**.

Alternatively white can cross black plans even earlier by going for **Keres-Nimzowitsch** gambit line **1. e4 e6 2. d4 d5 3. e5 c5 4. Nf3**, where black equalizes, but is not better. Play for white is in most cases thematic: you play **Bd3 - O-O - Re1**, **Qe2** if needed, and then start pushing **h4 - h5 - h6**.
> 2 votes

---
Tags: opening, french-defense, 1.e4, repertoire
---


# Question
Title: Understanding engine evals in positions with less space
In openings such as the closed Tarrasch and the KID or the pirc , engines often show an advantage for white of around 0.5 ( a bit higher generally), I remember reading around 5 years ago and this is a opinion I have heard from other strong players as well that engines tend to overestimate space as an advantage, is there any truth to this statement now or have Neural networks rendered these statements obsolete and if yes, does that put these openings in the litter box of chess history?

# Answer
> 2 votes
# Space advantage

There is an important difference between space advantage and other kinds of advantage - it's very hard to convert it into something tangible. While play with material advantage (exchange pieces, win the endgame) or with iniative advantage (attack, sacrifice, checkmate) is in principle straightforward, it is not so with space. Space gives you more room to maneouver and easier development, but that is not enough to win by itself - you still need to break through on the side where you have more space for it too matter (or open up the center and win the resulting open position with better placed pieces).

And let's not forget that in these openings White doesn't get space advantage for free - in all of them Black has significiant counterplay.

# Computer evaluation and practical play

ICCF correspondence play allows use of engines. I think that best indicator of line's theoretical health is looking at recent results in it between high-rated (+2400) ICCF players. What we see is that King indian defence leads mostly to draws, so White's space advantage is offset enough by Black counterplay.

Let me put it that way: if you tell me that some position is +1 by engine in Italian opening I won't be surprised if White wins. If you tell me the same about some topical King indian position, that is matter of course and I will be surprised if Black fails to draw.

Personally I haven't lost in KID on ICCF yet, my only issue with it is that you reach positions, that neither you nor your engine understands, so it's really hard to play - you cannot just copy engine moves and know that you will be okay, like you can do in Ragozin for example.

For OTB engines' opinion matters even less, especially at amateur level. Of the openings you listed I think Pirc is today considered the most dubious, but it still occupies an important niche in practical play - it is the weapon of choice against lower rated players in must win situations for a lot of players, since it keeps the pieces on the board. White gets advantage of course, but once they make some mistakes and you equalize, there is still enough material on the board to play for the win. You cannot say this about Moscow variation of the Sicilian for example, where Black has hardtime generating winning chances even against clumsy play by White.

# Do engines overrate space advantage?

In the past, in the days of handcrafted evaluation functions, this was most certainly true. Today, when evaluation is NNUE blackbox it's hard to say. I would say that for KID at least, they still overrate space advantage, since KID-s get way more draws than you would expect solely from engine evaluation. In general as long as evaluation is under +1.5 in KID-s I still believe in my drawing chances.

# Answer
> 0 votes
I have often noted that the engines value space. Do they overvalue space? No, they value it exactly correctly for their level. The correct answer is that humans undervalue space. No human plays at a 3600 level. Therefore, it is humans that are incorrect, not the engines.

That said, at my level (2200), I often discount the engine evaluation for a variety of reasons, space among them. If you play a variety of King's Indian setups, the engine will hate your position. But, against humans, they are very playable setups even at the highest level. (You will notice Nimzo and KGD are played far more often, however).

---
Tags: opening, engines
---


title: Confusing about perft test on Stockfish

text:
# Question
Title: Confusing about perft test on Stockfish
I am writing a chess engine, and I am comparing my move generation results with Stockfish. I am currently stumped by this result.

In this position `8/2p5/8/KP1p2kr/5p2/8/4P1P1/6R1 w - -` from https://www.chessprogramming.org/Perft\_Results, at depth 6, my engine has **11030061** moves while Stockfish gets **11030083**. I follow the discrepancies in nodes visited from each root position until I reach this position `8/2p5/8/KP1p2kr/5p2/8/4P1P1/6R1 w - - 0 1`. At depth 2 Stockfish finds **256** positions, I find **255**. The discrepancy is at g2g4. Stockfish finds **16** nodes, I find **15**. When I make g2g4 then run Stockfish on this new position, it finds 15 moves, the same as my engine. Counting the moves in `8/2p5/8/KP1p2kr/5pP1/8/4P3/6R1 b - - 0 1` by hand, it seems to me that there should be 15.

Why does Stockfish find a 16th move from g2g4 at depth 2 in `8/2p5/8/KP1p2kr/5p2/8/4P1P1/6R1 w - - 0 1` and yet when g2g4 is made, it finds 15 moves for black?

# Answer
you are missing an en passant capture
> 1 votes

---
Tags: programming
---


# Question
Title: How can I install chess engines in windows?
Actually, I want to install top 10 chess engines in my PC for practicing better.

# Answer
> 5 votes
I would recommend Stockfish, currently the world's best chess engine. You can download it here for free (but wait first!). However, if you want to practice against it (presumably by playing games) you will need to play against a lower level unless you enjoy getting the life squeezed out of you by an engine that's at least 1000 rating points higher.

However, if you don't want to have to play against Stockfish by typing in a bunch of uci commands into the terminal you should consider not actually downloading Stockfish but downloading Lucas Chess, which comes with a niceGUI and an easy way to control the engine's level.

If you really insist on playing against Stockfish in the terminal for some reason, you can find more info about that here.

# Answer
> 2 votes
You can use most of these and more on Chessify. Also, most people who are serious about chess use Chessbase which will also get you Fritz. If you want to find all the top 10, go to the TCEC and check out the latest standings. You will see that for the most part, if you have SF and Lc0, you have the two top engines.

---
Tags: engines, recommendations, windows
---


# Question
Title: Where could I get the Torch Chess Game Installer for Windows 11?
The question:
Where could I either buy or download Torch Chess Engine, please?
This to install it on my ever offline Laptop.

I do not like Stockfish, I prefer a more complex, nastier one, which thinks and acts outside the box. And from what I gather, from YouTube videos on the subject, Torch is precisely this.

# Answer
> Where could I get the Torch Chess Game Installer for Windows 11?

You can't and Chess.com have no plans to sell it. You can use it online for analysis or play against it online as a bot.

Here is what Chess.com said about it last July (2023) when it was launched

> Torch is not yet publicly available but will be made available to certain relevant third parties for ratings. It will also be available through Chess.com’s analysis in the future. The team hopes to bring new ideas to the engine to allow greater insights to be delivered to the chess community.
> 5 votes

---
Tags: engines, software
---


title: Two Rooks v/s Queen End game

text:
# Question
Title: Two Rooks v/s Queen End game
Is Two Rooks, King v/s Queen, King in the end game is a theoritical draw in chess?

No player can win by any tactics?

# Answer
> 7 votes
Most positions with K+R+R vs K+Q are either dead draws or quickly come down to checkmate, a win with K+R vs K, or a loss with K+R vs K+Q. But occasionally one may run into a longer analysis. According to https://kirill-kryukov.com/chess/longest-checkmates/longest-checkmates.shtml the longest K+R+R vs K+Q win is a mate in 29, and the longest loss is mate in 46; to be sure these counts include the K+R/K and K+Q/K+R codas, but it still takes about 15 moves to get there.

---
Tags: endgame, queens, rooks
---


# Question
Title: What are good ways to check blunders after the match?
Currently I am using Tarrasch for GUI and Rybka 2.3.2a as the engine. With that, I am able to kibitzing every position in the game and check for any blunder. So basically this is what I always did:

* Record all of the moves with Tarrasch and then save it in PGN format.
* Kibitzing with Rybka from the 1st move, check the evaluation.
* Continue to the next move, kibitzing again, etc.

Is there any faster way than checking every position one by one like this?

# Answer
> 12 votes
Lichess.org has a free browser-based game analysis tool that allows you to copy and paste your PGN file for online analysis.

It's powered by Stockfish, and the analysis automatically:

* Annotates the game with inaccuracies, mistakes, and blunders.
* Graphs the game with an interactive move-by-move advantage chart (see below).
* Suggests improved lines.
* Names the opening.

It doesn't beat going through your games with your opponent and a good instructor, but it's a very useful free tool, and you don't need to install any software to run it.

The developer of lichess.org also has a blog post about Stockfish and the analysis tool.

# Answer
> 2 votes
You could try

PGN ChessBook

Which is a free app that has some good automatic blunder-check / game-annotation features.

It can find blunders, then automatically annotate the game by inserting variations and (optionally) adding comments to the blunder moves, which can then be printed out, as described in this video

How to find and print out game blunders using PGN ChessBook

I hope this helps someone.

# Answer
> 1 votes
I realise that this is a couple of years old, but in case anyone reaches this page you can use SCID analysis, there is an icon at the bottom of the analysis window called "annotate" and this will loop over each move with whatever chess engine you configure, and label the mistakes, blunders etc.

# Answer
> 1 votes
I have set up a small, free app just for this occasion. It's called chess blunder trainer, and it analyzes your own games to identify your blunder moves. Then, you can replay the position in puzzle forum to find better moves and hopefully improve your skills :)

You can find it on Google Play Store via https://play.google.com/store/apps/details?id=com.cbt.chess\_blunder\_trainer

You can find out more about the app here: www.chessblundertrainer.com

# Answer
> 0 votes
I know this is not a programming stack exchange, but... If you have any interest in programming, this would be a perfect task for a simple program and a great learning experience. It could be done in most any programming language.

You can take your PGN separate the moves, input them into a chess engine and give it a certain amount of time to analyze each move. Parse the evaluation for each move and store it. Then loop through the moves, calculate the difference in evaluation from the previous move and classify it as a "blunder" if the evaluation changes more than a defined threshold (1 pt, 2 pts, 3 pts up to you) or perhaps a defined percentage (You may have to consider when the eval is like +10 that it can vary more wildly and maybe omit those scenarios).

If you did this, you could give it a entire list of games, come back in a while and see a list of possible blunders. Otherwise, I think you are left doing it by hand.

# Answer
> 0 votes
**\[EDIT\]:** Blunder checking is available now. https://www.chess.com/forum/view/chess-equipment/smallfish---free-chess-ios-app

---

If you have iOS, please take a look at SmallFish. SmallFish has a 64 bits Stockfish engine, which means it's stronger than Droidfish (it's 32 bits). The app has a graph for evaluation.

# Answer
> -1 votes
If you have an Android device, you can try a new app called "Analyze your games" that reads every move and compares it with the best moves calculated by Stockfish. It also finds blunders and missed tactics.

---
Tags: analysis, engines, software, blunder
---


# Question
Title: App that identifies moves as Excellent/Good/Mistakes/Blunders
I really like the analysis tool on chess.com that processes your games and identifies the Excellent and Good moves, as well as Mistakes and Blunders. It also proposes which move should have been played.

I realize it's probably based on a drop or increase in your piece advantage, but I really like this tool since I can clearly see what were my opponent's blunders or mistakes (as well as mine).

Is there an Android app that has similar features? The chess.com app allows me to analyse my chess.com games, but not to import a PNG and process it. Other analysis apps I've seen only return the "piece advantage score".

# Answer
> 9 votes
I would suggest starting at lichess.org. It has tools that let you (1) analyze a game that you play on the site or (2) import a game and analyze it.

The lichess.org analysis includes inaccuracies, mistakes, and blunders. It does not have excellent or brilliancy (! or !!) markers, but they provide a rationale for why they don't use those. You can decide whether their explanation suffices for your purposes. They use a centipawns lost or gained graph that seems to be a good indicator of the game state. And they often suggest better moves with the corresponding alternate lines.

They have an Android app at https://en.lichess.org/mobile that you can try out to see if it meets your needs. You can also try out their web site on a mobile device to see how that works, too.

Finally, what I like about lichess.org is that they seem to have a great interest in having a clean, stylish piece and game user interface and they also seem to be actively developing, so if you have suggestions they may take a listen.

EDIT: Somehow I neglected to mention earlier that the site is free and the code is open source. Both are great if you want to save some money while learning chess and even possibly get interested in seeing how the site code works.

# Answer
> 3 votes
You could try

PGN ChessBook

Which is a free app that can be installed from SourceForge or from the Windows app store.

It finds blunders, then automatically annotates games by inserting variations and adding comments to the blunder moves, as described on

Automatic game annotation features

And in this YouTube video

How to annotate games automatically using PGN ChessBook

Of course ChessBase and several other paid apps can also do this, but they can be expensive.

# Answer
> 2 votes
In addition to lichess, which has a great service for analyzing, Analyze This (Free) is a good app which lets you auto-analyze games, and has a beta feature which will identify blunders, mistakes, annotate your games for you, and suggest other lines.

# Answer
> 2 votes
I'd point out that lichess.org uses the Stockfish engine which is regularly one of the top 3 most powerful chess analysis engines available (and its free): CCRL Chess Engine ratings through competitive competitions

Although I completely agree with the recommendation to check to checkout lichess.org why not its engine directly in Android? Download 'Droidfish' for Android: Droidfish Download

# Answer
> 1 votes
For those interested, I have set up a free app exactly for this occasion, the chess blunder trainer: You import your own past games, and the tool will identify weak moves and generate puzzles from the positions. You can then replay the positions and like this improve your chess skills :)

Try it out in the Google Play Store: https://play.google.com/store/apps/details?id=com.cbt.chess\_blunder\_trainer

You can find out more about the app here as well: www.chessblundertrainer.com

---
Tags: engines, analysis, android
---


title: What are some puzzle apps for android?

text:
# Question
Title: What are some puzzle apps for android?
I'm a big fan of lichess's tactics training, because puzzles include both winning material and checkmate sequences, and the puzzles are taken from actual games.

Unfortunately this feature isn't available on the lichess android app. Is there some other app that meets most of these requirements?

* is free
* has no limit on number of puzzles
* has both checkmate tactics and material-winning tactics
* has sufficient variety in puzzle difficulty
* has a puzzle rating / gives you a tactics rating

Any recommendations are appreciated, thanks!

# Answer
> 0 votes
The lichess app for Android just added the training feature, so this question isn't relevant any more.

# Answer
> 1 votes
Mobialia chess free have some tactical puzzles.It is mainly used for connecting to icc and fics. The tactical puzzles are taken from real games. So although, there's only a limited no of puzzles(a few hundreds), doing them over and over can help one perfect the basics.It is mainly intended for players below 2100 fide rating.

# Answer
> 0 votes
I can recommend Max Chess: https://play.google.com/store/apps/details?id=dim.maxym.mychess

You can choose difficulty of puzzles and time mode. There are no puzzles limit.

# Answer
> 0 votes
I was looking for something similar and after not finding something suitable, I have set up a small, free app called the Chess Blunder Trainer.

You can find it in the Google Play Store via https://play.google.com/store/apps/details?id=com.cbt.chess\_blunder\_trainer

You import your own games as PGN. It will identify blunder moves and generate puzzles from the position. Like this, you can replay the position and try to identify better moves. Have fun with it and let me know what you think!

You can find out more about the app here as well: www.chessblundertrainer.com

# Answer
> 0 votes
Chess Tactic Puzzles is what I've been using for a while. It doesn't cost money, doesn't track your data, and doesn't serve up advertisements. As a player I think of myself as somewhere between beginner & intermediate levels, and I find some of its puzzles are easy, some difficult, and some intermediate. After trying a puzzle, you can "go back" and run through Stockfish's analysis of the position. There is also a progress tracking graph that is either a bit behind or that I don't understand (e.g. it often does something like showing my trend as downward even though I got the most recent puzzle(s) correct, or upward after missing a couple). However, for all that's involved (no cost, no unwanted instrusions), that last gripe is a minor one and I like the app.

---
Tags: training, websites
---


# Question
Title: Website or program that creates puzzles from blunders in your past games
I'm looking for a website or program that would look at your past games on Lichess or chess.com and find moves that you played that were blunders and create puzzles around those

# Answer
> 7 votes
I found this reddit post which has two comments which answer this question.

link

```
https://tactics.bitcrafter.net/

```

This is essentially exactly what I was looking for and bonus points in that I think I found their github that has their code which seems shockingly simple

link

```
I made something like that, both open source

http://chesstacticsgenerator.vitomd.com/

Description: Generate chess tactics from your own lichess games. This is based in the info that lichess generates (blunders, mistakes)

https://github.com/vitogit/pgn-tactics-generator

Description: Generate chess puzzles / tactics from a pgn file (this uses a python library & stockfish to evaluate blunders)

```

(Note, I am not affiliated with any of the links / software / repositories)

# Answer
> 10 votes
I don't know of a single program that does all that. I do it myself with following steps. I save most of my games in a pgn file. The interesting ones, esp. my losses, are analyzed by Stockfish. The "blunder threshold" is your choice, typically 3 - 5 pawns or more. With Notepad++ text editor I enter the FEN of the position in a pgn file, of course preceded by the tag line \[SetUp "1"\]. Answer is best line of Stockfish. I skip positions that are cooked by good alternative choices. When 50 - 100 puzzle positions are accumulated I transfer the pgn file to my Android phone & tablet. I display them with iChess but many other apps handle pgn files.

# Answer
> 9 votes
Lichess has the "learn from your mistakes" feature, which can be used to play your significantly bad moves in a game as a puzzle.

From your profile, select a variant/time control on the left, then click "view the games" in the top right. Click on a game, go to the analysis board, and at the bottom, in the "computer analysis" tab, click "request a computer analysis". Once you've done that, a button will appear on the bottom right for you to "learn from your mistakes".

With a free account you're limited to a few analyses a day, (I think it's around 30), and this is a bit of a manual process, but it's relatively close to what you have in mind. Also, unless you're on really short time controls, (for which puzzle rush would be better training than learn from your mistakes), you're not likely completing more than 30 games a day, so you can catch up with yourself at some point.

# Answer
> 2 votes
Lichess generates puzzles from your games automatically.

# Answer
> 2 votes
I built the online tool that does exactly that. To save time, it processes up to 50 games at once and does not require you to run analysis of each game first on chess.com or lichess.org.

The added bonus is that puzzles are converted to flashcards compatible with open source flashcard software Anki. I chose Anki because I found out that I can practice reviewing puzzles using spaced repetition that I have complete control of. In other words with Anki flashcards I can tweak the spaced repetition algorithm to fit my needs and time constraints.

# Answer
> 2 votes
There is a mobile app called ChessAlly (you can find it on the Apple app store) that allows you to create puzzles from your own games on Lichess or Chess.com It uses Lichess or Chess.com API to fetch your games and uses Stockfish on the backend to create puzzles from positions where you could gain or not lose at least 0.5 point

# Answer
> 0 votes
I was also looking for this and after not finding something suitable, I have set up a small, free app called the Chess Blunder Trainer on my own.

You can find it in the Google Play Store via https://play.google.com/store/apps/details?id=com.cbt.chess\_blunder\_trainer

You import your games as PGN. It identifies blunder moves and generates puzzles from the position. Like this, you can replay the position and try to identify better moves. Have fun with it and let me know what you think!

You can find out more about the app here as well: www.chessblundertrainer.com

# Answer
> 0 votes
AimChess does exactly that for both Lichess and chess.com.

---
Tags: analysis, learning, software, problems, programming
---


# Question
Title: Is it a good idea for white to play the Botvinnik system in the Sicillian defense?
After 1. e4 c5, the following line is not popular:

```
[fen ""]
[startply "3"]

1. e4 c5 2. c4 Nc6 3. Nc3 g6 4. g3 Bg7 5. Bg2 d6 6. Nge2 e6

```

Is there any reason that this line is not frequently played?

# Answer
> 1 votes
this variation seems to make an equivalence for both sides but the reason this is not much popular imo is because: 1.you have given up the control over d4 square which is a key square 2.your opponent's fianchetto bishop is much more active than yours because of the pawn in e4 and you cannot immediately perform ideas such as d2-d4-d5 and you should spend a lot of tempo for d3-Be3-d4 while black can safely castle and develop and is in no trouble

# Answer
> 1 votes
The move allows equality for black and nothing more, but the reason you don't see this being played often is that an e4 player would not generally want to transpose to a system outside the scope of the regular positions they face. You don't get that pawn structure in any other e4 opening so your understanding of it would be limited. Also note that the key tenet of the Sicilian and up to a certain degree, the caro kann, is that black opens with a flank pawn, letting white develop an initiative, secure in the fact that their position is genrally solid and that the endgame will be fruitful for them as they have an extra central pawn (open Sicilian and exchange caro and some lines of advance caro kann) Also worth noting is that a "pure" botvinnik, with the knight of E2 is not as good in this line(symmetrical English) compared to a botvinnik-like setup with Nf3 (check tony kosten's book "the dynamic English" for more on this)

# Answer
> 0 votes
It's a fine approach but you need to know what to do if Black just copies the setup which is a recommended approach in some books.

---
Tags: opening, sicilian-defense, english-opening
---


# Question
Title: Wining possibility for defense D00 - Queen's Pawn Game: Mason Attack from 15th move
Please have the game link over here.

I made my mistake not moving `...Nh4` with `...Nh4` as white I feel I do have the possibility of winning if I would've made.

```
[FEN "r2q1rk1/1pp1npp1/p2b2bp/3Q4/5P1N/P3P3/NP4PP/R1B2RK1 b - - 4 15"]

```

I had thought of this move, but I've slipped.

Please give us an analysis considering the move made by white.

**NO -**

I would step back with `...Qb3`

```
[FEN "r2q1rk1/1pp1npp1/p2b2bp/8/5P2/PQ2PN2/NP4PP/R1B2RK1 b - - 4 15"]

```

# Answer
> 4 votes
15.Qb3 is much better than 15.Nh4??,an horrendous move that hangs the queen. After 15.Qb3 Black is slightly better but the game continues.

In the line hiven in the OP, Black counters 15.Nh4?? not by capturing the queen (15...Nxd5!) but with an even worse move, 15...Nf5??. Then you are given the opportunity to win a free bishop with 16.Nxg6 exploiting the pin of the Pf7, but well, the comedy of errors continues.

Your priority if you want to make progress should be to develop a habit of looking for possible checks and captures for both sides. If you stop hanging your pieces and punish your opponents when they do, you can expect to win more games.

---
Tags: analysis
---