Is a Check Extension Really a Win?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Steve Maughan
Posts: 1221
Joined: Wed Mar 08, 2006 8:28 pm
Location: Florida, USA

Is a Check Extension Really a Win?

Post by Steve Maughan »

I inadvertently removed the check extension from Maverick. For a couple of days I was puzzled that Maverick's tactical ability seemed to have dropped. Then I stumbled across my error and corrected it.

Since I hadn't noticed a significant drop in playing strength I decided to test the value of the check extension. To my amazement the version without the check extension was 33 ELO stronger than the version with the extension (after 2000 lightning games)!!

Has anyone else observed this in their engine?

The check extension was a win when I put it in an early version of Maverick. The qsearch also has checks in the first ply and deeper if there is only one reply.

Could it be that LMR and checks in the first ply of the qsearch negate any benefit of simple check extensions?

- Steve
http://www.chessprogramming.net - Maverick Chess Engine
Henk
Posts: 7220
Joined: Mon May 27, 2013 10:31 am

Re: Is a Check Extension Really a Win?

Post by Henk »

If LMR does not reduce when in check or the move that gives check then that is your extension. For not reducing is almost the same as extending.

Check extension never worked well for Skipper but that says nothing.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Is a Check Extension Really a Win?

Post by Evert »

Steve Maughan wrote: Could it be that LMR and checks in the first ply of the qsearch negate any benefit of simple check extensions?
I suspect that it depends a bit on how exactly you do the check extension.

I think you can be very restrictive in extending checks. I don't extend checks that are "unsafe", and I expect (but haven't tested) that checks that are far from the horizon don't need to be extended (because the remaining depth is large enough to resolve the threat). If you simply do not reduce checks (as opposed to extend them) then that may already get you most of the benefit. Do you allow entering into quiescence search while in check? Doing checks on the first ply of quiescence is apparently also a big effect.

I seem to recall that in Crafty the check extension is not worth much either, stripped down as it is. I think this came up not long ago.
User avatar
Steve Maughan
Posts: 1221
Joined: Wed Mar 08, 2006 8:28 pm
Location: Florida, USA

Re: Is a Check Extension Really a Win?

Post by Steve Maughan »

Evert wrote:
Steve Maughan wrote: Could it be that LMR and checks in the first ply of the qsearch negate any benefit of simple check extensions?
I suspect that it depends a bit on how exactly you do the check extension.

I think you can be very restrictive in extending checks. I don't extend checks that are "unsafe", and I expect (but haven't tested) that checks that are far from the horizon don't need to be extended (because the remaining depth is large enough to resolve the threat). If you simply do not reduce checks (as opposed to extend them) then that may already get you most of the benefit. Do you allow entering into quiescence search while in check? Doing checks on the first ply of quiescence is apparently also a big effect.

I seem to recall that in Crafty the check extension is not worth much either, stripped down as it is. I think this came up not long ago.
Hi Evert,

Currently I have a simple implementation which says, "if the move gives check then extend". I also don't go into the qsearch if in check. I need to add "was that an unsafe move" code and test it.

Thanks - Steve
http://www.chessprogramming.net - Maverick Chess Engine
jdart
Posts: 4367
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: Is a Check Extension Really a Win?

Post by jdart »

I agree - I don't extend unsafe checks either (defined for me as checks that lose >1 pawn) and I apply only a fractional ply extension to checks. If you are not careful you can blow up the size of the search tree with fruitless checks.

--Jon
PK
Posts: 893
Joined: Mon Jan 15, 2007 11:23 am
Location: Warsza

Re: Is a Check Extension Really a Win?

Post by PK »

Senpai extends all checks in pv nodes, but in non-pv nodes does it only if remaining depth is < 6 plies (or some other relatively small number). I'm doing the same in Rodent, using slightly larger number IIRC.
cetormenter
Posts: 170
Joined: Sun Oct 28, 2012 9:46 pm

Re: Is a Check Extension Really a Win?

Post by cetormenter »

It seems like its a win in Nirvana even after a short number of games.

In the release version I only extend checks where see >= 0. In NoCheck no checks are extended and for AllCheck every single check is extended.

All games were run at 2" + 0.05" so very quick time controls.

Code: Select all

Rank Name      Elo    +    - games score oppo. draws 
   1 Release     8   17   17  1000   53%    -8   50% 
   2 NoCheck    -8   17   17  1000   47%     8   50% 

Code: Select all

Rank Name      Elo    +    - games score oppo. draws 
   1 Release     6   17   17  1000   52%    -6   47% 
   2 AllCheck   -6   17   17  1000   48%     6   47% 
The difference is very small but definitely noticeable so I am not sure how you are getting an additional 33 elo from not extending any checks.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Is a Check Extension Really a Win?

Post by bob »

Steve Maughan wrote:I inadvertently removed the check extension from Maverick. For a couple of days I was puzzled that Maverick's tactical ability seemed to have dropped. Then I stumbled across my error and corrected it.

Since I hadn't noticed a significant drop in playing strength I decided to test the value of the check extension. To my amazement the version without the check extension was 33 ELO stronger than the version with the extension (after 2000 lightning games)!!

Has anyone else observed this in their engine?

The check extension was a win when I put it in an early version of Maverick. The qsearch also has checks in the first ply and deeper if there is only one reply.

Could it be that LMR and checks in the first ply of the qsearch negate any benefit of simple check extensions?

- Steve
I tested all the classic extensions a few years ago. And if you look at Crafty today, you won't find recapture extensions, passed pawns to an advanced rank extensions and such. The ONLY extension I found that hurt when it was removed was the check extension. I believe it was worth maybe 20 Elo or so at best. But notice I do NOT extend every check. I exclude checks with a SEE < 0, specifically.
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Is a Check Extension Really a Win?

Post by hgm »

In micro-Max check extension only added any Elo when I switched it off together with King Safety (i.e. when the end-game starts, and you decide the King can safely walk towards the center). Leaving it on in the end-game would sink way too much search effort into checks, which in general lead nowhere.

It has been claimed that the main benefit of check extension is to make it more difficult to use checks as a delaying tactic to push trouble over the horizon. In that case you would only have to worry on checks that fail high. In practice this might amount to the same thing as only extending SEE>0 checks, as checks that burn material are likely to fail low even without extension.
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Is a Check Extension Really a Win?

Post by lucasart »

Steve Maughan wrote: Currently I have a simple implementation which says, "if the move gives check then extend".
No wonder it's an elo loss. There are so many dumb checks like crashing your queen against the opponent's king shelter... You should only extend checks that aren't outright stupid. What I do in DiscoCheck is extend checks that are either discovered checks, or have a SEE >= 0. The SEE is a costly calculation, so you should optimize your SEE, and have an SEE caching mechanism.

As for not going in the qsearch when in check, I'm not sure exactly what you mean, but it sounds like a bad idea. The qsearch should simply generate all legal check evasions when in check (rather than captures only). Then you can refine (see Stockfish).

PS: If you're not optimizing for elo, and want your engine to be a mate finder, then you probably should extend all checks.
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.