Is this rule safe (how has K&Ps vs K&Ps databases? t

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
mjlef
Posts: 1315
Joined: Thu Mar 30, 2006 12:08 pm
Contact:

Is this rule safe (how has K&Ps vs K&Ps databases? t

Post by mjlef » Wed Jun 20, 2007 2:51 pm

Here is a very old rule I have had in NOW:

If you are in a King and Pawns versus King and Pawns endgame AND
for each passed pawn, ignoring the other pawns, lookup the position of that passed pawn and the kings in a KPK database for both sides to move AND
if the position shows as a win for both sides to move, give a nice juicy bonus.

Is this safe? Can you think of exceptions? Can anyone test this with some KPK databases?

Mark

jwes
Posts: 773
Joined: Sat Jul 01, 2006 5:11 am

Re: Is this rule safe (how has K&Ps vs K&Ps database

Post by jwes » Wed Jun 20, 2007 7:56 pm

mjlef wrote:Here is a very old rule I have had in NOW:

If you are in a King and Pawns versus King and Pawns endgame AND
for each passed pawn, ignoring the other pawns, lookup the position of that passed pawn and the kings in a KPK database for both sides to move AND
if the position shows as a win for both sides to move, give a nice juicy bonus.

Is this safe? Can you think of exceptions? Can anyone test this with some KPK databases?

Mark
Here is a won position that won't get the bonus.
[D]8/8/2p5/P2k4/8/1K6/8/8 w - - 0 1

rjgibert
Posts: 306
Joined: Mon Jun 26, 2006 7:44 am

Re: Is this rule safe (how has K&Ps vs K&Ps database

Post by rjgibert » Thu Jun 21, 2007 12:38 am

[D]8/4k3/6P1/4K3/1p6/p7/P7/8 w - - 0 1
Ignoring the Q-side pawns, White or Black to move would be a win for White. With the Q-side pawns, however, it is Black that will win with either side to move.

Tony

Re: Is this rule safe (how has K&Ps vs K&Ps database

Post by Tony » Thu Jun 21, 2007 6:13 am

mjlef wrote:Here is a very old rule I have had in NOW:

If you are in a King and Pawns versus King and Pawns endgame AND
for each passed pawn, ignoring the other pawns, lookup the position of that passed pawn and the kings in a KPK database for both sides to move AND
if the position shows as a win for both sides to move, give a nice juicy bonus.

Is this safe? Can you think of exceptions? Can anyone test this with some KPK databases?

Mark
Seems pretty safe. Not giving a bonus when it could isn't really a problem, giving one when it shouldn't, would be.

From memory, a exception of the latter would be a Fine position where black has an advance h-pawn (h5 ?), white an advanced c pawn (c6 ?). The white king is not in the square of one of the pawns, the black king in the square of the white pawn. However, by black moving Kh8-g7,f6 it moves between the 2 pawns (not making a choice to which pawn it's moving) and gets a draw by reaching the square of a pawn.

Your heuristic would score it as a win for black.

Tony

mjlef
Posts: 1315
Joined: Thu Mar 30, 2006 12:08 pm
Contact:

Re: Is this rule safe (how has K&Ps vs K&Ps database

Post by mjlef » Thu Jun 21, 2007 7:17 am

jwes wrote:
mjlef wrote:Here is a very old rule I have had in NOW:

If you are in a King and Pawns versus King and Pawns endgame AND
for each passed pawn, ignoring the other pawns, lookup the position of that passed pawn and the kings in a KPK database for both sides to move AND
if the position shows as a win for both sides to move, give a nice juicy bonus.

Is this safe? Can you think of exceptions? Can anyone test this with some KPK databases?

Mark
Here is a won position that won't get the bonus.
[D]8/8/2p5/P2k4/8/1K6/8/8 w - - 0 1
Thanks for the position. I did not mean for my rule to find all wins. By "safe" I meant if the rule thinks the position is likely to be a win, is it really a draw or loss. It is just meant to find some wins, not all of them. Of course, if you have some perfect K&Ps vs K&Ps rules, please send them to me! ;-)

mjlef
Posts: 1315
Joined: Thu Mar 30, 2006 12:08 pm
Contact:

Re: Is this rule safe (how has K&Ps vs K&Ps database

Post by mjlef » Thu Jun 21, 2007 7:19 am

rjgibert wrote:[D]8/4k3/6P1/4K3/1p6/p7/P7/8 w - - 0 1
Ignoring the Q-side pawns, White or Black to move would be a win for White. With the Q-side pawns, however, it is Black that will win with either side to move.
Great position. Maybe I can fix my rules by looking for pawns that could soon be passers for the other side, and not use the rule in this case. Thanks!

Mark

ed

Re: Is this rule safe (how has K&Ps vs K&Ps database

Post by ed » Thu Jun 21, 2007 10:14 am

You probably mean the Reti position.

http://en.wikipedia.org/wiki/Richard_R%C3%A9ti

Ed

Tony wrote:
mjlef wrote:Here is a very old rule I have had in NOW:

If you are in a King and Pawns versus King and Pawns endgame AND
for each passed pawn, ignoring the other pawns, lookup the position of that passed pawn and the kings in a KPK database for both sides to move AND
if the position shows as a win for both sides to move, give a nice juicy bonus.

Is this safe? Can you think of exceptions? Can anyone test this with some KPK databases?

Mark
Seems pretty safe. Not giving a bonus when it could isn't really a problem, giving one when it shouldn't, would be.

From memory, a exception of the latter would be a Fine position where black has an advance h-pawn (h5 ?), white an advanced c pawn (c6 ?). The white king is not in the square of one of the pawns, the black king in the square of the white pawn. However, by black moving Kh8-g7,f6 it moves between the 2 pawns (not making a choice to which pawn it's moving) and gets a draw by reaching the square of a pawn.

Your heuristic would score it as a win for black.

Tony

Tony

Re: Is this rule safe (how has K&Ps vs K&Ps database

Post by Tony » Thu Jun 21, 2007 11:57 am

That's the one yes.

Tony

User avatar
xsadar
Posts: 146
Joined: Wed Jun 06, 2007 8:01 am
Contact:

Re: Is this rule safe (how has K&Ps vs K&Ps database

Post by xsadar » Thu Jun 21, 2007 7:56 pm

mjlef wrote:Here is a very old rule I have had in NOW:

If you are in a King and Pawns versus King and Pawns endgame AND
for each passed pawn, ignoring the other pawns, lookup the position of that passed pawn and the kings in a KPK database for both sides to move AND
if the position shows as a win for both sides to move, give a nice juicy bonus.

Is this safe? Can you think of exceptions? Can anyone test this with some KPK databases?

Mark
Mark,

What if ignored pawns block a king from getting to a passed pawn in time (to defend or capture it) but the king would be able to get to it if they weren't there? I'm not 100% certain that it could be a problem in the positions you describe, but it sounds plausible, so you may want to look at it to see if it's possible.

Mike Leany

Post Reply