check extension

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.
User avatar
lucasart
Posts: 3014
Joined: Mon May 31, 2010 11:29 am
Full name: lucasart
Contact:

check extension

Post by lucasart » Mon Dec 03, 2018 4:41 am

Demolito extends checks, whose SEE >= 0.

In practice, I've never seen search explosions as a result, but I wonder…

Is it possible to have long sequences of checks, which involve no position repetition, and no SEE losing moves?
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.

Joost Buijs
Posts: 772
Joined: Thu Jul 16, 2009 8:47 am
Location: Almere, The Netherlands

Re: check extension

Post by Joost Buijs » Mon Dec 03, 2018 6:01 am

In endgames with only queens and just a few pawns it happens often that a king is chased over the entire board without getting a repetition, there are probably more situations where this can happen.

User avatar
lucasart
Posts: 3014
Joined: Mon May 31, 2010 11:29 am
Full name: lucasart
Contact:

Re: check extension

Post by lucasart » Mon Dec 03, 2018 8:44 am

Joost Buijs wrote:
Mon Dec 03, 2018 6:01 am
In endgames with only queens and just a few pawns it happens often that a king is chased over the entire board without getting a repetition, there are probably more situations where this can happen.
Consecutive checks? I'm talking about check at every single ply (both sides), not 1 check per move.
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.

User avatar
Eelco de Groot
Posts: 3971
Joined: Sun Mar 12, 2006 1:40 am
Location: Groningen

Re: check extension

Post by Eelco de Groot » Mon Dec 03, 2018 10:26 am

No that does not happen of course. If the king is to move or the check has to be countered in some other way and there are no (other) extensions on that ply, searchdepth will eventually go down even if there are still more checks from the other side. Only for the side giving checks (that don't repeat the position) the searchdepth does not go down.
Last edited by Eelco de Groot on Mon Dec 03, 2018 10:33 am, edited 1 time in total.
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
lucasart
Posts: 3014
Joined: Mon May 31, 2010 11:29 am
Full name: lucasart
Contact:

Re: check extension

Post by lucasart » Mon Dec 03, 2018 10:31 am

Eelco de Groot wrote:
Mon Dec 03, 2018 10:26 am
No that does not happen of course. If the king is to move or the check has to be countered in some other way and there are no (other) extensions on that ply, searchdepth will eventually go down once there are no more checks. But as long as there are checks that don't repeat the position searchdepth stays constant.
Yes, but how long? So far the longest sequence I can find is just 2 consecutive checks.
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.

Maarten Claessens
Posts: 99
Joined: Mon May 12, 2014 8:08 am
Location: Near Nijmegen

Re: check extension

Post by Maarten Claessens » Mon Dec 03, 2018 10:34 am

Nothing is unstable (Lawrence Krauss)

User avatar
Eelco de Groot
Posts: 3971
Joined: Sun Mar 12, 2006 1:40 am
Location: Groningen

Re: check extension

Post by Eelco de Groot » Mon Dec 03, 2018 10:40 am

Hi Lucas,

Sorry the answer I gave at first was wrong, had to edit.

Here I think I found an example of what Joost was saying, perpetual check by the queen, second diagram https://www.chessstrategyonline.com/con ... n-endgames (White has to allow a repeat of the position though, even if does not want that so not the best example. If the King has more squares available (or checking side does not want the draw) the checking sequences I think can get longer)
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

Joost Buijs
Posts: 772
Joined: Thu Jul 16, 2009 8:47 am
Location: Almere, The Netherlands

Re: check extension

Post by Joost Buijs » Mon Dec 03, 2018 12:36 pm

lucasart wrote:
Mon Dec 03, 2018 8:44 am
Joost Buijs wrote:
Mon Dec 03, 2018 6:01 am
In endgames with only queens and just a few pawns it happens often that a king is chased over the entire board without getting a repetition, there are probably more situations where this can happen.
Consecutive checks? I'm talking about check at every single ply (both sides), not 1 check per move.
I didn't understood that you meant checks at every ply (evasion gives check), in that case it doesn't seem likely, maybe it can happen over a few plies, but nothing more.

User avatar
hgm
Posts: 22627
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: check extension

Post by hgm » Mon Dec 03, 2018 4:42 pm

This is a pretty long sequence:

I am not sure if the requirement that SEE>=0 is realistic in such a sequence: the checks are also evasions, and pruning check evasions seems risky. Without this requirement you could probably make much loger sequences.

petero2
Posts: 562
Joined: Mon Apr 19, 2010 5:07 pm
Location: Sweden
Contact:

Re: check extension

Post by petero2 » Mon Dec 03, 2018 8:07 pm

lucasart wrote:
Mon Dec 03, 2018 4:41 am
Demolito extends checks, whose SEE >= 0.

In practice, I've never seen search explosions as a result, but I wonder…

Is it possible to have long sequences of checks, which involve no position repetition, and no SEE losing moves?
If the checks can also be captures, it is possible to construct a position with a quite long such sequence of checks. In normal positions, I don't think this will ever be a problem though.

Post Reply