Odd crafty problem

Discussion of chess software programming and technical issues.

Moderator: Ras

jwes
Posts: 778
Joined: Sat Jul 01, 2006 7:11 am

Odd crafty problem

Post by jwes »

This position came up in the general forum two weeks ago and I tried it on crafty.
[d]8/b7/8/3kBp1p/p1p2PpP/P5P1/1P2K3/8 b - - 0 1
It reached ply 34 after about an hour, but had not found the solution, so I let it run in the background. It has been 338 hours and not only has it not finished ply 35, it has not failed high or low or finished the first move. The node count updates regularly and the nps seems reasonable. I have seen fail highs take a long time to resolve, but I have never seen crafty spend so long on a move without some output.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Odd crafty problem

Post by bob »

jwes wrote:This position came up in the general forum two weeks ago and I tried it on crafty.
[d]8/b7/8/3kBp1p/p1p2PpP/P5P1/1P2K3/8 b - - 0 1
It reached ply 34 after about an hour, but had not found the solution, so I let it run in the background. It has been 338 hours and not only has it not finished ply 35, it has not failed high or low or finished the first move. The node count updates regularly and the nps seems reasonable. I have seen fail highs take a long time to resolve, but I have never seen crafty spend so long on a move without some output.
That happens when there is a "magic boundary" somewhere. For example, here, it might be that a 33 ply search can not force a pawn thru and create a new queen. While at depth 34 this can be forced. But once a queen is allowed anywhere in the tree, it is allowed everywhere, which can blow the search completely up. It has happened every now and then and there is not much that can be done.
Martin Brown
Posts: 46
Joined: Sun Oct 18, 2009 12:07 pm

Re: Odd crafty problem

Post by Martin Brown »

jwes wrote:This position came up in the general forum two weeks ago and I tried it on crafty.
8/b7/8/3kBp1p/p1p2PpP/P5P1/1P2K3/8 b - - 0 1
It reached ply 34 after about an hour, but had not found the solution, so I let it run in the background. It has been 338 hours and not only has it not finished ply 35, it has not failed high or low or finished the first move. The node count updates regularly and the nps seems reasonable. I have seen fail highs take a long time to resolve, but I have never seen crafty spend so long on a move without some output.
That isn't half so odd as what happened when I left Shredder10 running it overnight. Q6600 2.4GHz 4G ram using 834MB hash table crashed Shredder exception(1) after 2h 13m depth 30/63 considering 1. ... Bf2 (ranked 10th).

I haven't seen many positions that crash commercial engines...

Stockfish1.51 reached ply 34 fairly easily but is now stuck on 12. ... Be3 (eval 98.58 @ ply 33) after 2 hours with no sign of getting a result. The annoying thing is that the 9 plausible moves that do not immediately lose the bishop were still relatively quick to process. It is lines arising after the three dud moves that really grind it to a standstill.
Martin Brown
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: Odd crafty problem

Post by Don »

What is the solution? My program plays Ke4 after the first 4 or 5 iterations but with no score revelations of any kind. In fact, I think it is seeing a draw - the score goes to zero at higher depths.

With the white pawns on the black squares, I assume there is a win here for black, right?


Martin Brown wrote:
jwes wrote:This position came up in the general forum two weeks ago and I tried it on crafty.
8/b7/8/3kBp1p/p1p2PpP/P5P1/1P2K3/8 b - - 0 1
It reached ply 34 after about an hour, but had not found the solution, so I let it run in the background. It has been 338 hours and not only has it not finished ply 35, it has not failed high or low or finished the first move. The node count updates regularly and the nps seems reasonable. I have seen fail highs take a long time to resolve, but I have never seen crafty spend so long on a move without some output.
That isn't half so odd as what happened when I left Shredder10 running it overnight. Q6600 2.4GHz 4G ram using 834MB hash table crashed Shredder exception(1) after 2h 13m depth 30/63 considering 1. ... Bf2 (ranked 10th).

I haven't seen many positions that crash commercial engines...

Stockfish1.51 reached ply 34 fairly easily but is now stuck on 12. ... Be3 (eval 98.58 @ ply 33) after 2 hours with no sign of getting a result. The annoying thing is that the 9 plausible moves that do not immediately lose the bishop were still relatively quick to process. It is lines arising after the three dud moves that really grind it to a standstill.
metax
Posts: 344
Joined: Wed Sep 23, 2009 5:56 pm
Location: Germany

Re: Odd crafty problem

Post by metax »

Stockfish 1.5 on my computer only sees a draw until ply 34, which was finished after about 4 minutes.
jwes
Posts: 778
Joined: Sat Jul 01, 2006 7:11 am

Re: Odd crafty problem

Post by jwes »

c3 is supposed to be the solution.
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: Odd crafty problem

Post by Don »

jwes wrote:c3 is supposed to be the solution.
I just realized that my program does see the answer, it just took a long time.

Notice the huge time gap when it found the solution. It went from 60 seconds to 10 minutes at depth 29.

Here is UCI output:

info depth 27 time 28773 nodes 32299437 score cp 0 nps 1122560 pv d5e4 e5f6 a7b6 f6h8 b6g1 h8c3
info depth 27 time 30841 nodes 34592898 score cp 0 nps 1121652 pv d5e4 e5f6 a7b6 f6h8 b6g1 h8c3
info depth 28 time 40722 nodes 45204388 score cp 0 nps 1110072 pv d5e4 e5f6 a7b6 f6h8 b6g1 h8c3
info depth 28 time 43598 nodes 48319598 score cp 0 nps 1108298 pv d5e4 e5f6 a7b6 f6h8 b6g1 h8c3
info depth 29 time 65044 nodes 71563478 score cp 0 nps 1100231 pv d5e4 e5f6 a7b6 f6h8 b6g1 h8c3
info depth 29 time 606741 nodes 602485666 score cp 176 nps 992986 pv c4c3 e5c3 a7b6 c3g7 d5c4
info depth 29 time 606929 nodes 602676182 score cp 176 nps 992992 pv c4c3 e5c3 a7b6 c3g7 d5c4
info depth 30 time 1662327 nodes 1616784450 score cp 175 nps 972603 pv c4c3 e5c3 a7b6 c3g7 d5c4
info depth 30 time 1685356 nodes 1639494025 score cp 175 nps 972787 pv c4c3 e5c3 a7b6 c3g7 d5c4
info depth 31 time 2958036 nodes 2849620915 score cp 194 nps 963348 pv c4c3 e5c3 a7b6 c3g7 d5c4
info depth 31 time 3000098 nodes 2890488438 score cp 194 nps 963464 pv c4c3 e5c3 a7b6 c3g7 d5c4
info depth 32 time 5163665 nodes 4915377758 score cp 204 nps 951916 pv c4c3 e5c3 a7b6 c3g7 d5c4
info depth 32 time 5274444 nodes 5022824846 score cp 204 nps 952294 pv c4c3 e5c3 a7b6 c3g7 d5c4
Dann Corbit
Posts: 12792
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Odd crafty problem

Post by Dann Corbit »

jwes wrote:This position came up in the general forum two weeks ago and I tried it on crafty.
[d]8/b7/8/3kBp1p/p1p2PpP/P5P1/1P2K3/8 b - - 0 1
It reached ply 34 after about an hour, but had not found the solution, so I let it run in the background. It has been 338 hours and not only has it not finished ply 35, it has not failed high or low or finished the first move. The node count updates regularly and the nps seems reasonable. I have seen fail highs take a long time to resolve, but I have never seen crafty spend so long on a move without some output.
Naum coughed up a lung and did not solve it at great depth:

Code: Select all

Analysis from C:\test\c3.epd   
11/11/2009 12:52:03 PM Level: 2000 Seconds
Analyzing engine: Naum-4:64-bit

1) c3;                  
    Searching move: c4-c3
    Best move (Naum-4:64-bit): Ba7-c5
    Not found in: 33:20
     2/5	00:00	          70	70.000	+0.19	Ba7c5 Be5c3
     3/5	00:00	         148	148.000	+0.19	Ba7c5 Be5c3 Kd5e4
     4/6	00:00	         292	292.000	+0.19	Ba7c5 Be5c3 Kd5e4 Bc3e5
     5/7	00:00	         404	134.666	+0.14	Ba7c5 Be5c3 Kd5e4 Bc3e5 Bc5d4
     6/9	00:00	         582	145.500	+0.14	Ba7c5 Be5c3 Kd5e4 Bc3e5 Bc5d4 Be5xd4
     7/9	00:00	         829	165.800	+0.14	Ba7c5 Be5c3 Kd5e4 Bc3e5 Bc5d4 Be5xd4 Ke4xd4
     8/10	00:00	       1.303	260.600	+0.14	Ba7c5 Be5c3 Kd5e4 Bc3e5 Bc5d4 Be5xd4 Ke4xd4 Ke2d2
     9/11	00:00	       2.031	338.500	+0.14	Ba7c5 Be5c3 Kd5e4 Bc3e5 Bc5d4 Be5xd4 Ke4xd4 Ke2d2 Kd4e4
    10/11	00:00	       3.128	446.857	+0.14	Ba7c5 Be5c3 Kd5e4 Bc3e5 Bc5d4 Be5xd4 Ke4xd4 Ke2d2 Kd4e4 Kd2e2
    11/13	00:00	       8.364	836.400	+0.19	Ba7c5 Be5c3 Kd5e4 Bc3e5 Bc5e7 Be5c3 Be7d6 Ke2d2 Bd6c5 Kd2e2 Ke4d5
    12/16	00:00	      15.916	1.224.307	+0.18	Ba7c5 Be5c3 Kd5e4 Bc3a5 Bc5f8 Ba5e1 Bf8d6 Be1d2 Ke4d5 B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select all

Analysis from C:\test\c3.epd   
11/11/2009 1:21:12 PM Level: 2000 Seconds
Analyzing engine: Rybka 3

1) c3;                  
    Searching move: c4-c3
    Best move (Rybka 3): Kd5-e4
    Not found in: 33:20
      2	00:00	          64	2.048	+0.15	Ba7d4
      2	00:00	         110	3.520	+0.44	Kd5e4
      3	00:00	         158	5.056	+0.30	Kd5e4
      4	00:00	         216	6.912	+0.30	Kd5e4
      5	00:00	         293	9.376	+0.29	Kd5e4 Be5c3
      6	00:00	         487	15.584	+0.26	Kd5e4 Be5c3 Ba7c5
      7	00:00	         668	21.376	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8
      8	00:00	         985	31.520	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3
      9	00:00	       1.642	35.029	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5
     10	00:00	       2.594	55.338	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5 Be3b6 Be5c3
     11	00:00	       4.207	89.749	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5 Be3b6 Be5c3
     12	00:00	       6.752	108.032	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5 Be3b6 Be5c3
     13	00:00	      10.928	174.848	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5 Be3b6 Be5c3
     14	00:00	      14.975	194.106	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5 Be3b6 Be5c3
     15	00:00	      20.162	217.325	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5 Be3b6 Be5c3
     16	00:00	      29.226	237.519	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5 Be3b6 Be5c3
     17	00:00	      38.302	276.205	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5 Be3b6 Be5c3
     18	00:00	      64.018	297.974	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5
     19	00:00	      94.223	323.772	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5 Be3b6 Be5c3 Bb6c7
     20	00:00	     132.184	346.180	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5 Be3b6 Be5c3 Bb6c7
     21	00:00	     196.430	357.272	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5 Be3b6 Be5c3 Bb6c7
     22	00:01	     323.404	372.096	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5 Be3b6 Be5c3 Bb6c7
     23	00:01	     515.576	367.653	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5 Be3b6 Be5c3 Bb6c7
     24	00:02	     741.884	368.781	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5 Be3b6 Be5c3 Bb6c7
     25	00:03	   1.093.083	375.483	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5 Be3b6 Be5c3 Bb6c7
     26	00:08	   1.620.986	386.830	+0.26	Kd5e4 Be5c3
     27	00:13	   2.586.419	371.405	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5 Be3b6 Be5c3 Bb6c7
     28	00:13	   4.509.289	364.934	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5 Be3b6 Be5c3 Bb6c7
     29	00:22	   7.411.485	345.017	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5 Be3b6 Be5c3 Bb6c7
     30	00:39	  12.773.073	329.171	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5 Be3b6 Be5c3 Bb6c7
     31	01:10	  22.653.445	329.556	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5
     32	02:07	  42.200.635	339.424	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5
     33	03:55	  79.748.299	346.140	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5
     34	08:30	 174.231.249	349.540	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5
     35	11:58	 239.829.764	341.909	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5
     36	22:24	 481.996.580	367.044	+0.26	Kd5e4 Be5c3 Ba7c5 Bc3h8 Bc5e3 Bh8e5
   11/11/2009 1:54:44 PM, Time for this analysis: 00:33:20, Rated time: 33:20

0 of 1 matching moves
11/11/2009 1:54:45 PM, Total time: 12:33:33 AM
Rated time: 33:20 = 2000 Seconds
User avatar
hgm
Posts: 28390
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Odd crafty problem

Post by hgm »

This behavior is a consequence of the desire to search every branch to the same effective depth (equating the "effective depth" of a null move to R+1 ply). From a chessic perspective this is a non-sensical desire: after having concluded that promotion is unavoidable, and takes 35 moves against best defense, it is not satisfied (and thus will not give the 35-ply score) before it has searched all other branches to that depth as well. Also those branches that, against very stupid defense, already promoted after 15 ply. Before those braches were null-move pruned to almost nothing, because there was no need to move the Queen: it could just be sitting there on the promotion square while you null-moved, until you finally received its big fat score in the material evaluation of the much-reduced end leaf, which would make these null-moves fail high.

But when merely having a Queen is no longer guarantee for fail high, because the PV now has a Queen too, the Queen has suddenly to take offensive action in those sub-trees, exploding them completely. It will be making an attempt to figure out how much damage that Queen can do in the remaining 20 ply, of which it had no idea before. (So this is a completely uninformed search.)

Humans don't think that way; they think more in a DTC metric. First you try to delay the Queening as much as possible. When you finally proved that Queening is unavoidable, you start analyzing the next phase of the game, where you start counting the depth from the point where you promoted. Allowing an early promotion might be a much beter defense; before you discovered that promotion was unavoidable the tree will contain many horizon moves sacrificing material or position just to delay promotion. So it makes sense to compare early promotions to delayed promotions, with the same number of ply after the promotion. If you don't, the late promotion is likely to (unjustly) look better for many more plies, because there is less depth to see the sme (or worse) disasters. Basically you are just cultivating the horizon effect. To make a sensible choice between the promotion positions, you need to compare their search scores at the same remaining depth.

This is not impossible to implement in an engine: one could propagate the "depth after resolution", defined as depth searched past the point where the static eval approximated the search score, back towards the root with the PV score. In a sense it would be a tag to the window limit, and should also be propagated upward through the tree, together with this window limit. As long as the static eval is very far from the window limit, depth for daughter nodes would be decreased as usual. But as soon as the static eval reaches the window limit again (e.g. because you are in a branch that promoted early), so that this new branch could become PV, the remaining depth should be reduced to the depth of resolution of the window limit we are comparing it against.

Another, more general method, which also ameliorates problems like this, is node-balancing: use fractional ply, and could each ply made from a given position for log(nr_of_moves). This would count plies after promotion more heavily than plies before promotion, reducing the search work in the early-promotion branches somewhat. This method would also help in the opposite situation, where you trade your last piece. The plies in the resulting Pawn ending would be counted for much less, increasing the true search depth there.