Draw by stalemate (Campbell, easy position for engines).

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

Moderators: hgm, Rebel, chrisw

User avatar
Ajedrecista
Posts: 1968
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Draw by stalemate (Campbell, easy position for engines).

Post by Ajedrecista »

Hello!

Just by chance, I arrived to this problem composed by M.J. Campbell:

[d]8/1p6/1P1p4/1K1p2B1/P2P4/6pp/1P6/5k2 w - -

(The text below the chessboard can be translated as 'White to play and draw').

This position is very easy for engines, although I want to note a common pattern: engines give total losing evals for white (such as -7) and suddenly there is an explosion of 0 evals with the correct move Bd2. I just wanted to share it.

Komodo is the slowest engine (by far) among the several ones I tried. In particular, Komodo 3 was blind after more than 70 million nodes:
FEN: 8/1p6/1P1p4/1K1p2B1/P2P4/6pp/1P6/5k2 w - - 0 1

Komodo3-32:
1 00:00 37 1.184 -3,49 Bg5f4 g3g2
2 00:00 92 2.944 -2,84 Bg5f4 g3g2 Bf4h2
3 00:00 149 4.768 -2,97 Bg5f4 g3g2 Bf4h2 Kf1f2
4 00:00 231 7.392 -2,87 Bg5f4 g3g2 Bf4h2 Kf1f2 b2b3
5 00:00 299 9.568 -3,03 Bg5f4 g3g2
5 00:00 892 28.544 -3,09 Bg5f4 h3h2 Bf4xg3 h2h1Q Bg3xd6 Qh1e4 Kb5c5 Kf1e2
5 00:00 989 31.648 -3,09 Bg5f4 h3h2 Bf4xg3 h2h1Q Bg3xd6 Qh1e4 Kb5c5 Kf1e2
6 00:00 1.386 29.568 -3,25 Bg5f4 g3g2
6 00:00 1.627 34.709 -3,72 Bg5f4 g3g2
6 00:00 1.937 41.322 -4,19 Bg5f4 g3g2 Bf4h2 g2g1Q Bh2xg1 Kf1xg1 a4a5 h3h2 a5a6 b7xa6+ Kb5xa6 h2h1Q
6 00:00 2.138 45.610 -4,19 Bg5f4 g3g2 Bf4h2 g2g1Q Bh2xg1 Kf1xg1 a4a5 h3h2 a5a6 b7xa6+ Kb5xa6 h2h1Q
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1Q b6b7 g3g2 b7b8Q g2g1Q Qb8xd6 Qg1d1 Qd6c5 Qh1e4 Bf4c7 Qd1b3 Qc5b6 Qe4e8+ Kc6b7 Qb3xb6+ Bc7xb6 Qe8b5 b2b3 Kf2e3 b3b4 Ke3d3 Kb7a7 Kd3c4 Bb6c5 Qb5c6 Bc5b6
21 03:28 58.764.684 281.908 -5,00 Bg5f4 g3g2
21 03:43 63.226.872 282.696 -5,47 Bg5f4 g3g2
21 04:12 70.862.266 280.538 -4,99 Bg5d2
21 04:13 70.958.255 280.536 0,00 Bg5d2 g3g2 Bd2a5 g2g1Q b2b4 Qg1xd4
21 04:13 70.967.468 280.538 0,00 Bg5d2 g3g2 Bd2a5 g2g1Q b2b4 Qg1xd4
22 04:13 70.992.580 280.551 0,00 Bg5d2 g3g2 Bd2a5 g2g1Q b2b4 Qg1xd4
22 04:13 71.034.016 280.541 0,00 Bg5d2 g3g2 Bd2a5 g2g1Q b2b4 Qg1xd4
23 04:13 71.062.229 280.583 0,00 Bg5d2 g3g2 Bd2a5 g2g1Q b2b4 Qg1xd4
23 04:14 71.288.852 280.612 0,00 Bg5d2 g3g2 Bd2a5 g2g1Q b2b4 Qg1xd4
24 04:14 71.320.071 280.649 0,00 Bg5d2 g3g2 Bd2a5 g2g1Q b2b4 Qg1xd4
24 04:15 71.655.722 280.744 0,00 Bg5d2 g3g2 Bd2a5 g2g1Q b2b4 Qg1xd4
25 04:15 71.718.311 280.800 0,00 Bg5d2 g3g2 Bd2a5 g2g1Q b2b4 Qg1xd4
25 04:18 72.604.197 280.833 0,00 Bg5d2 g3g2 Bd2a5 g2g1Q b2b4 Qg1xd4
26 04:18 72.657.061 280.868 0,00 Bg5d2 g3g2 Bd2a5 g2g1Q b2b4 Qg1xd4
Once Bd2 was found by Komodo 3, then the explosion of 0 evals comes... the same than the rest of engines. Depending on the engine, black first suggested move is 1.- ..., g2, 1.- ..., h2 or 1.- ..., Kf2.

The key moves for white side are 1.- Bd2, 2.- Ba5 and 3.- b4, looking for the stalemate and consequent draw.

Regards from Spain.

Ajedrecista.
Dan Astrachan
Posts: 134
Joined: Fri May 28, 2010 11:07 am

Re: Draw by stalemate (Campbell, easy position for engines).

Post by Dan Astrachan »

Critter 1.6 only took 3 seconds to detect it on my laptop:

Code: Select all

 16/40+	00:03	   9 976 097	3 351 057	-7,05	1.Bd2 h2 2.Ba5 h1Q 3.b4 Qh7
 16/40	00:03	   9 990 618	3 239 500	 0,00	1.Bd2 h2 2.Ba5 h1Q 3.b4 Qh7
Computer used: Intel Core i7 875K @ 2.93GH, 4 cores, 12 Gb of RAM
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Draw by stalemate (Campbell, easy position for engines).

Post by lucasart »

Way too easy for DiscoCheck. Solved in 138 milliseconds:

Code: Select all

info score cp -112 depth 16 nodes 310855 time 137 lowerbound
info score cp -25 depth 16 nodes 315749 time 138 pv g5d2
info score cp -25 depth 17 nodes 324781 time 141 pv g5d2
info score cp -25 depth 18 nodes 340547 time 146 pv g5d2
info score cp -25 depth 19 nodes 362393 time 152 pv g5d2
info score cp -25 depth 20 nodes 383260 time 159 pv g5d2
info score cp -25 depth 21 nodes 411901 time 168 pv g5d2
info score cp -25 depth 22 nodes 441100 time 178 pv g5d2
info score cp -25 depth 23 nodes 499989 time 200 pv g5d2
info score cp -25 depth 24 nodes 558341 time 223 pv g5d2
info score cp -25 depth 25 nodes 704771 time 283 pv g5d2
info score cp -25 depth 26 nodes 853693 time 341 pv g5d2
etc...
-25 means draw (contempt value)

By the way it's a very clever trick. I would never have found it myself, without the help of the computer. The idea is to play Bd2 followed by Ba5 and b4, and white "stalemates himself".
In the meantime, black can make a couple of queens, he still can't prevent white from stalemating himself.
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
User avatar
Ajedrecista
Posts: 1968
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: Draw by stalemate (Campbell, easy position for engines).

Post by Ajedrecista »

Hello:
Dan Astrachan wrote:Critter 1.6 only took 3 seconds to detect it on my laptop:

Code: Select all

 16/40+	00:03	   9 976 097	3 351 057	-7,05	1.Bd2 h2 2.Ba5 h1Q 3.b4 Qh7
 16/40	00:03	   9 990 618	3 239 500	 0,00	1.Bd2 h2 2.Ba5 h1Q 3.b4 Qh7
I tried several engines and times to reach the solution of 2, 3 or 5 seconds were normal... I warned that this position is easy for engines in the title of the thread, but I shared it for three reasons:

a) To point out the common behaviour of a wide variety of engines: totally losing evals (-6, -7, -8...) and suddenly a fast sequence of drawn evals. I am not used to see those huge eval jumps, and less in many different engines.

b) To point out the noticeable slowness of Komodo. I do not know if the last revision will handle this composition correctly.

c) The beauty of the problem itself. It is needless to say that I did not solve it on my own.

Regards from Spain.

Ajedrecista.
JVMerlino
Posts: 1357
Joined: Wed Mar 08, 2006 10:15 pm
Location: San Francisco, California

Re: Draw by stalemate (Campbell, easy position for engines).

Post by JVMerlino »

lucasart wrote:Way too easy for DiscoCheck. Solved in 138 milliseconds:

Code: Select all

info score cp -112 depth 16 nodes 310855 time 137 lowerbound
info score cp -25 depth 16 nodes 315749 time 138 pv g5d2
info score cp -25 depth 17 nodes 324781 time 141 pv g5d2
info score cp -25 depth 18 nodes 340547 time 146 pv g5d2
info score cp -25 depth 19 nodes 362393 time 152 pv g5d2
info score cp -25 depth 20 nodes 383260 time 159 pv g5d2
info score cp -25 depth 21 nodes 411901 time 168 pv g5d2
info score cp -25 depth 22 nodes 441100 time 178 pv g5d2
info score cp -25 depth 23 nodes 499989 time 200 pv g5d2
info score cp -25 depth 24 nodes 558341 time 223 pv g5d2
info score cp -25 depth 25 nodes 704771 time 283 pv g5d2
info score cp -25 depth 26 nodes 853693 time 341 pv g5d2
etc...
-25 means draw (contempt value)

By the way it's a very clever trick. I would never have found it myself, without the help of the computer. The idea is to play Bd2 followed by Ba5 and b4, and white "stalemates himself".
In the meantime, black can make a couple of queens, he still can't prevent white from stalemating himself.
Yes, my not-at-all-good engine Myrddin found the answer in 0.18 seconds at depth 12. Thanks for the confidence booster! :-)

jm
Michel
Posts: 2272
Joined: Mon Sep 29, 2008 1:50 am

Re: Draw by stalemate (Campbell, easy position for engines).

Post by Michel »

14ms for GNU Chess Dev!

Code: Select all

info depth 9 seldepth 11 time 14 nodes 15502 nps 1041381 tbhits 0 score cp 0 pv g5d2 h3h2 d2a5 h2h1q b2b4 f1e2
info depth 10 seldepth 13 time 15 nodes 16747 nps 1051947 tbhits 0 score cp 0 pv g5d2 h3h2 d2a5 h2h1q b2b4 f1e2
info depth 11 seldepth 14 time 21 nodes 19049 nps 873166 tbhits 0 score cp 0 pv g5d2 h3h2 d2a5 h2h1q b2b4 f1e2
tmokonen
Posts: 1296
Joined: Sun Mar 12, 2006 6:46 pm
Location: Kelowna
Full name: Tony Mokonen

Re: Draw by stalemate (Campbell, easy position for engines).

Post by tmokonen »

This is one of those weird positions where a weak engine with little or no pruning might find a solution more quickly than a strong engine with aggressive pruning. It took my weak program Tony's Chess all of 130ms on a not particularly powerful CPU to find the draw, at a root depth of 7 ply.