What's Essential Rook & Pawn Endgame Knowledge?

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
Steve Maughan
Posts: 1075
Joined: Wed Mar 08, 2006 7:28 pm
Location: Florida, USA
Contact:

What's Essential Rook & Pawn Endgame Knowledge?

Post by Steve Maughan » Fri Apr 10, 2015 2:23 pm

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: 3990
Joined: Fri Mar 10, 2006 4:23 am
Location: http://www.arasanchess.org

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

Post by jdart » Fri Apr 10, 2015 2:47 pm

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 2:17 pm

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

Post by Bloodbane » Fri Apr 10, 2015 2:57 pm

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: 6471
Joined: Mon May 27, 2013 8:31 am

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

Post by Henk » Fri Apr 10, 2015 3:26 pm

Do you already have unstoppable pawn detection ?

brtzsnr
Posts: 433
Joined: Fri Jan 16, 2015 3:02 pm
Contact:

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

Post by brtzsnr » Fri Apr 10, 2015 3:31 pm

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: 1075
Joined: Wed Mar 08, 2006 7:28 pm
Location: Florida, USA
Contact:

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

Post by Steve Maughan » Fri Apr 10, 2015 3:32 pm

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: 20916
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

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

Post by bob » Fri Apr 10, 2015 3:34 pm

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: 1075
Joined: Wed Mar 08, 2006 7:28 pm
Location: Florida, USA
Contact:

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

Post by Steve Maughan » Fri Apr 10, 2015 3:47 pm

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 7:58 pm

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

Post by BBauer » Fri Apr 10, 2015 3:57 pm

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: 103
Joined: Mon May 12, 2014 8:08 am
Location: Near Nijmegen

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

Post by Maarten Claessens » Fri Apr 10, 2015 5:57 pm

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)

Post Reply