interesting tactical position

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

jdart
Posts: 4366
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

interesting tactical position

Post by jdart »

This came up while I was doing some testing in reduced-strength mode, so was analyzing some games with limited-depth searches:

[D] 3r1k2/1p4p1/pRB2p2/P1P1p2p/4P3/2P1BbPP/5P1K/2Rr4 b - - 0 1

Arasan had just played the losing move Rc1. How long to see that Black has a forced mate after Rxc1? It is not a deep mate, but what I see is that Arasan keeps pruning away the quiet moves, partly because Black has the Bishop-winning move bxc6. But some of the quiet moves are the key moves to the mate. Static null pruning seems to be the main culprit.

Eventually it does get the right idea but seeing the forced mate takes until ply 11. Seems bad, although in a real game in full-strength mode, ply 11 comes so fast the delay doesn't matter.

--Jon
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: interesting tactical position

Post by bob »

jdart wrote:This came up while I was doing some testing in reduced-strength mode, so was analyzing some games with limited-depth searches:

[D] 3r1k2/1p4p1/pRB2p2/P1P1p2p/4P3/2P1BbPP/5P1K/2Rr4 b - - 0 1

Arasan had just played the losing move Rc1. How long to see that Black has a forced mate after Rxc1? It is not a deep mate, but what I see is that Arasan keeps pruning away the quiet moves, partly because Black has the Bishop-winning move bxc6. But some of the quiet moves are the key moves to the mate. Static null pruning seems to be the main culprit.

Eventually it does get the right idea but seeing the forced mate takes until ply 11. Seems bad, although in a real game in full-strength mode, ply 11 comes so fast the delay doesn't matter.

--Jon
Takes Crafty to depth=10, so that doesn't seem far off to take 11. One more reduction or one less extension, etc.

9-> 0.02 -2.85 1. ... Rxc1 2. g4 Rg1 3. Bd5 Rg2+ 4. Kh1
Rxg4+ 5. Kh2 Rg2+ 6. Kh1 Rxf2+
10 0.03 -Mat05 1. ... Rxc1 2. g4 h4 3. Rb1 Rxb1 4. Bc1
Rxc1 5. Bxb7 Rh1#
10-> 0.03 -Mat05 1. ... Rxc1 2. g4 h4 3. Rb1 Rxb1 4. Bc1
Rxc1 5. Bxb7 Rh1#
11 0.04 -Mat05 1. ... Rxc1 2. g4 h4 3. Rb1 Rxb1 4. Bc1
Rxc1 5. Bxb7 Rh1#
11-> 0.04 -Mat05 1. ... Rxc1 2. g4 h4 3. Rb1 Rxb1 4. Bc1
Rxc1 5. Bxb7 Rh1#
12 0.04 -Mat05 1. ... Rxc1 2. g4 h4 3. Rb1 Rxb1 4. Bc1
Rxc1 5. Bxb7 Rh1#
12-> 0.04 -Mat05 1. ... Rxc1 2. g4 h4 3. Rb1 Rxb1 4. Bc1
Rxc1 5. Bxb7 Rh1#
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: interesting tactical position

Post by Ferdy »

[d]3r1k2/1p4p1/pRB2p2/P1P1p2p/4P3/2P1BbPP/5P1K/2Rr4 b - - 0 1
CDrill has no null move pruning, get it at 9. Its estimated rating is 1850 based on CCRL 40/4.

Code: Select all

id name CDrill 1850
id author Ferdinand Mosca
option name Hash type spin default 64 min 8 max 2048
option name Log type check default false
option name Ponder type check default false
option name RepetitionScore type spin default 0 min -500 max 500
option name MultiPV type spin default 1 min 1 max 300
option name ClearHash type button
uciok
position fen 3r1k2/1p4p1/pRB2p2/P1P1p2p/4P3/2P1BbPP/5P1K/2Rr4 b - - 0 1
go movetime 5000
info depth 1 seldepth 7 score cp -236 time 0 nodes 67 nps 0 pv d1c1 e3c1 b7c6 b6 c6
info depth 2 seldepth 7 score cp -236 time 16 nodes 242 nps 15125 pv d1c1 e3c1 b7c6 b6c6
info depth 3 seldepth 7 score cp -236 time 31 nodes 936 nps 30193 pv d1c1 e3c1 b7c6 b6c6
info depth 4 seldepth 10 score cp -236 time 47 nodes 3028 nps 64425 pv d1c1 e3c1 b7c6 b6c6
info depth 5 seldepth 10 score cp -103 time 78 nodes 12919 nps 165628 pv d1c1 e3c1 d8d1 g3g4 b7c6
info depth 6 seldepth 12 score cp -109 time 125 nodes 35065 nps 280520 pv d1c1 e3c1 d8d1 g3g4 b7c6 c1e3
info depth 7 seldepth 14 score cp 911 time 343 nodes 146104 nps 425959 pv d1c1 g3g4 h5h4 b6b1 c1b1 e3c1 b7c6
info depth 8 seldepth 17 score cp 1031 time 671 nodes 361536 nps 538801 pv d1c1 g3g4 h5h4 b6b1 c1b1 e3c1 b7c6 c1e3 f3e4
info depth 9 seldepth 17 score mate 5 time 1903 nodes 1101955 nps 579062 pv d1c1 g3g4 h5h4 b6b1 c1b1 e3c1 b1c1 c6b7 c1h1
bestmove d1c1
Joost Buijs
Posts: 1563
Joined: Thu Jul 16, 2009 10:47 am
Location: Almere, The Netherlands

Re: interesting tactical position

Post by Joost Buijs »

jdart wrote:This came up while I was doing some testing in reduced-strength mode, so was analyzing some games with limited-depth searches:

[D] 3r1k2/1p4p1/pRB2p2/P1P1p2p/4P3/2P1BbPP/5P1K/2Rr4 b - - 0 1

Arasan had just played the losing move Rc1. How long to see that Black has a forced mate after Rxc1? It is not a deep mate, but what I see is that Arasan keeps pruning away the quiet moves, partly because Black has the Bishop-winning move bxc6. But some of the quiet moves are the key moves to the mate. Static null pruning seems to be the main culprit.

Eventually it does get the right idea but seeing the forced mate takes until ply 11. Seems bad, although in a real game in full-strength mode, ply 11 comes so fast the delay doesn't matter.
--Jon
Nightmare on 1 core finds it at depth 8, possibly because Nightmare prunes less and extends more than nowadays is common practice.

Code: Select all

info depth 1 score cp -51 time 0 nodes 293 nps 293 tbhits 0 pv b7c6 b6c6 f3e4
info depth 2 score cp -51 time 1 nodes 353 nps 353000 tbhits 0 pv b7c6 b6c6 f3e4 c6a6
info depth 3 score cp -51 time 1 nodes 493 nps 493000 tbhits 0 pv b7c6 b6c6 f3e4 c6a6 e4b7
info depth 4 score cp -51 time 3 nodes 1325 nps 441666 tbhits 0 pv b7c6 b6c6 f3e4 c6a6 e4b7
info depth 5 score cp -51 time 4 nodes 1887 nps 471750 tbhits 0 pv b7c6 b6c6 f3e4 c6a6 e4b7
info depth 6 score cp -97 time 7 nodes 5847 nps 835285 tbhits 0 pv b7c6 b6c6 f3e4 c6a6 e4b7 a6b6
info depth 7 score cp -22 time 12 nodes 16242 nps 1353500 tbhits 0 pv b7c6 b6a6 f3e4 a6b6 d1c1 e3c1 e4f3
info depth 8 score mate 5 time 25 nodes 38564 nps 1542560 tbhits 0 pv d1c1 g3g4 h5h4 b6b1 c1b1 e3c1 b1c1 c6b7 c1h1
info depth 9 score mate 5 time 27 nodes 40682 nps 1506740 tbhits 0 pv d1c1 g3g4 h5h4 b6b1 c1b1 e3c1 b1c1 c6b7 c1h1
info depth 10 score mate 5 time 30 nodes 45186 nps 1506200 tbhits 0 pv d1c1 g3g4 h5h4 b6b1 c1b1 e3c1 b1c1 c6b7 c1h1
User avatar
cdani
Posts: 2204
Joined: Sat Jan 18, 2014 10:24 am
Location: Andorra

Re: interesting tactical position

Post by cdani »

Andscacs 0.80 at d9:

Code: Select all

pf 3r1k2/1p4p1/pRB2p2/P1P1p2p/4P3/2P1BbPP/5P1K/2Rr4 b - - 0 1
15
info depth 1 seldepth 11 score cp -145 nodes 525 nps 30882 time 17 pv b7c6 b6c6 f8e7
info depth 2 seldepth 12 score cp -159 nodes 1037 nps 49380 time 21 pv b7c6 b6c6 f8e7 c1d1 d8d1 c6c7 e7e6
info depth 2 currmove d8d7 currmovenumber 27
info depth 3 seldepth 9 score cp -159 nodes 1196 nps 42714 time 28 pv b7c6 b6c6 f8e7 c1d1 d8d1 c6c7
info depth 4 seldepth 15 score cp -165 nodes 3373 nps 102212 time 33 pv b7c6 b6c6 f8e7 c6a6 d1c1 e3c1 f3e4 c1b2 d8d1 a6a7 d1d7
info depth 5 currmove b7c6 currmovenumber 1
info depth 5 seldepth 16 score cp 0 nodes 8280 nps 197142 time 42 pv b7c6 c1d1 d8d1 g3g4 h5g4 h3g4 f3e4 b6a6 d1h1 h2g3 h1g1 g3h3
info depth 6 seldepth 16 score cp 0 nodes 9266 nps 201434 time 46 pv b7c6 c1d1 d8d1 g3g4 h5g4 h3g4 f3e4 b6a6 d1h1 h2g3 h1g1 g3h3 g1h1 h3g3
info depth 7 currmove b7c6 currmovenumber 1
info depth 7 seldepth 18 score cp 0 nodes 15264 nps 272571 time 56 pv b7c6 g3g4 h5g4 c1d1 d8d1 h3g4 f3e4 b6a6 d1h1 h2g3 h1g1 g3h3 g1h1 h3g3
info depth 7 seldepth 18 score cp 0 nodes 18331 nps 295661 time 62 pv d1c1 e3c1 d8d1 g3g4 b7c6 c1b2 h5g4 h3g4 f3e4 b6a6 d1h1 h2g3 h1g1 g3h3 g1h1 h3g3
info depth 8 currmove d1c1 currmovenumber 1
info depth 8 seldepth 19 score cp 1607 nodes 41409 nps 504987 time 82 pv d1c1 b6b1 c1b1 e3c1 b7c6 c3c4 b1c1 g3g4 h5g4 h3g4 f3e4 g4g5 f6g5 h2g3
info depth 9 seldepth 16 score mate 5 nodes 49702 nps 540239 time 92 pv d1c1 b6b1 c1b1 e3c1 d8d1 g3g4 h5h4 c1e3 d1h1
Note the "pf" instead of "position fen" and 15 instead of "go depth 15". I think those are interesting additions to UCI to save some typing.
brtzsnr
Posts: 433
Joined: Fri Jan 16, 2015 4:02 pm

Re: interesting tactical position

Post by brtzsnr »

Doesn't look particularly hard, but after depth 4 I can see score swings with zurichess.

Code: Select all

position fen 3r1k2/1p4p1/pRB2p2/P1P1p2p/4P3/2P1BbPP/5P1K/2Rr4 b - - 0 1
go depth 12
info depth 0 score cp -190 nodes 119 time 0 nps 288966 pv b7c6 c1d1 d8d1 b6c6 f3e4 c6a6
info depth 1 score cp -190 nodes 243 time 5 nps 42266 pv b7c6 c1d1 d8d1 b6c6 f3e4 c6a6
info depth 2 score cp -190 nodes 593 time 52 nps 11366 pv b7c6 c1d1 d8d1 b6c6 f3e4 c6a6
info depth 3 score cp -190 nodes 2102 time 63 nps 33346 pv b7c6 c1d1 d8d1 b6c6 f3e4 c6a6
info depth 4 score cp -190 nodes 5061 time 68 nps 74384 pv b7c6 c1d1 d8d1 b6c6 f3e4 c6a6
info depth 5 score cp -138 nodes 19022 time 82 nps 230698 pv d1c1 e3c1 d8d1 g3g4 b7c6
info depth 6 score cp -122 nodes 33892 time 96 nps 352723 pv d1c1 e3c1 b7c6 b6c6 d8a8 c1h6 g7h6 c6f6
info depth 7 score cp -122 nodes 67003 time 125 nps 534894 pv d1c1 e3c1 b7c6 b6c6 d8a8 c1h6 g7h6 c6f6
info depth 8 score cp -92 nodes 178305 time 257 nps 693550 pv d1c1 e3c1 d8d1 g3g4 b7c6 b6b8 f8f7 b8b7 f7e6 c1a3 h5g4 h3g4 f3e4 b7g7
info depth 9 score cp -246 nodes 2187021 time 2564 nps 852841 pv b7c6 c1d1 f3d1 b6c6 d1f3 c6a6 f3e4 c5c6 f8e7
info depth 10 score cp 321 nodes 3510550 time 4023 nps 872595 pv d1c1 g3g4 c1g1 c6d5 g1g2 h2h1 g2g4 h1h2 g4g2 h2h1 g2f2 h1g1 f2g2 g1f1 d8d5 e4d5 f3d5
info depth 11 score cp 29991 nodes 7009951 time 11321 nps 619192 pv d1c1 g3g4 h5h4 b6b1 c1b1 e3c1 b1c1 c6e8 c1h1
info depth 12 score cp 29991 nodes 28482085 time 40783 nps 698372 pv d1c1 g3g4 h5h4 b6b1 c1b1 e3c1 b1c1 c6e8 c1h1
info string uci.go:203: hash: size 8388608, hit 4370291, miss 10446071, ratio 29.50%
bestmove d1c1
Maarten Claessens
Posts: 106
Joined: Mon May 12, 2014 10:08 am
Location: Near Nijmegen

Re: interesting tactical position

Post by Maarten Claessens »

WaDuuttie (conslole mode) sees the forced mate at 11:

Code: Select all

WaDuuttie> sb 3r1k2/1p4p1/pRB2p2/P1P1p2p/4P3/2P1BbPP/5P1K/2Rr4 b - - 0 1

WaDuuttie> on
ply      nodes  score  pv
  1         69    -52  b7c6
  2        163    -52  b7c6 c1d1 d8d1
  3        446    -52  b7c6 c1d1 d8d1 b6c6
  4       1644    -22  b7c6 b6c6 d1d7 c6a6
  5       2905    -52  b7c6 b6c6 d1c1 e3c1 f3e4 c6a6 f8e7
  6       4685    -54  b7c6 b6c6 d1c1 e3c1 f3e4 c6a6 d8d1 c1b2
  7       5611    -42  b7c6!
  7      13697    -28  b7c6 b6c6 d1c1 e3c1 f3e4 c6d6 d8c8 c1a3
  8      25094     20  d1c1!
  8      33093     50  d1c1 e3c1 d8d1 g3g4 b7c6 c1e3 h5g4 h3g4 f3e4 h2g3
  9      45913     98  d1c1!
  9      56388    198  d1c1!
  9      62073    500  d1c1!
  9      76191   1564  d1c1 g3g4 h5h4 b6b1 c1b1 e3c1 b7c6 g4g5 b1c1
 10      76742   1652  d1c1!
 10      79202   1652  d1c1 g3g4 h5h4 b6b1 c1b1 e3c1 b7c6 g4g5 b1c1 g5f6
 11      80187   1676  d1c1!
 11      80602   1852  d1c1!
 11      91796    +M6  d1c1!
 11     104970    +M5  d1c1 g3g4 h5h4 b6b1 c1b1 e3c1 b1c1 c6a4 c1h1
Computer's move: d1c1
Nothing is unstable (Lawrence Krauss)
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: interesting tactical position

Post by Ferdy »

I have this engine designed to play positionally, it can find the best move quickly for positions with mate in 10 or so. Problem is its defense is not optimal.
So instead of mate in 5 it says mate in 3, but the point is it gets the first move right.

[d]3r1k2/1p4p1/pRB2p2/P1P1p2p/4P3/2P1BbPP/5P1K/2Rr4 b - - 0 1

Code: Select all

info string CDrill 1900
info string UCI 32bit version 1.0
uci
id name CDrill 1900
id author Ferdinand Mosca
option name Hash type spin default 64 min 8 max 2048
option name Log type check default false
option name Ponder type check default false
option name RepetitionScore type spin default 0 min -500 max 500
option name MultiPV type spin default 1 min 1 max 300
option name ClearHash type button
uciok
position fen 3r1k2/1p4p1/pRB2p2/P1P1p2p/4P3/2P1BbPP/5P1K/2Rr4 b - - 0 1
go movetime 5000
info depth 1 seldepth 7 score cp -236 time 1 nodes 67 nps 67000 pv d1c1 e3c1 b7c6 b6c6
info depth 2 seldepth 7 score cp -236 time 7 nodes 242 nps 34571 pv d1c1 e3c1 b7c6 b6c6
info depth 3 seldepth 7 score cp -236 time 15 nodes 900 nps 60000 pv d1c1 e3c1 b7c6 b6c6
info depth 4 seldepth 10 score cp -236 time 28 nodes 2887 nps 103107 pv d1c1 e3c1 b7c6 b6c6
info depth 5 seldepth 9 score mate 3 time 65 nodes 11462 nps 176338 pv d1c1 e3c1 d8d1 c6b7 d1h1
bestmove d1c1
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: interesting tactical position

Post by Henk »

10.

Code: Select all

Depth  Value   Time
  1  -15870.00   0.018          64   b7c6 
  2  -16370.00   0.022         236   d1c1 e3c1 
  3  -16460.00   0.024         537   d1c1 e3c1 b7c6 
  4  -18993.00   0.029        1543   d1c1 e3c1 b7c6 b6c6 
  5  -18145.00   0.040        3985   d1c1 e3c1 b7c6 b6c6 f3e4 
  6  -18283.00   0.062        9887   d1c1 e3c1 b7c6 b6c6 f3e4 c6a6 
  7  -18149.00   0.145       30104   d1c1 e3c1 b7c6 b6c6 f3e4 c6a6 f6f5 
  8  -5581.00   0.275       63336   d1c1 e3c1 d8d1 g3g4 b7c6 c1e3 d1h1 h2g3 
  9  -5017.00   0.495      120903   d1c1 e3c1 d8d1 g3g4 b7c6 c1e3 d1h1 h2g3 f3e4 
 10  9999991.00   6.489     1463192   d1c1 e3c1 d8d1 g3g4 h5h4 b6b5 a6b5 c6b7 d1h1 
jordanbray
Posts: 52
Joined: Mon Aug 11, 2014 3:01 am

Re: interesting tactical position

Post by jordanbray »

Got some weird bug with this one.

The Kings Men by Jordan Bray
position fen 3r1k2/1p4p1/pRB2p2/P1P1p2p/4P3/2P1BbPP/5P1K/2Rr4 b - - 0 1
go wtime 10000 btime 10000
info depth 1 seldepth 1 nodes 36 nps 72000 score cp -229 multipv 1 pv b7c6 string optimal time 9999 max. time 9999
info depth 2 seldepth 2 nodes 91 nps 182000 score cp -229 multipv 1 pv b7c6 string optimal time 9999 max. time 9999
info depth 3 seldepth 3 nodes 273 nps 273000 score cp -229 multipv 1 pv b7c6 string optimal time 9999 max. time 9999
info depth 4 seldepth 4 nodes 891 nps 297000 score cp -259 multipv 1 pv b7c6 string optimal time 9999 max. time 9999
info depth 5 seldepth 5 nodes 4578 nps 286125 score cp 384 multipv 1 pv d1c1 string optimal time 9999 max. time 9999
info depth 6 seldepth 6 nodes 2661 nps 147833 score cp 313 multipv 1 pv d1c1 string optimal time 9999 max. time 9999
info depth 7 seldepth 7 nodes 4801 nps 208739 score cp 391 multipv 1 pv d1c1 string optimal time 9999 max. time 9999
info depth 8 seldepth 8 nodes 17580 nps 428780 score cp 493 multipv 1 pv d1c1 string optimal time 9999 max. time 9999
info depth 9 seldepth 9 nodes 28401 nps 443765 score cp 483 multipv 1 pv d1c1 string optimal time 9999 max. time 9999
info depth 10 seldepth 10 nodes 46581 nps 447894 score cp 328 multipv 1 pv d1c1 string optimal time 9999 max. time 9999
info depth 11 seldepth 11 nodes 28045 nps 220826 score cp 270 multipv 1 pv d1c1 string optimal time 9999 max. time 9999
info depth 12 seldepth 12 nodes 668651 nps 852871 score cp 2016 multipv 1 pv d1c1 string optimal time 9999 max. time 9999
info depth 13 seldepth 13 nodes 169510 nps 183452 score mate 5 multipv 1 pv d1c1 string optimal time 9999 max. time 9999
info depth 14 seldepth 14 nodes 277850 nps 244371 score mate 5 multipv 1 pv d1c1 string optimal time 9999 max. time 9999
info depth 15 seldepth 15 nodes 539469 nps 349850 score mate 4 multipv 1 pv d1c1 string optimal time 9999 max. time 9999
info depth 16 seldepth 16 nodes 731425 nps 351815 score mate 4 multipv 1 pv d1c1 string optimal time 9999 max. time 9999
info depth 17 seldepth 17 nodes 1481280 nps 463189 score mate 4 multipv 1 pv d1c1 string optimal time 9999 max. time 9999


Looks like my engine goes crazy at some point and reports a mate in 4...