how much time do programs need to find a forced mate

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

Moderators: hgm, Rebel, chrisw

Uri Blass
Posts: 10309
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: how much time do programs need to find a forced mate

Post by Uri Blass »

Eelco de Groot wrote:
Uri Blass wrote:against part of the pieces

Is there something faster than stockfish?

[D]4k3/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQ - 0 1
[D]4k3/pppppppp/pppppppp/8/8/8/PPPPPPPP/RNBQKBNR w KQ - 0 1

Pawns seem to gain a bit in value if more than eight of them, at least here in your position Uri. My Shredder GUI will not accept the 16 black pawns but Stockfish in "DOS mode"will calculate with it. I don't know if the board is displayed correctly but Black has pawns on both the seventh and sixth row. Stockfish at least with very little hash in default setting can't get through it it seems: score stays at about 3000 centipawns

info depth 34 seldepth 44 multipv 1 score cp 3001 nodes 2150323089 nps 3146424 hashfull 999 tbhits 0 time 683418 pv g2g3 d6d5 f1g2 d5d4 b2b3 e6e5 c1b2 d7d6 e2e3 d4e3 d2e3 f6f5 d1e2 a6a5 b1d2 e7e6 h2h4 f7f6 e2c4 e8e7 c4a4 g6g5 h4h5 d6d5 g1e2 c6c5 h1h2 c7c6 c2c3 e7f7 e1c1 e5e4 c1c2 g7g6 h5g6 f7g6
info depth 35 currmove g2g3 currmovenumber 1

This is a slightly modified development version, bench is:
Nodes searched : 4364134
Stockfish non modified version does not seem to understand this position

FEN: 4k3/pppppppp/pppppppp/8/8/8/PPPPPPPP/RNBQKBNR w KQ - 0 1

Stockfish_17052608_x64_modern:
1/1 00:00 566 283k -M19 1.Nc3
2/2 00:00 858 429k +M0 1.Nc3

It is enough for me.
Not interested in more analysis

against 8 pawns and not 16 pawns I do not see these stupid mate scores at small depths.
User avatar
Eelco de Groot
Posts: 4567
Joined: Sun Mar 12, 2006 2:40 am
Full name:   

Re: how much time do programs need to find a forced mate

Post by Eelco de Groot »

I don't really know what causes it but I don't see it in simple CLI output with my own TDM-GCC compile of development version Stockfish from 05-24. Code is default Stockfish from that date (so only Marco's latest changes not included).

setoption name hash value 512 \n
position fen 4k3/pppppppp/pppppppp/8/8/8/PPPPPPPP/RNBQKBNR w KQ - 0 1
go depth 10
info depth 1 seldepth 1 multipv 1 score cp 3008 nodes 20 nps 10000 tbhits 0 time 2 pv b1c3
info depth 2 seldepth 2 multipv 1 score cp 2995 nodes 69 nps 34500 tbhits 0 time 2 pv b1c3 e8f8
info depth 3 seldepth 3 multipv 1 score cp 3010 nodes 156 nps 52000 tbhits 0 time 3 pv b1c3 d6d5 a1b1
info depth 4 seldepth 4 multipv 1 score cp 3025 nodes 650 nps 216666 tbhits 0 time 3 pv g1f3 e8f8 b1c3 f8g8
info depth 5 seldepth 5 multipv 1 score cp 3038 nodes 1661 nps 415250 tbhits 0 time 4 pv e2e3 e8f8 g1e2 f8g8 b1c3
info depth 6 seldepth 6 multipv 1 score cp 3037 nodes 2972 nps 495333 tbhits 0 time 6 pv b1c3 g6g5 e2e3 e8f8 g1f3 f8g8
info depth 7 seldepth 7 multipv 1 score cp 3035 nodes 9673 nps 879363 tbhits 0 time 11 pv b1c3 e8f8 b2b3 b6b5 c1a3 f8g8 g1f3
info depth 8 seldepth 8 multipv 1 score cp 3039 nodes 17873 nps 992944 tbhits 0 time 18 pv e2e3 d6d5 g1f3 d7d6 f1d3 e8f8 b1c3 e6e5
info depth 9 seldepth 9 multipv 1 score cp 3040 nodes 28737 nps 990931 tbhits 0 time 29 pv e2e3 d6d5 d2d3 d7d6 c1d2 e6e5 g1e2 e5e4 b1c3
info depth 10 seldepth 11 multipv 1 score cp 3036 nodes 41436 nps 1090421 tbhits 0 time 38 pv e2e3 d6d5 d2d3 e6e5 g1e2 e8f8 h1g1 e7e6 b1c3 d7d6 c1d2
bestmove e2e3 ponder d6d5

Running a depth 40 analysis with my slightly changed development version of that date Sf20170524_012 also no strange output at low depth:

setoption name hash value 512 \n
go depth 40
info depth 1 seldepth 1 multipv 1 score cp 3008 nodes 20 nps 10000 tbhits 0 time 2 pv b1c3
info depth 2 seldepth 2 multipv 1 score cp 2995 nodes 69 nps 34500 tbhits 0 time 2 pv b1c3 e8f8
info depth 3 seldepth 3 multipv 1 score cp 3009 nodes 144 nps 48000 tbhits 0 time 3 pv b1c3 h6h5 a1b1
info depth 4 seldepth 4 multipv 1 score cp 3025 nodes 604 nps 120800 tbhits 0 time 5 pv g1f3 e8f8 b1c3 f8g8
info depth 5 seldepth 5 multipv 1 score cp 3007 nodes 1385 nps 277000 tbhits 0 time 5 pv b1c3 e8f8 g1h3 f8g8 d2d4
info depth 6 seldepth 6 multipv 1 score cp 3032 nodes 4371 nps 546375 tbhits 0 time 8 pv d2d3 e8f8 g1f3 d6d5 b1d2 d7d6
info depth 7 seldepth 7 multipv 1 score cp 3037 nodes 8368 nps 760727 tbhits 0 time 11 pv b1c3 f6f5 g1f3 f7f6 d2d3 e8f7 d1d2
info depth 8 seldepth 8 multipv 1 score cp 3039 nodes 15602 nps 917764 tbhits 0 time 17 pv d2d3 e6e5 g1f3 f6f5 b1c3 f7f6 c1e3 e8f7
info depth 9 seldepth 9 multipv 1 score cp 3039 nodes 22009 nps 1000409 tbhits 0 time 22 pv b1c3 f6f5 d2d3 e6e5 g1f3 f7f6 c1d2 e8f7 d2e3
info depth 10 seldepth 10 multipv 1 score cp 3034 nodes 40723 nps 1100621 tbhits 0 time 37 pv b1c3 b6b5 e2e3 b5b4 c3e2 a6a5 d2d4 a5a4 g1f3 e8f8
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
User avatar
Eelco de Groot
Posts: 4567
Joined: Sun Mar 12, 2006 2:40 am
Full name:   

Re: how much time do programs need to find a forced mate

Post by Eelco de Groot »

At depth 40, the result was still unclear, no change from 3000 centipawns.

info depth 40 seldepth 50 multipv 1 score cp 3006 nodes 32773133545 nps 2926628 hashfull 999 tbhits 0 time 11198254 pv e2e3 e6e5 g1e2 d6d5 h2h4 f6f5 c2c3 d7d6 g2g3 e8f8 f1g2 f7f6 d1b3 e7e6 d2d3 f8e7 b3a4 e5e4 d3d4 c6c5 b1d2 e6e5 b2b3 c7c6 c1a3 g6g5 d4e5 d6e5 h4h5 e7f7 a3b2 g7g6 e1c1 f7g7 a4a3 g7f7 d1e1 g6h5 h1h5 f7g6 h5h1
bestmove e2e3 ponder e6e5
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
Dann Corbit
Posts: 12541
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: how much time do programs need to find a forced mate

Post by Dann Corbit »

[d]r2qk3/8/8/8/8/8/PPPPPPPP/RNBQKBNR w KQq - acd 42/58; acs 2940 ; acn 157680116k; ce 32730 ; bm e3; pv e3 Qg5 Qf3 Ra5 Nc3 Kd8 Qb7 Qc5 Bb5 Qc7 Qd5+ Ke7 Qh5 Rxb5 Qh7+ Kd8 Qxc7+ Kxc7 Nxb5+ Kd7 a4 Kc8 a5 Kd7 a6 Kc6 a7 Kxb5 a8Q Kb6 Ra6+ Kc7 Rc6+ Kd7 Qb7+ Kd8 Rc8+;

I am not sure that this one is a mate. It seems to me that the pawns can be set up to support each other to make a pretty impenetrable wall.
[d]4k3/pppppppp/pppppppp/8/8/8/PPPPPPPP/RNBQKBNR w KQ - acd 36/54; acs 2607 ; acn 96319520k; ce -25 ; bm d4; pv d4 exe6 Nf3 c4 d5 cxd5 exd5 Nc3 Bg5 e3 O-O Bd3 hxh6 Bxf6 Qb3 bxb6 Nb5 Bd8 Nxd6;

[d]4k3/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQ - acd 38/42; acs 2491 ; acn 157480330k; ce 32738 ; bm e3; pv e3 c6 Qg4 g6 Qd4 Kd8 Qh8+ Kc7 Qe5+ Kc8 Qxe7 a6 Nf3 f6 Qxf6 Kc7 Qe7 c5 Ne5 c4 Bxc4 b5 Qc5+ Kd8 Nf7+ Ke8 Qc8+ Ke7 Qd8+;

[d]3qkb2/8/8/8/8/8/PPPPPPPP/RNBQKBNR w KQ - acd 42/48; acs 2747 ; acn 177502363k; ce 32736 ; bm e3; pv e3 Qf6 Nc3 Qf5 Bd3 Qc5 Qg4 Be7 Qg8+ Bf8 Nd5 Kd7 Qf7+ Kc8 Ba6+ Kd8 Bb5 Kc8 Qd7+ Kb8 Bc6 Qxc6 Qxc6 Bc5 Qc7+ Ka8 Qxc5 Kb7 Qc7+ Ka6 Qb6+;

[d]3qk3/8/8/8/8/8/PPPPPPPP/RNBQKBNR w KQ - acd 44/38; acs 1039 ; acn 71671329k; ce 32746 ; bm e4; pv e4 Qg5 d4 Qg6 Nc3 Ke7 Qf3 Qf7 Qg3 Kd7 Nd5 Kc6 Qb3 Qe6 Qb5+ Kd6 Bf4+ Qe5 dxe5+ Ke6 Qe8+;

[d]3qk2r/8/8/8/8/8/PPPPPPPP/RNBQKBNR w KQk - acd 44/54; acs 2037 ; acn 127301142k; ce 32734 ; bm Nf3; pv Nf3 Qa5 Nc3 O-O d4 Qb6 e4 Qf6 Bc4+ Kh8 Qe2 Kg7 Ne5 Qh4 Qe3 Rf6 Qg3+ Qxg3 hxg3 Rb6 Nd5 Re6 Bg5 Rg6 Nf6 Rxf6 Bxf6+ Kxf6 Rh7 Kg5 f4+ Kf6 Rf7+;
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
Uri Blass
Posts: 10309
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: how much time do programs need to find a forced mate

Post by Uri Blass »

I am practically sure all the pieces against 16 pawn is mate.

No mathematical proof but a possible plan that convince me that it is mate is simply to trade pawns and KQRRBBNN vs king and 8 pawns is a simple mate when the pawns are not advanced.
Dann Corbit
Posts: 12541
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: how much time do programs need to find a forced mate

Post by Dann Corbit »

Uri Blass wrote:I am practically sure all the pieces against 16 pawn is mate.

No mathematical proof but a possible plan that convince me that it is mate is simply to trade pawns and KQRRBBNN vs king and 8 pawns is a simple mate when the pawns are not advanced.
What if the opponent is very determined not to trade pawns, but to try to form rammed zigzags instead?
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
jhellis3
Posts: 546
Joined: Sat Aug 17, 2013 12:36 am

Re: how much time do programs need to find a forced mate

Post by jhellis3 »

You just infiltrate on the A or H file, sac minor pieces and even a rook to start if needed, but once the Queen gets behind the pawn line it is over.
Last edited by jhellis3 on Wed May 31, 2017 9:44 pm, edited 1 time in total.
Uri Blass
Posts: 10309
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: how much time do programs need to find a forced mate

Post by Uri Blass »

Dann Corbit wrote:
Uri Blass wrote:I am practically sure all the pieces against 16 pawn is mate.

No mathematical proof but a possible plan that convince me that it is mate is simply to trade pawns and KQRRBBNN vs king and 8 pawns is a simple mate when the pawns are not advanced.
What if the opponent is very determined not to trade pawns, but to try to form rammed zigzags instead?
I do not think that black can prevent trading pawns.

White can for example put all the pawn in the 3th rank and prevent black to go to the 4th rank without white forcing a trade and if black move only with the king then white can play e4 and if black replies e5 then d4 trade pawns and if white does not play e5 then white play d4 with the plan to trade pawns later by d5 that threat both e6 and c6.

Note that even if white has only one pawn to support trades and black has 2 pawns to prevent trade white can use another piece to help so this structure is not enough for black to prevent d4 with trading pawns and

[D]8/8/8/2p1p3/4P3/2PP4/8/8 b KQkq - 0 1

black need this type of structure and I do not believe black can force it and even this structure may not help black.

[D]8/8/8/2p1p3/2P1P3/3P4/8/8 b KQkq - 0 1

I even do not think that this position is a draw.

[D]4k3/1p1p1p1p/ppppppp1/p1p1p1p1/P1P1P1Pp/1P1P1P1P/8/RNBQKBNR b KQkq - 0 1

white can have a plan to sacrifice the biahop for 2 pawns by Bc3 Qd2 and later play b4 and continue trading pawns.
Dann Corbit
Posts: 12541
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: how much time do programs need to find a forced mate

Post by Dann Corbit »

jhellis3 wrote:You just infiltrate on the A or H file, sac minor pieces and even a rook to start if needed, but once the Queen gets behind the pawn line it is over.
Both you are Uri are obviously right.
Your explanation is the simplest.
It makes is crystal clear instantly that black is lost.

If I were black, I would try "the mother of all pawn storms" to see if I can promote.

No real chance it would work, but it is the only sensible attempt that occurs to me.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
Dann Corbit
Posts: 12541
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: how much time do programs need to find a forced mate

Post by Dann Corbit »

I agree that black is lost.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.