Hmmm, I am afraid I do not see anything relative to discovered check here ...No need for diagram
The idea is
Rd1 attacks king at d8 and King at c1 attacks rook at b2 at the same time.
Uri

Moderator: Ras
Hmmm, I am afraid I do not see anything relative to discovered check here ...No need for diagram
The idea is
Rd1 attacks king at d8 and King at c1 attacks rook at b2 at the same time.
Uri
The rook move from a1 to d1 when white castles when the king that is the moving piece in castling attack the rook at b2.tvrzsky wrote:Hmmm, I am afraid I do not see anything relative to discovered check here ...No need for diagram
The idea is
Rd1 attacks king at d8 and King at c1 attacks rook at b2 at the same time.
Uri
8 | |||||||||
7 | |||||||||
6 | |||||||||
5 | |||||||||
4 | |||||||||
3 | |||||||||
2 | |||||||||
1 | |||||||||
a | b | c | d | e | f | g | h |
8 | |||||||||
7 | |||||||||
6 | |||||||||
5 | |||||||||
4 | |||||||||
3 | |||||||||
2 | |||||||||
1 | |||||||||
a | b | c | d | e | f | g | h |
8 | |||||||||
7 | |||||||||
6 | |||||||||
5 | |||||||||
4 | |||||||||
3 | |||||||||
2 | |||||||||
1 | |||||||||
a | b | c | d | e | f | g | h |
This is not exactly that it can only happen in the particular positionhgm wrote:Yes, this would be effectively the same, and actually more likely to occur in a game than what I had in mind:
8 7 6 5 4 3 2 1 a b c d e f g h
8/8/8/8/8/8/1r6/R3K1k1 w Q -
What it has in common with a discovered check is that the white Rook, which was formerly blocked by its own King, now has unhindred passage to the enemy King, and that this was achieved by moving the blocking piece out of the way, and attacking something else with that piece (namely the black Rook).
Interesting thing is that this can only happen to a Rook, and only in this particular position. Every other piece a King might attack after castling (and did not attack before) would actually make the castling illegal by either checking the king before or after it, or attacking the square the King has to pass. And of course the King can also not capture something during castling.
8 | |||||||||
7 | |||||||||
6 | |||||||||
5 | |||||||||
4 | |||||||||
3 | |||||||||
2 | |||||||||
1 | |||||||||
a | b | c | d | e | f | g | h |
This is why I did not count it. The danger of a discovered check is determined by if you can threaten something that could not be captured before.Uri Blass wrote:... of course capturing the rook immediatly instead of castling is simpler.
8 | |||||||||
7 | |||||||||
6 | |||||||||
5 | |||||||||
4 | |||||||||
3 | |||||||||
2 | |||||||||
1 | |||||||||
a | b | c | d | e | f | g | h |
I cannot evaluate positions with no king and my evaluation function assume that there is a king in the board(how do you evaluate king safety without having king square when no pawns near the king or pieces that attack squares near the king mean that the king is not safe?).hgm wrote:One more thought:
Perhaps a good way to treat d=0 in-check positions is a trick similar to null move:
Rather than trying every evasion, make the King do a 'disappearance act'. Just remove it from the board, and give the move to the opponent. If this fails high, classify the check as harmless and stand pat, assuming that having the move will allow you to find an evasion that does not make you end up worse than the current evaluation.
You might only want to do this where you don't have a good/equal capture on the checker; if you have one, you might simply ignore the check and stand pat. Or, if stand pat is not enough, try the good capture first.
If you are in check in a fail-low horizon node (CurEval <= Alpha) you don't want to do anything special. If you were not in check (and have no captures that save the day) you would gracefully accept the fail low. As being in check doesn't make the situation any better, there is no reason to handle it differently here. So this 'King-poof pruning' only makes sense if CurEval >= Beta.
8 | |||||||||
7 | |||||||||
6 | |||||||||
5 | |||||||||
4 | |||||||||
3 | |||||||||
2 | |||||||||
1 | |||||||||
a | b | c | d | e | f | g | h |
Movei statically recognize checkmates for a long time.hgm wrote:This is why I did not count it. The danger of a discovered check is determined by if you can threaten something that could not be captured before.Uri Blass wrote:... of course capturing the rook immediatly instead of castling is simpler.
E.g., the following is rather harmless:
8 7 6 5 4 3 2 1 a b c d e f g h
8/8/8/8/8/7b/8/k5KR w
Although 1. Kh2+ is undeniably a discovered check, there is no need to treat it much different from an ordinary check. (A King cannot be x-rayed, so the number of attacks on the Bishop does not increase.) With black to move it would still be special in the sense that it would be unwise to venture with anything onto e2, e3, f3, g3.
Of course there are plenty other check threats putting a second piece under attack with a direct check (e.g. forks). But these still fall in an on the average less dangerous class: against them the evasion mode 'capturing the attacker' is available, (and thus pre-emptively defending the square from which the fork can be given). When two different pieces attack two different victims, neither pure withdrawal nor capturing the attacker can save you.
I guess one should take all this into account when deciding how to handle being in check in a horizon node. If it is a bare check, you might not want to waste time on extending it, and just stand pat, as having the move should solve it in the vast majority of cases. (It would be nice to statically recognize checkmate, though, as this would not require an extension and thus be comparatively cheap.) Only if it is a check+threat it might pay off to reverse the burdon of proof, and give the extension to see if any check evasions exist that solve the threat as well. (And if not, how bad the threat really is.)
I found a better examplehgm wrote:This is why I did not count it. The danger of a discovered check is determined by if you can threaten something that could not be captured before.Uri Blass wrote:... of course capturing the rook immediatly instead of castling is simpler.
E.g., the following is rather harmless:
8 7 6 5 4 3 2 1 a b c d e f g h
8/8/8/8/8/7b/8/k5KR w
Although 1. Kh2+ is undeniably a discovered check, there is no need to treat it much different from an ordinary check. (A King cannot be x-rayed, so the number of attacks on the Bishop does not increase.) With black to move it would still be special in the sense that it would be unwise to venture with anything onto e2, e3, f3, g3.
Of course there are plenty other check threats putting a second piece under attack with a direct check (e.g. forks). But these still fall in an on the average less dangerous class: against them the evasion mode 'capturing the attacker' is available, (and thus pre-emptively defending the square from which the fork can be given). When two different pieces attack two different victims, neither pure withdrawal nor capturing the attacker can save you.
I guess one should take all this into account when deciding how to handle being in check in a horizon node. If it is a bare check, you might not want to waste time on extending it, and just stand pat, as having the move should solve it in the vast majority of cases. (It would be nice to statically recognize checkmate, though, as this would not require an extension and thus be comparatively cheap.) Only if it is a check+threat it might pay off to reverse the burdon of proof, and give the extension to see if any check evasions exist that solve the threat as well. (And if not, how bad the threat really is.)
8 | |||||||||
7 | |||||||||
6 | |||||||||
5 | |||||||||
4 | |||||||||
3 | |||||||||
2 | |||||||||
1 | |||||||||
a | b | c | d | e | f | g | h |