check extension

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: check extension

Post by bob »

AndrewShort wrote:ahhh, I see. I didn't realize that.

So if you happen to come across 4 checking moves in a main search path, the path is extended 4 ply. The checking moves are not necessarily every 2 plies - it could skip some plies, and also some checks are evaded by another check. And since you always extend one more ply when you see a check, that guarantees Quies will never start in check.
correct...
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: check extension

Post by bob »

AndrewShort wrote:still, though, as Aleks points out, check extensions do not exhaust a possible checking line. If there was only 1 check in the main search path, say, at the end, then the path is only extended 1 ply, where the opponent gets to evade the check.

Shouldn't the path be extended even further to see if the checking line can be continued - it could lead to mate. ?

or is that more for solving mating puzzles, as Aleks points out?
No. If you remove the incheck extension, you will find that the program plays worse against other computers and against humans. It is easy enough to check, as in crafty, the crafty.rc command "ext/check=0" will turn it off, then you can use winboard or whatever to play some games with and without to see the difference against other programs.
AndrewShort

Re: check extension

Post by AndrewShort »

My last question was not if one should remove check extensions. Rather, the question was if check extensions should be extended further.

As a simple example, if a main search path has only 1 checking move, then check extensions, as you have defined it, would expand that path one more ply. Suppose the one checking move would have been on the end of the main path before extension. So the one extra ply will find the opponent's way out of check, but then the checker could keep checking, and lead to mate, but you wouldn't know that from having extended only 1 ply. Why not keep extending 2 plies at a time until the checking stops?
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: check extension

Post by bob »

AndrewShort wrote:My last question was not if one should remove check extensions. Rather, the question was if check extensions should be extended further.

As a simple example, if a main search path has only 1 checking move, then check extensions, as you have defined it, would expand that path one more ply. Suppose the one checking move would have been on the end of the main path before extension. So the one extra ply will find the opponent's way out of check, but then the checker could keep checking, and lead to mate, but you wouldn't know that from having extended only 1 ply. Why not keep extending 2 plies at a time until the checking stops?
Because you now have the potential to produce a never-ending search. If you increment by two plies, and you get into a +long+ sequence of non-repeating checks, when you search 30 plies deep you still have just as many plies left to search as when you started. If you extend by more than two plies the remaing depth _grows_ as the search progresses and again, you will never get an answer back.
Tony

Re: check extension

Post by Tony »

AndrewShort wrote:My last question was not if one should remove check extensions. Rather, the question was if check extensions should be extended further.

As a simple example, if a main search path has only 1 checking move, then check extensions, as you have defined it, would expand that path one more ply. Suppose the one checking move would have been on the end of the main path before extension. So the one extra ply will find the opponent's way out of check, but then the checker could keep checking, and lead to mate, but you wouldn't know that from having extended only 1 ply. Why not keep extending 2 plies at a time until the checking stops?
You should realize that checkextensions are mostly used to avoid the horizon effect, not to avoid/find checkmates.

Tony
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: check extension

Post by bob »

Tony wrote:
AndrewShort wrote:My last question was not if one should remove check extensions. Rather, the question was if check extensions should be extended further.

As a simple example, if a main search path has only 1 checking move, then check extensions, as you have defined it, would expand that path one more ply. Suppose the one checking move would have been on the end of the main path before extension. So the one extra ply will find the opponent's way out of check, but then the checker could keep checking, and lead to mate, but you wouldn't know that from having extended only 1 ply. Why not keep extending 2 plies at a time until the checking stops?
You should realize that checkextensions are mostly used to avoid the horizon effect, not to avoid/find checkmates.

Tony
Good point. A check delays things by one whole move since once you are in check, you are obligated to get out of check before you can do anything else, such as pick up a trapped queen. But if the check burns two plies, so that you have none left to search with, then you don't see losing the queen, and if you don't see it, it doesn't happen. Extending checks makes the search see beyond the check(s) so that the trapped queen is lost with or without the checks in the tree.
AndrewShort

Re: check extension

Post by AndrewShort »

ok, I understand. thanks for clarifying it for me.

I presume the check extension, in combination with the singular move extension and the null move threat extension - that combination is probably amazing at seeing threats, particularly mating threats.
Tony

Re: check extension

Post by Tony »

AndrewShort wrote:ok, I understand. thanks for clarifying it for me.

I presume the check extension, in combination with the singular move extension and the null move threat extension - that combination is probably amazing at seeing threats, particularly mating threats.
Yes, but for the remaining 98% of all positions, it will play pretty crappy.

Some do seem able to avoid tree explosion ( Sjeng comes to mind: very strong tacticly) but most don't.

Tony
AndrewShort

Re: check extension

Post by AndrewShort »

Good point!

Seems a never ending battle - you want to extend, bot not too much. You also want to reduce, but not too much. The sweet spot must take years to find... :-)
Tony

Re: check extension

Post by Tony »

AndrewShort wrote:Good point!

Seems a never ending battle - you want to extend, bot not too much. You also want to reduce, but not too much. The sweet spot must take years to find... :-)
I don't know. I've only been doing this for 10 years.

Tony