So far, only Glaurung 2 epsilon can find, within 21 ply

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Alessandro Scotti

Re: So far, only Glaurung 2 epsilon can find, within 21 ply

Post by Alessandro Scotti »

Michael Sherwin wrote:What programming is needed to spot this in reasonable time?
My guess:
1) king piece/square table
2) king proximity to passed pawns

I think the above might hurt (or help) more than other terms in this position. Basically Hamsters can only find the solution if I strongly reduce or eliminate parameter number 2. This is something I'll test more deeply very soon...
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: So far, only Glaurung 2 epsilon can find, within 21 ply

Post by Michael Sherwin »

Alessandro Scotti wrote:
Michael Sherwin wrote:What programming is needed to spot this in reasonable time?
My guess:
1) king piece/square table
2) king proximity to passed pawns

I think the above might hurt (or help) more than other terms in this position. Basically Hamsters can only find the solution if I strongly reduce or eliminate parameter number 2. This is something I'll test more deeply very soon...
Like Mark indicated, if there is an outside passed pawn, case 2) may be the opposite of what is needed. Rewarding king proximity to the other side may be what is needed.
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
User avatar
Eelco de Groot
Posts: 4565
Joined: Sun Mar 12, 2006 2:40 am
Full name:   

Re: So far, only Glaurung 2 epsilon can find, within 21 ply

Post by Eelco de Groot »

Hello,

I thought that what might be important here in the case of Rebel is that Ed has taught it the "Quadrant" pretty extensively, and that a passed pawn on A or H-file is potentially more dangerous than other passed pawns. In this position it seem to me important that the pawn on a5, Knights exchanged, does not have to be supported by the own King if the opponent King gets outside of the "quadrant, or square" a5-d5-d8-a8. So this forces the Black King to go to the quadrant at all costs or the pawn is virtually promoted but then he has to leave all pawns on the Kingside unprotected.

Here is what Ed writes about the "Quadrant" rule:
Quadrant Rule : The Quadrant Rule is valid in the pawn ending only. If the black king is out of the quadrant of a white passed pawn the pawn is evaluated as promoted and so a bonus of 8 pawns is given, consider the diagram.

[D]6k1/8/8/8/8/8/P7/7K w - - 0 1

White to move simply plays 1.a4 and the black king is out of the quadrant, it can never reach the white pawn in time and so an 8 pawn bonus is given, but with black to move the black king simply steps into the quadrant with 1...Kf7 and the pawn can be stopped in time, so no bonus is given.

However the Quadrant Rule is full of stings and nasty obstacles, to name to few:

When the white king stands in the way before its own pawn, for example on A3, the quadrant needs a to be widened with one step since the white king blocks its own pawn.
There can be more than one passed pawn out of the Quadrant, you can of course bonus only one.
In case of an equal pawn-race between a white and black passed pawn both out of the quadrant and both promoting at the same time, 2 other aspects suddenly become dominant:
if the first pawn that promotes gives a check the other pawn will not make it and thus only the first pawn that promotes receives the 8.00 bonus.
if the first pawn that promotes controls the promotion square of the other (only possible during A/H pawn races), the other pawn will not make it also and thus also here only the first pawn that promotes will get the 8.00 bonus.
All these exceptions must be coded very precisely to avoid your engine to play funny moves. It might keep you busy for a couple of days programming and testing but it's really worthwhile the trouble, the Quadrant Rule is a very powerful algorithm in pawn endings.
http://www.top-5000.nl/authors/rebel/ch ... ED%20PAWNS

In the case of Toga however I think that it also knows something about the quadrant, Toga gets a bonus of 800 for unstoppable pawns, but still it needs more plies to solve this, maybe it is fruitful in this case of endings to teach the program playing White it can attack on two fronts, either support the passed a-pawn if that makes a difference in winning chances, White King can get between pawn and Black King for instance, or attack any undefended Black pawns and thus "overload" the enemy King.

Just some loose thoughts!

Eelco
mjlef
Posts: 1494
Joined: Thu Mar 30, 2006 2:08 pm

Re: So far, only Glaurung 2 epsilon can find, within 21 ply

Post by mjlef »

Yes, you must have some kind of "unstopable passed pawn" rule in K&Ps endgames. Being out of the square of the pawn gets a lot of them. Another one is if you have two passed pawns, draw a square on the board as tall as the files apart the pawns are (a square). If this is the case, then one of the pawns will promote. The king can now be in the square of both pawns, but as they advance, he loses. I remember years ago talking with "Hiarcs" Mark about this. He showed me two positions where Genius knew it was winning, and in both of them this "pawn square rule" which I got out of a chess book applied. So I am pretty sure Genius has this, and I am sure Hiarcs does too (and probably others).

My rules that helped in this position go something like this:

If one pawn is passed and many columns from the rest of the pawns, give it a bonus (I do tis if the passed pawn side has pawns on both sides of the board. The bonus goes up to about 1/3 a pawn as material lowers.
Always give a bonus for having the opposition (I use about 1/5 a pawn)
K= Calculate the difference in columns for the kings (K=2 if the white king is on say e file and the black king on the c file). If the white king is 2 or more columsn to the right (closer to the h file) than the black king, the white king is not on the h file and all the black pawns are on the right (files e, f g and h), give a bonus to white of a couple of pawns. Make the bonus bigger proportion to K.
(same rule for each color and each side).

I am sure these rules are probably nonsense (I am not a good player), but they seem to work OK combined with good search.

Mark