That is the same as extending one ply.lucasart wrote:The qsearch should simply generate all legal check evasions when in check (rather than captures only).
Is a Check Extension Really a Win?
Moderators: hgm, Rebel, chrisw
-
- Posts: 27796
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Is a Check Extension Really a Win?
-
- Posts: 2929
- Joined: Sat Jan 22, 2011 12:42 am
- Location: NL
Re: Is a Check Extension Really a Win?
Coincidentally I just ran a somewhat similar test in one of my engines: it had a simple "if (in check) depth++" style check extensions, which I replaced with a more sensible "if (move gives check and see>=0) extension=1".
It gained about 18 Elo in self-play. The game in question was not chess though (it was Makruk), so results may not be directly comparable.
It gained about 18 Elo in self-play. The game in question was not chess though (it was Makruk), so results may not be directly comparable.
-
- Posts: 778
- Joined: Sat Jul 01, 2006 7:11 am
Re: Is a Check Extension Really a Win?
It is not quite the same. If you are already in qsearch, extending has no meaning.hgm wrote:That is the same as extending one ply.lucasart wrote:The qsearch should simply generate all legal check evasions when in check (rather than captures only).
-
- Posts: 27796
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Is a Check Extension Really a Win?
If I am at depth = 0, then extending means depth 1...
-
- Posts: 154
- Joined: Thu Oct 03, 2013 4:17 pm
Re: Is a Check Extension Really a Win?
This thread was actually a pretty fun coincidence, as I started a test on check extension on thursday morning. I was away for three days so I couldn't reply earlier, but here are my results. 2.569 has check extension, 2.570 doesn't. Games were at 15s+0.05s.
I don't prune or reduce checks of any kind so 2.570 still kinda has check extension, it's just not explicit.
Code: Select all
Rank Name Elo + - games score oppo. draws
1 Hakkapeliitta 2.570 3 2 3 39589 51% -3 49%
2 Hakkapeliitta 2.569 -3 3 2 39589 49% 3 49%
Functional programming combines the flexibility and power of abstract mathematics with the intuitive clarity of abstract mathematics.
https://github.com/mAarnos
https://github.com/mAarnos
-
- Posts: 433
- Joined: Fri Jan 16, 2015 4:02 pm
Re: Is a Check Extension Really a Win?
Based on SEE>=0 suggestion I did the following since I haven't implemented SEE:
In other words: do not extend if we can just take the piece and gain material.
This is nice 12-15 ELO improvement.
Code: Select all
if !pos.IsAttackedBy(move.To(), them) || pos.IsAttackedBy(move.To(), us) {
// extend
}
This is nice 12-15 ELO improvement.
-
- Posts: 175
- Joined: Fri Oct 22, 2010 9:47 pm
- Location: Austria
Re: Is a Check Extension Really a Win?
Hi Alexandru, I don't see in your code any part checking that is "gaining material". Incorrect quotation or incorrect interpretation?brtzsnr wrote:Based on SEE>=0 suggestion I did the following since I haven't implemented SEE:
In other words: do not extend if we can just take the piece and gain material.Code: Select all
if !pos.IsAttackedBy(move.To(), them) || pos.IsAttackedBy(move.To(), us) { // extend }
This is nice 12-15 ELO improvement.
-
- Posts: 433
- Joined: Fri Jan 16, 2015 4:02 pm
Re: Is a Check Extension Really a Win?
The code says: if the checked side can attack but the side giving check (us) cannot defend then it's most likely we can just take the piece so despite the check it a material loss for the side checking.
It's very crude and omits capture but it works surprisingly well. SEE gives 15-18 ELO from somebody's else estimate so the difference is 2-3ELO.
It's very crude and omits capture but it works surprisingly well. SEE gives 15-18 ELO from somebody's else estimate so the difference is 2-3ELO.
-
- Posts: 175
- Joined: Fri Oct 22, 2010 9:47 pm
- Location: Austria
Re: Is a Check Extension Really a Win?
Sorry, what I see here is:brtzsnr wrote:The code says: if the checked side can attack but the side giving check (us) cannot defend then it's most likely we can just take the piece so despite the check it a material loss for the side checking.
It's very crude and omits capture but it works surprisingly well. SEE gives 15-18 ELO from somebody's else estimate so the difference is 2-3ELO.
"if they can't attack OR we can defend"
Which means, if we check for example with the queen, and they attack it with a pawn, but we defend it (with whatever), then you extend. But this is still material gain for "them". (Edited)
If you gain ELO it is ok, I just wanted to say that your initial interpretation was wrong.
-
- Posts: 433
- Joined: Fri Jan 16, 2015 4:02 pm
Re: Is a Check Extension Really a Win?
Code: Select all
us := pos.SideToMove
them := us.Opposite()
eng.evaluation.DoMove(move)
if pos.IsChecked(them) {
// Extend the search when our move gives check.
// However do not extend if we can just take the undefended piece.
// TODO: This is a very crude form of SEE.
// See discussion:
// http://www.talkchess.com/forum/viewtopic.php?t=56361
if !pos.IsAttackedBy(move.To(), them) || pos.IsAttackedBy(move.To(), us) {
depth += CheckDepthExtension
}
}