help me analyze a game

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

brtzsnr
Posts: 433
Joined: Fri Jan 16, 2015 4:02 pm

help me analyze a game

Post by brtzsnr »

My engine plays on FICS using a RaspberryPi B (256MiB of hash). Typical mid game search depths are 6-8 on the RaspberryPi. I also have some basic king shelter evaluation: when opponent has a queen it award pawns in front of the king.

This is one typical game it lost (taken from http://ficsgames.org/cgi-bin/show.cgi?ID=378951337)

[pgn]
[Event "FICS rated blitz game"]
[Site "FICS freechess.org"]
[FICSGamesDBGameNo "378951337"]
[White "Geforce"]
[Black "zurichess(C)"]
[WhiteElo "1975"]
[BlackElo "2075"]
[TimeControl "300+1"]
[Date "2015-07-31"]
[Time "07:19:00"]
[Duration "0:05:12"]
[WhiteClock "0:05:00.000"]
[BlackClock "0:05:00.000"]
[Result "1-0"]
[LongResult "Black checkmated"]

1. e4 d5 2. e5 c5 3. Bb5+ Bd7 4. Be2 Nc6 5. f4 Nd4 6. c3 Nxe2 7. Qxe2 c4 8. Na3 e6 9. Nc2 Bc5 10. Nf3 Ne7 11. Ncd4 O-O 12. b4 Bb6 13. a4 Ng6 14. g3 a6 15. O-O Ne7 16. Kg2 Qb8 17. Ba3 Qc7 18. Rac1 Bxa4 19. Ng5 Qd7 20. Qh5 h6 21. h4 hxg5 22. hxg5 g6 23. Qh6 Nf5 24. Nxf5 gxf5 25. Rh1 f6 26. gxf6 Kf7 27. Qh5+ Kg8 28. Qg6+ Qg7 29. Qxg7# {Black checkmated} 1-0
[/pgn]

I've seen the engine losing this way several times. King shelter is obliterated and a pawn is pushed to 6th rank defending a queen that traps the king.

What am I missing here? Is it lack of depth or some evaluation feature?
Ferdy
Posts: 4856
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: help me analyze a game

Post by Ferdy »

That knight was tempting, this is common for most engines to fall on that trap not just your engine.
Probably you could raise your threat eval a little bit. It seems to me the issue is about attack and not about defense. From what I have observed, it is always better to make the engine feel the danger. But the problem was the engine was offered by a material, it is probably beyond the engine's ability to refuse that knight. It is good to see the log of that game. If you look on some of those positions it is clear that the queen has a lot of attacked squares on black's king camp. When the h-file was opened, the engine should also consider the rook may join in in the attack. Did your engine has such an eval?

Analysis from sf6 at 2 threads and 2s/pos.

[pgn]
[Event "FICS rated blitz game"]
[Site "FICS freechess.org"]
[Date "????.??.??"]
[Round "?"]
[White "Geforce"]
[Black "zurichess(C)"]
[Result "1-0"]
[Annotator "stockfish 6 (2.0s/pos)"]
[BlackElo "2075"]
[ECO "B01"]
[TimeControl "300+1"]
[WhiteElo "1975"]

1.e4 d5 2.e5 c5 3.Bb5+ Bd7 4.Be2 Nc6 5.f4 Nd4 6.c3 Nxe2 7.Qxe2 c4 8.Na3 e6 9.Nc2 Bc5 $1 10.Nf3 Ne7 $1 11.Ncd4 O-O $1 12.b4 Bb6 13.a4 Ng6 14.g3 a6 $15 { -0.34/20 } ( { Better is } 14...Bxd4 15.Nxd4 f6 16.exf6 Qxf6 17.O-O e5 $15 { -0.52/23 } ) ( { Also playable is } 14...f6 15.O-O Qe8 16.a5 Bxd4+ 17.cxd4 Bb5 $15 { -0.52/23 } ) 15.O-O Ne7 16.Kg2 Qb8 17.Ba3 Qc7 $10 { +0.00/21 } ( { Better is } 17...Re8 18.Bb2 Ba7 19.d3 Rc8 20.Rfd1 cxd3 $10 { -0.17/22 } ) ( { Also playable is } 17...Qd8 18.a5 Bxd4 19.Nxd4 Re8 20.Bb2 h6 $10 { -0.00/22 } ) ( { White is threatening } 17...-- 18.b5 Re8 19.d3 cxd3 20.Qxd3 axb5 21.axb5 { +0.07/21 } ) 18.Rac1 $15 { -0.98/20 } ( { Better is } 18.b5 $1 Rfe8 19.Bd6 Qc8 20.d3 h6 21.Rfb1 $10 { +0.07/21 } ) ( { Also playable is } 18.a5 Bxd4 19.Nxd4 Rfe8 20.Bb2 Nc6 21.Nf3 $10 { +0.00/21 } ) ( { Black is threatening } 18.-- Bxa4 19.b5 axb5 20.f5 Nxf5 21.Nxf5 exf5 { -1.00/20 } ) 18...Bxa4 19.Ng5 $15 { -1.45/21 } ( { Better is } 19.b5 Bxb5 20.Rb1 Qd7 21.Bxe7 Qxe7 22.Nxb5 $15 { -0.96/19 } ) ( { Also playable is } 19.Ra1 Rfe8 20.Rfb1 Bb5 21.Rc1 h6 22.Bb2 $15 { -1.20/19 } ) ( { Black is threatening } 19.-- Rfe8 20.Bb2 Rac8 21.Ra1 Bd7 22.Rfe1 h6 { -1.24/21 } ) 19...Qd7 $15 { -1.23/22 } ( { Better is } 19...Bxd4 20.cxd4 h6 21.Nf3 Rfc8 22.Qe3 Bb5 $15 { -1.48/19 } ) ( { Also playable is } 19...Bb5 20.Qh5 h6 21.Ngf3 Nc6 22.Rfe1 Nxd4 $15 { -1.25/19 } ) 20.Qh5 h6 $8 21.h4 $17 { -2.32/21 } ( { Better is } 21.Ngf3 Bb5 22.Ra1 Nc6 23.Rfc1 Bxd4 24.Nxd4 $15 { -1.26/19 } ) ( { Also playable is } 21.Nh3 Bxd4 22.cxd4 Nc6 23.b5 axb5 24.Bxf8 $17 { -2.05/19 } ) ( { Black is threatening } 21.-- hxg5 22.b5 Bxd4 23.cxd4 axb5 24.Bc5 b6 { -3.99/19 } ) 21...hxg5 $4 $14 { +1.35/20 } ( { Superior is } 21...Bxd4 $1 22.cxd4 Nf5 23.Nf3 Qe7 24.Ra1 b5 $17 { -2.39/20 } ) ( { Also playable is } 21...Nf5 22.Ngf3 g6 23.Qg4 h5 24.Qh3 Nxd4 $17 { -1.65/20 } ) 22.hxg5 g6 $4 $18 { +15.13/22 } ( { Excellent is } 22...Nf5 23.b5 Bxd4 24.Rh1 Nh6 25.gxh6 g6 $14 { +0.89/19 } ) ( { Also playable is } 22...Bxd4 23.Rh1 f5 24.gxf6 Rxf6 25.Qh8+ Kf7 $16 { +1.64/19 } ) ( { White is threatening } 22...-- 23.Rh1 f5 24.exf6 Ng6 25.Qxg6 Rxf6 26.gxf6 { +20.02/24 } ) 23.Qh6 Nf5 24.Nxf5 $8 gxf5 25.Rh1 f6 26.gxf6 Kf7 27.Qh5+ Kg8 28.Qg6+ Qg7 29.Qxg7# 1-0
[/pgn]
brtzsnr
Posts: 433
Joined: Fri Jan 16, 2015 4:02 pm

Re: help me analyze a game

Post by brtzsnr »

Even at higher depths the engine still doesn't see the white advante. I'll have to figure out which moves are wrongly reduced.

Code: Select all

position fen r4rk1/1p1qnpp1/pb2p3/3pP1pQ/bPpN1P1P/B1P3P1/3P2K1/2R2R2 w - - 0 22
go infinite
info depth 0 seldepth 0 score cp -453 nodes 5 time 0 nps 5844 pv h5g5
info depth 1 seldepth 1 score cp -453 nodes 97 time 50 nps 1902 pv h5g5
info depth 2 seldepth 2 score cp -451 nodes 398 time 63 nps 6219 pv h5g5 d7c7
info depth 3 seldepth 3 score cp -434 nodes 2221 time 71 nps 31262 pv h5g5 e7c6 b4b5
info depth 4 seldepth 4 score cp -459 nodes 8464 time 76 nps 110979 pv h5g5 f8e8 g2h2 g8f8
info depth 5 seldepth 6 score cp -436 nodes 18684 time 85 nps 219371 pv h5g5 f8e8 g5h5 g8f8 h5h8 e7g8
info depth 6 seldepth 8 score cp -449 nodes 35988 time 99 nps 361636 pv h5g5 f8e8 g2h2 g8f8 c1e1 e8c8
info depth 7 seldepth 8 score cp -434 nodes 73681 time 128 nps 574111 pv h5g5 f8e8 g2h2 g8f8 c1e1 a8c8 f4f5 e6f5 d4f5 e7f5 f1f5
info depth 8 seldepth 8 score cp -423 nodes 247197 time 239 nps 1031706 pv h5g5 f8c8 b4b5 e7f5 d4f5 e6f5 b5a6 b7a6
info depth 9 seldepth 10 score cp -421 nodes 557009 time 421 nps 1322488 pv h5g5 f8e8 g2h2 b6d4 c3d4 e7c6 a3b2 c6b4 b2a3
info depth 10 seldepth 10 score cp -371 nodes 1829740 time 1143 nps 1600684 pv h4g5 e7g6 f1h1 f8c8 b4b5 b6c5 a3c5 c8c5 b5a6 b7a6
info depth 11 seldepth 11 score cp -343 nodes 3003426 time 1810 nps 1658827 pv h4g5 e7g6 f1h1 f8c8 b4b5 b6c5 a3c5 c8c5 b5a6 b7a6 c1b1
info depth 12 seldepth 13 score cp -354 nodes 4079939 time 2405 nps 1695965 pv h4g5 e7g6 f1h1 f8c8 b4b5 b6c5 a3c5 c8c5 b5a6 b7a6 h5h7 g8f8 c1b1
info depth 13 seldepth 14 score cp -297 nodes 8716398 time 4964 nps 1755873 pv h4g5 e7g6 f1h1 f8c8 b4b5 b6c5 d4c6 c8c6 b5c6 d7c6 a3c5 c6c5 c1b1
info depth 14 seldepth 14 score cp -299 nodes 13957214 time 7830 nps 1782316 pv h4g5 e7g6 f1h1 f8c8 b4b5 b6c5 d4c6 c8c6 b5c6 d7c6 a3c5 c6c5 c1b1 a4b3
info depth 15 seldepth 19 score cp -61 nodes 188912985 time 115732 nps 1632326 pv h4g5 e7g6 f1h1 f8c8 f4f5 e6f5 h5h7 g8f8 e5e6 f7e6 h7g6 b6d4 h1h8 f8e7 b4b5 c8c5 a3c5
info depth 16 seldepth 20 score cp -291 nodes 439104162 time 267396 nps 1642148 pv h4g5 f8c8 f1h1 e7g6 h5h7 g8f8 b4b5 b6c5 d4c6 c8c6 b5c6 d7c6 a3c5 c6c5 g2f3 a8e8 c1b1 a4b3
Ferdy wrote:That knight was tempting, this is common for most engines to fall on that trap not just your engine.
Probably you could raise your threat eval a little bit. It seems to me the issue is about attack and not about defense. From what I have observed, it is always better to make the engine feel the danger. But the problem was the engine was offered by a material, it is probably beyond the engine's ability to refuse that knight. It is good to see the log of that game. If you look on some of those positions it is clear that the queen has a lot of attacked squares on black's king camp. When the h-file was opened, the engine should also consider the rook may join in in the attack. Did your engine has such an eval?

Analysis from sf6 at 2 threads and 2s/pos.

[pgn]
[Event "FICS rated blitz game"]
[Site "FICS freechess.org"]
[Date "????.??.??"]
[Round "?"]
[White "Geforce"]
[Black "zurichess(C)"]
[Result "1-0"]
[Annotator "stockfish 6 (2.0s/pos)"]
[BlackElo "2075"]
[ECO "B01"]
[TimeControl "300+1"]
[WhiteElo "1975"]

1.e4 d5 2.e5 c5 3.Bb5+ Bd7 4.Be2 Nc6 5.f4 Nd4 6.c3 Nxe2 7.Qxe2 c4 8.Na3 e6 9.Nc2 Bc5 $1 10.Nf3 Ne7 $1 11.Ncd4 O-O $1 12.b4 Bb6 13.a4 Ng6 14.g3 a6 $15 { -0.34/20 } ( { Better is } 14...Bxd4 15.Nxd4 f6 16.exf6 Qxf6 17.O-O e5 $15 { -0.52/23 } ) ( { Also playable is } 14...f6 15.O-O Qe8 16.a5 Bxd4+ 17.cxd4 Bb5 $15 { -0.52/23 } ) 15.O-O Ne7 16.Kg2 Qb8 17.Ba3 Qc7 $10 { +0.00/21 } ( { Better is } 17...Re8 18.Bb2 Ba7 19.d3 Rc8 20.Rfd1 cxd3 $10 { -0.17/22 } ) ( { Also playable is } 17...Qd8 18.a5 Bxd4 19.Nxd4 Re8 20.Bb2 h6 $10 { -0.00/22 } ) ( { White is threatening } 17...-- 18.b5 Re8 19.d3 cxd3 20.Qxd3 axb5 21.axb5 { +0.07/21 } ) 18.Rac1 $15 { -0.98/20 } ( { Better is } 18.b5 $1 Rfe8 19.Bd6 Qc8 20.d3 h6 21.Rfb1 $10 { +0.07/21 } ) ( { Also playable is } 18.a5 Bxd4 19.Nxd4 Rfe8 20.Bb2 Nc6 21.Nf3 $10 { +0.00/21 } ) ( { Black is threatening } 18.-- Bxa4 19.b5 axb5 20.f5 Nxf5 21.Nxf5 exf5 { -1.00/20 } ) 18...Bxa4 19.Ng5 $15 { -1.45/21 } ( { Better is } 19.b5 Bxb5 20.Rb1 Qd7 21.Bxe7 Qxe7 22.Nxb5 $15 { -0.96/19 } ) ( { Also playable is } 19.Ra1 Rfe8 20.Rfb1 Bb5 21.Rc1 h6 22.Bb2 $15 { -1.20/19 } ) ( { Black is threatening } 19.-- Rfe8 20.Bb2 Rac8 21.Ra1 Bd7 22.Rfe1 h6 { -1.24/21 } ) 19...Qd7 $15 { -1.23/22 } ( { Better is } 19...Bxd4 20.cxd4 h6 21.Nf3 Rfc8 22.Qe3 Bb5 $15 { -1.48/19 } ) ( { Also playable is } 19...Bb5 20.Qh5 h6 21.Ngf3 Nc6 22.Rfe1 Nxd4 $15 { -1.25/19 } ) 20.Qh5 h6 $8 21.h4 $17 { -2.32/21 } ( { Better is } 21.Ngf3 Bb5 22.Ra1 Nc6 23.Rfc1 Bxd4 24.Nxd4 $15 { -1.26/19 } ) ( { Also playable is } 21.Nh3 Bxd4 22.cxd4 Nc6 23.b5 axb5 24.Bxf8 $17 { -2.05/19 } ) ( { Black is threatening } 21.-- hxg5 22.b5 Bxd4 23.cxd4 axb5 24.Bc5 b6 { -3.99/19 } ) 21...hxg5 $4 $14 { +1.35/20 } ( { Superior is } 21...Bxd4 $1 22.cxd4 Nf5 23.Nf3 Qe7 24.Ra1 b5 $17 { -2.39/20 } ) ( { Also playable is } 21...Nf5 22.Ngf3 g6 23.Qg4 h5 24.Qh3 Nxd4 $17 { -1.65/20 } ) 22.hxg5 g6 $4 $18 { +15.13/22 } ( { Excellent is } 22...Nf5 23.b5 Bxd4 24.Rh1 Nh6 25.gxh6 g6 $14 { +0.89/19 } ) ( { Also playable is } 22...Bxd4 23.Rh1 f5 24.gxf6 Rxf6 25.Qh8+ Kf7 $16 { +1.64/19 } ) ( { White is threatening } 22...-- 23.Rh1 f5 24.exf6 Ng6 25.Qxg6 Rxf6 26.gxf6 { +20.02/24 } ) 23.Qh6 Nf5 24.Nxf5 $8 gxf5 25.Rh1 f6 26.gxf6 Kf7 27.Qh5+ Kg8 28.Qg6+ Qg7 29.Qxg7# 1-0
[/pgn]
Dann Corbit
Posts: 12870
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: help me analyze a game

Post by Dann Corbit »

By this position, the game is lost:
[d]r4rk1/1p1qnpp1/pb2p3/3pP1PQ/bPpN1P2/B1P3P1/3P2K1/2R2R2 b - -

At this position:
[d]r4rk1/1p1qnpp1/pb2p2p/3pP1NQ/bPpN1P1P/B1P3P1/3P2K1/2R2R2 b - -
am hxg5;
bm Bxd4;

I suspect that the problem is king safety.
Just think of it as a player. The queen is right in your front yard.
Do you want to punch a hole in the king's cover right now?
Ferdy
Posts: 4856
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: help me analyze a game

Post by Ferdy »

[d]r4rk1/1p1qnpp1/pb2p3/3pP1pQ/bPpN1P1P/B1P3P1/3P2K1/2R2R2 w - - 0 22

Code: Select all

Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
Cores: Physical = 4, Logical = 8
Physical Memory: Total = 12 GB, Available = 7 GB

id name Deuterium v2015.1.35.230
Hash: 256 MB, Threads: 1, MultiPV: 1, AllocTime: 1.0m

FEN: r4rk1/1p1qnpp1/pb2p3/3pP1pQ/bPpN1P1P/B1P3P1/3P2K1/2R2R2 w - - 0 22

  +1.17/21  00m:48s   22. hxg5 Nf5 23. Rh1 Nh6 24. gxh6 g6 25. Qg5 
  +1.25/20  00m:39s   22. hxg5 Nf5 23. Rh1 Nh6 24. gxh6 g6 25. Qg5 
  +1.30/19  00m:29s   22. hxg5 Nf5 23. Rh1 Nh6 24. gxh6 g6 25. Qg5 
  +1.43/18  00m:22s   22. hxg5 f5 23. gxf6 Qe8 24. Qg4 Ng6 25. fxg7 
  +1.57/17  00m:21s   22. hxg5 Ng6 23. Rh1 Rfc8 24. f5 exf5 25. b5 
  +0.07/16  00m:05s   22. hxg5 f5 23. exf6 Qe8 24. Qxe8 Rfxe8 25. fxe7 
  -0.71/15  00m:02s   22. hxg5 Ng6 23. b5 Rfc8 24. f5 exf5 25. Rh1 
  -1.34/14  00m:01s   22. hxg5 Ng6 23. b5 Rfc8 24. f5 exf5 25. Rh1 
  -2.04/13  00m:00s   22. hxg5 Ng6 23. b5 Rfc8 24. Rh1 Bc5 25. Bxc5 
  -1.93/12  00m:00s   22. hxg5 Ng6 23. b5 Rfc8 24. Rh1 Bc5 25. Bxc5 
  -1.93/11  00m:00s   22. hxg5 Ng6 23. b5 Rfc8 24. Rh1 Bc5 25. Bxc5 
  -1.78/10  00m:00s   22. hxg5 Ng6 23. b5 Rfc8 24. Rh1 Bc5 25. Bxc5 
  -2.39/09  00m:00s   22. hxg5 Ng6 23. b5 Rfc8 24. Rh1 Bc5 25. Bxc5 
  -4.25/08  00m:00s   22. fxg5 g6 23. Qh6 Bxd4 24. cxd4 Nf5 25. Rxf5 
  -4.34/07  00m:00s   22. fxg5 Bxd4 23. cxd4 Nf5 24. Ra1 Bb5 25. Bb2 
  -4.39/06  00m:00s   22. b5 gxf4 23. bxa6 Rxa6 24. Bxe7 Qxe7 25. Rxf4 
  -3.79/05  00m:00s   22. fxg5 Qc7 23. b5 Bxb5 24. Nxb5 axb5 25. Ra1 
  -4.43/04  00m:00s   22. fxg5 Bxd4 23. cxd4 Nf5 24. g6 
  -4.63/03  00m:00s   22. fxg5 
  -4.33/02  00m:00s   22. fxg5 Ng6 
  -3.19/01  00m:00s   22. fxg5 
Ferdy
Posts: 4856
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: help me analyze a game

Post by Ferdy »

CDrill without king attack knowledge, without king shelter eval and without piece threat eval has no idea what is going on in the position.

[d] r4rk1/1p1qnpp1/pb2p3/3pP1pQ/bPpN1P1P/B1P3P1/3P2K1/2R2R2 w - - 0 22

Code: Select all

id name CDrill 1700
Hash: 256 MB, Threads: 1, MultiPV: 1, AllocTime: 2.0m

FEN: r4rk1/1p1qnpp1/pb2p3/3pP1pQ/bPpN1P1P/B1P3P1/3P2K1/2R2R2 w - - 0 22

  -3.09/10  01m:42s   22. hxg5 Ng6 23. Rh1 Rfc8 24. b5 
  -3.08/09  00m:36s   22. hxg5 Ng6 23. Rh1 Rfc8 24. Qh7+ 
  -2.96/08  00m:07s   22. hxg5 Ng6 23. Rh1 Rfc8 24. Qh7+ 
  -3.29/07  00m:02s   22. hxg5 g6 23. Qh2 Rfe8 24. Rh1 
  -3.44/06  00m:00s   22. hxg5 g6 23. Qh2 a5 24. Rh1 
  -3.48/05  00m:00s   22. Qxg5 Rae8 23. g4 Nc6 24. b5 
  -3.44/04  00m:00s   22. Qxg5 Rae8 23. g4 Nc6 
  -3.50/03  00m:00s   22. Qxg5 Nc6 23. b5 
  -3.47/02  00m:00s   22. Qxg5 Nc6 
  -3.55/01  00m:00s   22. Qxg5