Pathetic lack of execution (can your engine find c4?)

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

Moderator: Ras

User avatar
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Pathetic lack of execution (can your engine find c4?)

Post by michiguel »

In ICC. after a middlegame that would make Capablanca proud, Gaviota playing black reached this won endgame. c4 wins easily, but.. Gaviota did not find it, fool around for 50 moves, trade c5 for the h3 pawn to avoid a draw, let the opponent king to have better mobility and lost !@#$!#.
I was watching this on ICC waiting for c4 (there were like 20 opportunities) and banging my head against the monitor.

[d]8/8/3k1p2/p1p1n1p1/Pp2P1P1/1P1BK2P/8/8 b - - 3 46 bm c4

Can your engine find c4 in blitz? It looks too easy!

I truly believe that endgame play is much more important than what people think. Another position for the to-do list...

Miguel
PS: Full game Jekyll-Hyde style

[Event "ICS rated blitz match"]
[Site "207.99.83.228"]
[Date "2009.09.05"]
[Round "-"]
[White "chepla"]
[Black "Gaviota"]
[Result "1-0"]
[WhiteElo "2710"]
[BlackElo "2725"]
[TimeControl "180+2"]

1.d4 d5 2.Nf3 Nf6 3.c4 dxc4 4.e3 Bg4 5.Bxc4 e6 6.h3 Bh5 7.Nc3 a6 8.g4 Bg6 9.Ne5
Nbd7 10.Nxg6 hxg6 11.Bf1 c6 12.Bg2 Bd6 13.e4 e5 14.Be3 exd4 15.Qxd4 Bc5 16.Qd2
Ne5 17.Bxc5 Nd3+ 18.Ke2 Nxc5 19.Qe3 Qb6 20.Rab1 Nfd7 21.Rhd1 Ne6 22.f4 g5 23.
fxg5 Qxe3+ 24.Kxe3 Nxg5 25.Ne2 Ne5 26.Nf4 Ke7 27.Rd4 Rad8 28.Rbd1 Rxd4 29.Rxd4
f6 30.Rd1 Ngf7 31.b3 a5 32.Nh5 g6 33.Nf4 b6 34.Nd3 Rd8 35.Nb2 Rxd1 36.Nxd1 b5
37.Nc3 Ng5 38.Bf1 Kd7 39.a4 b4 40.Nb1 Ngf3 41.Nd2 Nxd2 42.Kxd2 c5 43.Ke3 Ke6
44.Bd3 g5 45.Bb5 Kd6 46.Bd3 Ke6 47.Bb5 Kd6 48.Bd3 Kc7 49.Bb5 Kd8 50.Bd3 Ke7 51.
Be2 Kd7 52.Bb5+ Ke6 53.Be2 Kd7 54.Bb5+ Ke6 55.Be2 Ke7 56.Bb5 Kf7 57.Bd3 Ke7 58.
Bb5 Kf7 59.Bd3 Kf8 60.Bb5 Ke7 61.Be2 Ng6 62.Ba6 Kd8 63.Bf1 Ne5 64.Be2 Kc8 65.
Bd3 Ng6 66.Kf3 Kb8 67.Ba6 Kc7 68.Bb5 Kb7 69.Ke3 Kc8 70.Bc4 Kd8 71.Bb5 Ne5 72.
Bf1 Kc7 73.Bb5 Kb7 74.Bd3 Ng6 75.Bb5 Kc7 76.Kf3 Kb8 77.Kf2 Ne5 78.Ke1 Nf3+ 79.
Kd1 Kc7 80.Be2 Ne5 81.Kd2 Kb7 82.Bb5 Ka7 83.Bd3 Kb7 84.Ke3 Kb6 85.Kd2 Kc7 86.
Be2 Ng6 87.Ke3 Kb6 88.Kd2 Kb7 89.Bc4 Ne5 90.Bb5 Kb6 91.Bd3 Ng6 92.Be2 Nf4 93.
Bf1 c4 94.Bxc4 Nxh3 95.Ke3 Kc6 96.Kd4 Kd6 97.Ba6 Nf4 98.Kc4 Kc6 99.Bb5+ Kc7
100.Ba6 Kb6 101.Bb5 Ng6 102.Kd5 Ne5 103.Be2 Kc7 104.Ke6 Nd7 105.Ke7 Nc5 106.
Kxf6 Nxe4+ 107.Ke5 Nd2 108.Bd1 Nf1 109.Kf6 Ne3 110.Be2 Kd6 111.Kxg5 Ke5 112.Kg6
Nc2 113.g5 Nd4 114.Bc4 Nf3 115.Kh6 Nh4 116.Kh7 Nf5 117.Bd3 Nd6 118.g6 Ne8 119.
g7 Nxg7 120.Kxg7 Kd4 121.Bc4 Ke5 122.Kf7 Kd6 123.Kf6 Kd7 124.Ke5 Kc6 125.Bb5+
Kb6 126.Kd5 Kc7 127.Kc5 Kb7 128.Kd6 Kb6 129.Bc6 Ka6 130.Kc5 Ka7 131.Kb5 Kb8
132.Kxa5 Kc7 133.Kb5 Kd6 134.a5 Kc7 135.a6 Kd6 136.a7 Ke5 137.a8=Q Kf4 138.Qf8+
1-0
yanquis1972
Posts: 1766
Joined: Wed Jun 03, 2009 12:14 am

Re: Pathetic lack of execution (can your engine find c4?)

Post by yanquis1972 »

how long does it take gaviota to find it? (or does it?)

i have yet to find an engine that can't find it reasonably quickly, but ive only tried pretty advanced ones (weakest tried was prob. delfi but w/ 2 CPU).
jdart
Posts: 4410
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: Pathetic lack of execution (can your engine find c4?)

Post by jdart »

Arasan finds it, switches off it and then goes back at depth 19:

0 0.00 Nc4+ -3.21 7
0 0.00 c4 -0.80 13
0 0.00 Nxd3 +0.00 23
0 0.00 Kc6 +0.16 27
0 0.00 Ke6 +0.20 36
1 0.00 Ke6 +0.16 71
2 0.00 Ke6 +0.16 274
2 0.00 Ng6 +0.32 414
3 0.01 Ng6 +0.20 913
4 0.01 Ng6 +0.44 1958
5 0.01 Ng6 +0.44 3382
6 0.01 Ng6 +0.32 5538
6 0.01 Nc6 +0.40 8494
7 0.01 Nc6 +0.40 11751
7 0.01 Ng6 +0.41 16513
8 0.03 Ng6 +0.52 23557
9 0.03 Ng6 +0.40 34089
9 0.04 Nc6 +0.41 54071
10 0.06 Nc6 +0.36 81699
10 0.09 Ng6 +0.37 127864
11 0.11 Ng6 +0.36 184052
11 0.12 Nc6 +0.37 210555
12 0.19 Nc6 +0.43 316182
13 0.33 Nc6 +0.42 619690
13 0.39 c4 +0.64 724514
14 0.42 c4 +0.64 778021
15 0.56 c4 +1.00 1046775
16 0.75 c4 +1.08 1407191
17 1.04 c4 +1.00 1978405
18 2.01 -- +0.50 3961293
18 2.33 c4 +0.32 4587429
18 6.06 Nc6 +0.33 11687533
19 10.56 Nc6 +0.33 21308895
19 12.62 Nxd3 +0.34 25384813
19 12.67 c4! +0.83 25463547
19 14.47 c4 +0.96 29182920
20 15.62 c4 +0.96 31511920
21 19.14 c4 +0.96 38993524
22 27.47 c4 +1.08 57727510
23 46.23 c4 +1.44 99159578

Sometimes it helps to start a search a few moves farther into the PV and see if there is an issue that keeps you from seeing a + score.
BubbaTough
Posts: 1154
Joined: Fri Jun 23, 2006 5:18 am

Re: Pathetic lack of execution (can your engine find c4?)

Post by BubbaTough »

Finally a test position LearningLemming can handle :lol:. Yes, LearningLemming sees this move instantaneously (significantly less than 1 second). It takes some care to teach an engine this type of knowledge without it starting making some big mistakes, so be careful if you try to add it.

-Sam
User avatar
AdminX
Posts: 6363
Joined: Mon Mar 13, 2006 2:34 pm
Location: Acworth, GA

Re: Pathetic lack of execution (can your engine find c4?)

Post by AdminX »

Analysis by Fritz in Bahrain:

1...Ng6 2.Bf1 Ne5 3.Kd2 Ke7 4.Ke3
=/+ (-0.66) Depth: 13/24 00:00:00 602kN
=/+ (-0.66) Depth: 14/24 00:00:00 889kN

1...c4 2.Bxc4 Nxc4+ 3.bxc4 Kc5 4.Kd3 b3 5.Kc3 b2 6.Kxb2 Kxc4 7.Ka3 Kc3 8.Ka2 Kb4
=/+ (-0.69) Depth: 14/24 00:00:00 993kN
-+ (-2.41) Depth: 20/39 00:00:20 30928kN, tb=18


Analysis by Hiarcs 8 Bareev:

1...Ng6 2.Bf1
= (-0.08) Depth: 4/11 00:00:00

1...c4 2.Bxc4 Nxc4+ 3.bxc4 Kc5 4.Kd3 b3 5.Kc3
=/+ (-0.30) Depth: 4/11 00:00:00
= (-0.14) Depth: 6/14 00:00:00 6kN

1...Ng6 2.Bf1 Ke7 3.Kd2 Ne5 4.Ke3
= (-0.16) Depth: 6/14 00:00:00 8kN
=/+ (-0.29) Depth: 13/27 00:00:07 3694kN

1...c4 2.Bxc4 Nxc4+ 3.bxc4 b3 4.Kd3 b2 5.Kc2 Kc5 6.Kxb2 Kxc4 7.Kc2 Kb4 8.Kd3 Kxa4 9.Kc4 Ka3 10.Kc3 a4 11.Kc2
=/+ (-0.30) Depth: 13/28 00:00:08 4321kN
-+ (-1.48) Depth: 17/42 00:03:17 109mN, tb=1293
"Good decisions come from experience, and experience comes from bad decisions."
__________________________________________________________________
Ted Summers
User avatar
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Re: Pathetic lack of execution (can your engine find c4?)

Post by michiguel »

yanquis1972 wrote:how long does it take gaviota to find it? (or does it?)

i have yet to find an engine that can't find it reasonably quickly, but ive only tried pretty advanced ones (weakest tried was prob. delfi but w/ 2 CPU).
It has been several hours already. It got stuck at ply 18. It has been considering c4 for a long long time, which means that it is getting difficult to prove that c4 is worse than Ke6 (the PV move). So, I think it is likely that will fail high.

As Jon says, examining what happens after playing c4 and going forward a bit it important. I did it briefly, and the main problem is that gaviota may not have enough knowledge to determine quickly that the pawn endgame is hopeless for white. The endgame in the starting position has a score of +1.00, so it means that the pawn endgame should have a higher eval to see it and gaviota is failing at that. This badly needs a fix, but it is tricky, as Sam says.

Miguel
Mincho Georgiev
Posts: 454
Joined: Sat Apr 04, 2009 6:44 pm
Location: Bulgaria

Re: Pathetic lack of execution (can your engine find c4?)

Post by Mincho Georgiev »

Pawny:

Code: Select all

setboard 8/8/3k1p2/p1p1n1p1/Pp2P1P1/1P1BK2P/8/8 b - - 3 46
go
 1 3         0.05 e5d3 e3d3
 2 8         0.05 e5d3 e3d3
 3 34       -0.02 e5d3 e3d3 d6e5
 4 80       -0.02 e5d3 e3d3 d6e5 d3e3
 5 230      -0.02 e5d3 e3d3 d6e6 d3e3 e6e5
 6 340       0.05 e5d3 e3d3 d6e6 d3d2 e6e5 d2e3
 6 2024      0.04 c5c4 d3c4
 7 1286     -0.11 c5c4 d3c4 e5c4 b3c4 b4b3 e3d4 b3b2 c4c5
 8 4676      0.00 e5d3 e3d3 d6c7 d3e3 c7d7 e3e2 d7e6 e2f2
 9 3915      0.00 e5d3 e3d3 d6c7 d3c4 c7c6 c4d3 c6c7 d3e3 c5c4 b3c4
10 9134     -0.87 e5d3 e3d3 d6e5 d3e3 c5c4 b3c4 b4b3 e3d3 b3b2 d3c2
11 35730     0.00 e5d3 e3d3 d6e5 d3e3 e5e6 e3d3 e6e5 b3c4
12 14393     0.00 e5d3 e3d3 d6e5 d3e3 e5e6 e3d3 e6e5
13 21282     0.00 e5d3 e3d3 d6e5 d3e3 e5e6 e3d3 e6e5
13 71915    -0.12 c5c4 d3c4 e5c4 b3c4 d6c5 e3d3 b4b3 d3c3 b3b2 c3b2 c5c4 b2a3 c4d4 a3b3 d4e4
14 52745    -0.17 c5c4 d3c4 e5c4 b3c4 d6c5 e3d3 b4b3 d3c3 b3b2 c3b2 c5c4 b2c2 c4b4 h3h4 g5h4
15 101868   -0.07 c5c4 d3c4 e5c4 b3c4 d6c5 e3d3 b4b3 d3c3 b3b2 c3b2 c5c4 b2a3 c4d4 a3b3 d4e4 b3c4
16 214549   -0.23 c5c4 d3c4 e5c4 b3c4 d6c5 e3d3 b4b3 d3c3 b3b2 c3b2 c5c4 b2c2 c4b4 c2d3 b4a4 d3c4 a4a3
17 376199   -0.10 c5c4 d3c4 e5c4 b3c4 d6c5 e3d3 b4b3 d3c3 b3b2 c3b2 c5c4 b2c2 c4d4 c2b3 d4e4 b3c4 f6f5 g4f5 e4f5
18 1689089  -0.41 c5c4 d3c4 e5c4 b3c4 d6c5 e3d3 b4b3 d3c3 b3b2 c3b2 c5c4 b2c2 c4b4 c2d3 b4a4 e4e5 f6e5 d3e4 a4b5 e4e5
19 4515850  -0.41 c5c4 d3c4 e5c4 b3c4 d6c5 e3d3 b4b3 d3c3 b3b2 c3b2 c5c4 b2c2 c4b4 c2d3 b4a4 e4e5 f6e5 d3e4 a4b4 e4e5
   303 Kn/s,  20.50 sec

move c5c4

User avatar
Eelco de Groot
Posts: 4676
Joined: Sun Mar 12, 2006 2:40 am
Full name:   Eelco de Groot

Re: Pathetic lack of execution (can your engine find c4?)

Post by Eelco de Groot »

This is what I get with Ancalagon:


[d]8/8/3k1p2/p1p1n1p1/Pp2P1P1/1P1BK2P/8/8 b - -

Engine: Ancalagon 1.3 Weak Squares 180 Board Control middlegame 50 endgame 50 Build 251 (Athlon 2009 MHz, 64 MB)
by Romstad, Costalba, Kiiski, de Groot

2.00 0:00 +0.80 46...c4 47.Bxc4 Nxc4+ 48.bxc4 b3 (5.008) 45

3.00 0:00 -0.15 46...c4 47.Bxc4 Nxc4+ 48.bxc4 Kc5
49.Kd3 Kd6 50.Kd4 Kc6 (43.733) 310

3.00 0:00 +0.01 46...Nc6 47.Bf1 Nd4 48.Bc4 Ke5
49.Kd3 Ne6 50.Bd5 Nf4+ 51.Kc4 (77.741) 451

3.00 0:00 +0.45 46...Nxd3 47.Kxd3 Ke5 48.Kc4 Kxe4
49.Kxc5 Kd3 50.Kb5 Kc3 51.Kxa5 Kxb3 (79.415) 461

4.00 0:00 +0.31 46...Nxd3 47.Kxd3 Ke5 48.Ke3 c4
49.bxc4 Kd6 (185.395) 696

5.00 0:00 +0.15 46...Nxd3 47.Kxd3 Ke5 48.Ke3 c4
49.bxc4 Ke6 (217.177) 772

6.00 0:00 0.00 46...Nxd3 47.Kxd3 Ke5 48.Ke3 Kd6
49.Kd3 Ke5 (295.684) 859

7.00 0:00 0.00 46...Nxd3 47.Kxd3 Ke5 48.Ke3 Kd6
49.Kd3 Ke5 (446.544) 985

8.00 0:00 0.00 46...Nxd3 47.Kxd3 Ke5 48.Ke3 Kd6
49.Kd3 Ke5 (605.099) 1046

8.00 0:00 +0.05 46...Ng6 47.Bf1 Ke5 48.Bc4 Nf4
49.Bf1 c4 50.Bxc4 Nxh3 51.Bf1 Nf4
52.Bc4 Ne6 53.Bd5 (918.648) 1109

8.00 0:00 +0.19 46...c4 (1.039.742) 1127

9.00 0:00 +0.23 46...c4 47.Bxc4 Nxc4+ 48.bxc4 Kc5
49.Kd3 b3 50.Kc3 b2 51.Kxb2 Kxc4
52.Kc2 Kd4 53.Kd2 Kxe4 (1.059.493) 1129

10.01 0:01 +0.94 46...c4 (1.381.219) 1178

11.01 0:01 +1.29 46...c4 47.Bxc4 Nxc4+ 48.bxc4 Kc5
49.Kd3 b3 50.Kc3 b2 51.Kxb2 Kxc4 (1.610.590) 1198

12.01 0:01 +1.29 46...c4 47.Bxc4 Nxc4+ 48.bxc4 Kc5
49.Kd3 b3 50.Kc3 b2 51.Kxb2 Kxc4 (1.941.373) 1230

13.01 0:02 +0.94 46...c4 47.Bxc4 (3.658.652) 1300

14.01 0:06 +2.35 46...c4 (8.417.249) 1238

15.01 1:26 +2.37 46...c4 47.Bxc4 Nxc4+ 48.bxc4 Kc5
49.Kd3 b3 50.Kc3 b2 51.Kxb2 Kxc4 (73.866.502) 855

16.01 2:30 +2.35 46...c4 47.Bxc4 Nxc4+ 48.bxc4 Kc5
49.Kd3 b3 50.Kc3 b2 51.Kxb2 Kxc4 (137.441.844) 913

17.01 2:59 +2.39 46...c4 47.Bxc4 Nxc4+ 48.bxc4 Kc5
49.Kd3 b3 50.Kc3 b2 51.Kxb2 Kxc4 (168.607.538) 938

18.01 3:58 +2.58 46...c4 (238.816.340) 1003

19.01 4:23 +2.68 46...c4 47.Bxc4 Nxc4+ 48.bxc4 Kc5
49.Kd3 (264.370.530) 1002


best move: c5-c4 time: 5:19.547 min n/s: 1.035.247 nodes: 330.810.150

There is in Stockfish an extension rule which should help a little to get more depth in these cases, it says that if the move is a capture and the capture is of the last piece on the board, so a transition to a pawn endgame, the move should be extended. A cheap rule because it can only be applied in few cases.

Code: Select all

    if (   capture
        && pos.type_of_piece_on(move_to(m)) != PAWN
        && (  pos.non_pawn_material(WHITE) + pos.non_pawn_material(BLACK)
            - pos.midgame_value_of_piece_on(move_to(m)) == Value(0))
        && !move_promotion(m)
        && !move_is_ep(m))
    {
        result += PawnEndgameExtension[pvNode];
        *dangerous = true;
    }
I am not using it at the moment but I did have a similar rule if the capture was not exactly of the last piece but one leaving very little piece material and the capture is close to the root. Since this also should not go into effect often, you could try it for cases more distant from the root as well I think.

Code: Select all


/*
else if (  !pvNode
         && result == 0 // no extensions so far
         && capture
         && pos.type_of_piece_on(move_to(m)) != PAWN
         && ply <= Iteration >> 1
         && (pos.non_pawn_material(WHITE) + pos.non_pawn_material(BLACK)) <= QueenValueEndgame + RookValueEndgame)
{
	result += OnePly/2;
	*dangerous = true;
}
*/
Extensions are something of a brute force method, unfortunately you cannot just keep extending everywhere :)
But a better eval of the pawn on b4 is of course of paramount importance, Ancalagon likely gives it too much weight. One test-position therefore does not tell you anything about that, unless it is from a game played by your own engine.

Eelco
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
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Re: Pathetic lack of execution (can your engine find c4?)

Post by michiguel »

michiguel wrote:
yanquis1972 wrote:how long does it take gaviota to find it? (or does it?)

i have yet to find an engine that can't find it reasonably quickly, but ive only tried pretty advanced ones (weakest tried was prob. delfi but w/ 2 CPU).
It has been several hours already. It got stuck at ply 18. It has been considering c4 for a long long time, which means that it is getting difficult to prove that c4 is worse than Ke6 (the PV move). So, I think it is likely that will fail high.

As Jon says, examining what happens after playing c4 and going forward a bit it important. I did it briefly, and the main problem is that gaviota may not have enough knowledge to determine quickly that the pawn endgame is hopeless for white. The endgame in the starting position has a score of +1.00, so it means that the pawn endgame should have a higher eval to see it and gaviota is failing at that. This badly needs a fix, but it is tricky, as Sam says.

Miguel
It took 8.6 hours with the following PV (18 plies)

Code: Select all

2432071667  17:   4245.8    +1.00  Ke6 24.Be2 Ke7 25.Ba6 Ke8 26.Bb5+ Kf7
                                   27.Kd2 Ke7 28.Ke2 Kd6 29.Ke3 Kc7 30.Be2
                                   Kd7 31.Bf1 Kd8 32.Bd3
4065709864  18    7146.0    +1.00  Ke6 24.Be2 Ke7 25.Ba6 Ke8 26.Bb5+ Kf7
                                   27.Kd2 Ke7 28.Ke2 Kd6 29.Ke3 Kc7 30.Be2
                                   Kd7 31.Bf1 Kd8 32.Bd3 Ke8

18392614109  18   31015.2    +1.27  c4 24.Bxc4 Nxc4+ 25.bxc4 Kc5 26.Kd3 b3
                                   27.Kc3 b2 28.Kxb2 Kxc4 29.Kc1 Kb4
                                   30.Kd2 Kxa4 31.Kc3 Ka3 32.Kc4 a4 33.Kc3
                                   Ka2 34.Kb4 a3 35.Kc4
Big positional scores in non-pawn endgames + small scores in pawn endgames (lack of knowledge) is the main problem. I think.

That makes an awful transition.

Miguel
User avatar
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Re: Pathetic lack of execution (can your engine find c4?)

Post by michiguel »

Eelco de Groot wrote:This is what I get with Ancalagon:


[d]8/8/3k1p2/p1p1n1p1/Pp2P1P1/1P1BK2P/8/8 b - -

Engine: Ancalagon 1.3 Weak Squares 180 Board Control middlegame 50 endgame 50 Build 251 (Athlon 2009 MHz, 64 MB)
by Romstad, Costalba, Kiiski, de Groot

2.00 0:00 +0.80 46...c4 47.Bxc4 Nxc4+ 48.bxc4 b3 (5.008) 45

3.00 0:00 -0.15 46...c4 47.Bxc4 Nxc4+ 48.bxc4 Kc5
49.Kd3 Kd6 50.Kd4 Kc6 (43.733) 310

3.00 0:00 +0.01 46...Nc6 47.Bf1 Nd4 48.Bc4 Ke5
49.Kd3 Ne6 50.Bd5 Nf4+ 51.Kc4 (77.741) 451

3.00 0:00 +0.45 46...Nxd3 47.Kxd3 Ke5 48.Kc4 Kxe4
49.Kxc5 Kd3 50.Kb5 Kc3 51.Kxa5 Kxb3 (79.415) 461

4.00 0:00 +0.31 46...Nxd3 47.Kxd3 Ke5 48.Ke3 c4
49.bxc4 Kd6 (185.395) 696

5.00 0:00 +0.15 46...Nxd3 47.Kxd3 Ke5 48.Ke3 c4
49.bxc4 Ke6 (217.177) 772

6.00 0:00 0.00 46...Nxd3 47.Kxd3 Ke5 48.Ke3 Kd6
49.Kd3 Ke5 (295.684) 859

7.00 0:00 0.00 46...Nxd3 47.Kxd3 Ke5 48.Ke3 Kd6
49.Kd3 Ke5 (446.544) 985

8.00 0:00 0.00 46...Nxd3 47.Kxd3 Ke5 48.Ke3 Kd6
49.Kd3 Ke5 (605.099) 1046

8.00 0:00 +0.05 46...Ng6 47.Bf1 Ke5 48.Bc4 Nf4
49.Bf1 c4 50.Bxc4 Nxh3 51.Bf1 Nf4
52.Bc4 Ne6 53.Bd5 (918.648) 1109

8.00 0:00 +0.19 46...c4 (1.039.742) 1127

9.00 0:00 +0.23 46...c4 47.Bxc4 Nxc4+ 48.bxc4 Kc5
49.Kd3 b3 50.Kc3 b2 51.Kxb2 Kxc4
52.Kc2 Kd4 53.Kd2 Kxe4 (1.059.493) 1129

10.01 0:01 +0.94 46...c4 (1.381.219) 1178

11.01 0:01 +1.29 46...c4 47.Bxc4 Nxc4+ 48.bxc4 Kc5
49.Kd3 b3 50.Kc3 b2 51.Kxb2 Kxc4 (1.610.590) 1198

12.01 0:01 +1.29 46...c4 47.Bxc4 Nxc4+ 48.bxc4 Kc5
49.Kd3 b3 50.Kc3 b2 51.Kxb2 Kxc4 (1.941.373) 1230

13.01 0:02 +0.94 46...c4 47.Bxc4 (3.658.652) 1300

14.01 0:06 +2.35 46...c4 (8.417.249) 1238

15.01 1:26 +2.37 46...c4 47.Bxc4 Nxc4+ 48.bxc4 Kc5
49.Kd3 b3 50.Kc3 b2 51.Kxb2 Kxc4 (73.866.502) 855

16.01 2:30 +2.35 46...c4 47.Bxc4 Nxc4+ 48.bxc4 Kc5
49.Kd3 b3 50.Kc3 b2 51.Kxb2 Kxc4 (137.441.844) 913

17.01 2:59 +2.39 46...c4 47.Bxc4 Nxc4+ 48.bxc4 Kc5
49.Kd3 b3 50.Kc3 b2 51.Kxb2 Kxc4 (168.607.538) 938

18.01 3:58 +2.58 46...c4 (238.816.340) 1003

19.01 4:23 +2.68 46...c4 47.Bxc4 Nxc4+ 48.bxc4 Kc5
49.Kd3 (264.370.530) 1002


best move: c5-c4 time: 5:19.547 min n/s: 1.035.247 nodes: 330.810.150

There is in Stockfish an extension rule which should help a little to get more depth in these cases, it says that if the move is a capture and the capture is of the last piece on the board, so a transition to a pawn endgame, the move should be extended. A cheap rule because it can only be applied in few cases.

Code: Select all

    if (   capture
        && pos.type_of_piece_on(move_to(m)) != PAWN
        && (  pos.non_pawn_material(WHITE) + pos.non_pawn_material(BLACK)
            - pos.midgame_value_of_piece_on(move_to(m)) == Value(0))
        && !move_promotion(m)
        && !move_is_ep(m))
    {
        result += PawnEndgameExtension[pvNode];
        *dangerous = true;
    }
I am not using it at the moment but I did have a similar rule if the capture was not exactly of the last piece but one leaving very little piece material and the capture is close to the root. Since this also should not go into effect often, you could try it for cases more distant from the root as well I think.

Code: Select all


/*
else if (  !pvNode
         && result == 0 // no extensions so far
         && capture
         && pos.type_of_piece_on(move_to(m)) != PAWN
         && ply <= Iteration >> 1
         && (pos.non_pawn_material(WHITE) + pos.non_pawn_material(BLACK)) <= QueenValueEndgame + RookValueEndgame)
{
	result += OnePly/2;
	*dangerous = true;
}
*/
Extensions are something of a brute force method, unfortunately you cannot just keep extending everywhere :)
But a better eval of the pawn on b4 is of course of paramount importance, Ancalagon likely gives it too much weight. One test-position therefore does not tell you anything about that, unless it is from a game played by your own engine.

Eelco
When I transition to pawn endgames, I extend three plies (or two? I do not remember now, I have to check the code). In your engine, you have a small positive score in the N vs B endgame (gaviota has a big one +1.00) and you see c4 with a relatively small score. Even more, you have knowledge that this position favors black by +0.94 and gaviota does not have that knowledge because it scores it -0.74 (material is the bigger factor, not the king position). All these factors combined, make gaviota take more than 8 hours :-(

[d]8/8/5p2/p5p1/P1k1P1P1/7P/1K6/8 w - - 0 57

Miguel
Edit: In fact, all the engines that posted here showed a very small score before c4. What is the score of Lemming before c4?