What's Essential Rook & Pawn Endgame Knowledge?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Steve Maughan
Posts: 1221
Joined: Wed Mar 08, 2006 8:28 pm
Location: Florida, USA

What's Essential Rook & Pawn Endgame Knowledge?

Post by Steve Maughan »

Maverick seems to be quite weak at endgames when compared to engines of a similar rating. So I'm going to spend some time giving it Rook and Pawn endgame knowledge.

I'm thinking of implementing Lucena and Philidor position knowledge. Are there any other R & P special positions?

What do people consider the most important heuristics for Rook and Pawn endgames?

Thanks - Steve
http://www.chessprogramming.net - Maverick Chess Engine
jdart
Posts: 4366
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: What's Essential Rook & Pawn Endgame Knowledge?

Post by jdart »

You will get a lot of mileage over just having a good king position table: it is very important to advance the king in the endgame.

I have bonuses for placing a rook behind a passed pawn or on the 7th rank adjacent to a passed pawn. And I have a penalty for "side-protecting" a pawn with a rook (rook protects pawn but on the file, not the rank). But these are fairly minor.

Knowing the Lucena/Philidor positions might help but tablebases will detect these.

--Jon
User avatar
Bloodbane
Posts: 154
Joined: Thu Oct 03, 2013 4:17 pm

Re: What's Essential Rook & Pawn Endgame Knowledge?

Post by Bloodbane »

Hakkapeliitta has zero endgame knowledge (except for detection of draws by insufficient material and king PST centralization bonuses) and it relies completely on Syzygy tablebases for playing a good endgame. I don't see why I should waste my time coding specific endgames into my engine when I can just use tablebases which cover far more cases with less bugs.
Functional programming combines the flexibility and power of abstract mathematics with the intuitive clarity of abstract mathematics.
https://github.com/mAarnos
Henk
Posts: 7216
Joined: Mon May 27, 2013 10:31 am

Re: What's Essential Rook & Pawn Endgame Knowledge?

Post by Henk »

Do you already have unstoppable pawn detection ?
brtzsnr
Posts: 433
Joined: Fri Jan 16, 2015 4:02 pm

Re: What's Essential Rook & Pawn Endgame Knowledge?

Post by brtzsnr »

jdart wrote: I have bonuses for placing a rook behind a passed pawn or on the 7th rank adjacent to a passed pawn. And I have a penalty for "side-protecting" a pawn with a rook (rook protects pawn but on the file, not the rank). But these are fairly minor.
How much do these bonuses and penalties help? Shouldn't search take care of them especially in endgame where hash-table is very useful (like >90% hit rate)?
User avatar
Steve Maughan
Posts: 1221
Joined: Wed Mar 08, 2006 8:28 pm
Location: Florida, USA

Re: What's Essential Rook & Pawn Endgame Knowledge?

Post by Steve Maughan »

Henk,

I have unstoppable pawn detection only for king and pawn endings.

For rook and pawn it isn't obvious which pawn are unstoppable.

- Steve
http://www.chessprogramming.net - Maverick Chess Engine
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: What's Essential Rook & Pawn Endgame Knowledge?

Post by bob »

Steve Maughan wrote:Maverick seems to be quite weak at endgames when compared to engines of a similar rating. So I'm going to spend some time giving it Rook and Pawn endgame knowledge.

I'm thinking of implementing Lucena and Philidor position knowledge. Are there any other R & P special positions?

What do people consider the most important heuristics for Rook and Pawn endgames?

Thanks - Steve
Main point is to know that the farther the losing king is from the queening square, the better for the winning side. That by itself, with a decent search, will play almost all KRPKR endings nearly perfectly, drawing when it is on the weaker side, winning when on the stronger side, when the game is not a forced draw anyway.
User avatar
Steve Maughan
Posts: 1221
Joined: Wed Mar 08, 2006 8:28 pm
Location: Florida, USA

Re: What's Essential Rook & Pawn Endgame Knowledge?

Post by Steve Maughan »

Bob,
bob wrote:Main point is to know that the farther the losing king is from the queening square, the better for the winning side. That by itself, with a decent search, will play almost all KRPKR endings nearly perfectly, drawing when it is on the weaker side, winning when on the stronger side, when the game is not a forced draw anyway.
Awesome!

I'll start by implementing KR vs. KRP. Then I'll try to generalize to more pawns.

Thanks - Steve
http://www.chessprogramming.net - Maverick Chess Engine
BBauer
Posts: 658
Joined: Wed Mar 08, 2006 8:58 pm

Re: What's Essential Rook & Pawn Endgame Knowledge?

Post by BBauer »

And I have a penalty for "side-protecting" a pawn with a rook (rook protects pawn but on the file, not the rank). But these are fairly minor.
This may be plain wrong. Look at Aljechin-Capablanca position which was analyzsed by Awerbach.
BTW, grandmasters do not play the rook endgame correct. Engines are usually worse. Which engine can cope with this position?
Kind regards
Bernhard
[D]5k2/5P1R/8/1p6/8/2K5/1PP3rp/8 w - - 0 1
Maarten Claessens
Posts: 106
Joined: Mon May 12, 2014 10:08 am
Location: Near Nijmegen

Re: What's Essential Rook & Pawn Endgame Knowledge?

Post by Maarten Claessens »

BBauer wrote:
And I have a penalty for "side-protecting" a pawn with a rook (rook protects pawn but on the file, not the rank). But these are fairly minor.
This may be plain wrong. Look at Aljechin-Capablanca position which was analyzsed by Awerbach.
BTW, grandmasters do not play the rook endgame correct. Engines are usually worse. Which engine can cope with this position?
Kind regards
Bernhard
[D]5k2/5P1R/8/1p6/8/2K5/1PP3rp/8 w - - 0 1
WaDuuttie calculates:

Code: Select all

  41	38:47	4,181,450,530	1,796,719	+2.85	b2b3 f8e7 c3b4 e7f8 b4b5 g2c2 b3b4 f8e7 b5b6 e7f8 b4b5 c2b2 b6c5 b2c2 c5b4 c2b2 b4c4 b2c2 c4b3 c2f2 b3c3 f8e7 c3b4 f2f7 h7h2 e7d8 b4a5 d8c8 a5a6 f7f8 a6a7 f8f7 a7a8 f7f6 h2h8 c8c7 a8a7 c7d6 h8h7 f6f5 h7h6 d6d7 b5b6 f5a5 a7b8 a5c5
BTW I could not find a game between Alekhine and Capablanca with this position.
Nothing is unstable (Lawrence Krauss)