Some thoughts on QS
Posted: Thu Jul 19, 2012 11:20 pm
I am still looking for a pruning method in QS that is more effective in preventing search explosion through plunder raids of powerful pieces. One way to achieve this could be more aggressive pruning of captures that seem bad. Normally this is done only for captures that seem bad by SEE, i.e. through recapture on the same square. But this does not help against plunder raids, where two powerful pieces clean out the board, never exposing themselves to recapture in the process.
The idea is that a capture is bad if after making it, the opponent captures something even bigger, so that in two ply you achieved nothing other than lowering the current eval. But this is a bit too simple, because even with SEE the two ply do have a side effect, namely that you lured another, potentially more valuable piece to the capture square. (I don't want to consider side effects like discovered threats; these are too rare to make that pay off.)
If you capture Qx(protected R) it seems a bad idea, because after recapture you are down Q vs R. It could still end well if the recapturer is Q, and you had a second attacker (say K) on the square, which now does KxQ. SEE would catch that. But now consider the case where there is a pre-existing attack on your Q, and you can play NxR. The NxR looks good SEE-wise, because he can only recapture the less valuable N. But of course the situation is just as bad as wit Qx(protected R), because he will not recapture N, but Q. The pre-existing attack on your Q counts as pre-emptive protection of everything, as it were.
But again, there is the exception that the attack on your Q is with Q, and your Q was protected, so that the initial Rook capture is merely followed by a Queen trade. So perhaps we should only consider threats that are Low x High captures, or captures of unprotected pieces. (Or, in a more refined treatment, have SEE > 0.) In the face of a Qx(unprotected Q) threat it certainly seems unwise to capture a Rook. Even if it is PxR. This can help stopping unpromising plunder raids at an earlier stage; e.g. if I can do Qx(unprotected B) in the face of an existing threat Qx(unprotected R), it doesn't really further my cause to play QxB, despite its SEE of +3. The situation is in a sense similar as for an (unsupported R)x(protected B) capture, which has SEE = -2. So with the threatening loss of -5, it seems wise to prune anything that does not at least capture +5, even if it has SEE > 0.
This is not the whole story, though. There is an essential difference between retaliation on the same square and that on a different square: the initial capturer survives, and any new attacks it might have from the new location remain in existence after the retaliation. With exchange on the same square no new moves are created (ignoring discovered threats). If after PxR our P would check his K, we would not be put off by a threat against our unprotected Q. So in deciding whether a SEE>0 capture should be pruned because of a pre-existing counter threat, it should be taken into account not only what we capture, but also whether what we attack with that capture neutralizes the counter threat. E.g. if we have a hanging R, subject to PxR, but we can play Nx(unprotected B), where the N then attacks a Q, that latter attack serves as a pre-emptive defense of our R. Even if the Q is protected we stand to gain Q-N = +6 from that attack, outweighing the -5 loss of the Rook, with a B already in the pocket. So the capture is promising, and should not be pruned.
In summary:
* 'obvious threats' against us are attacks against unprotected pieces.
* The 'value' of such threats is defined as the value of the hanging piece.
* Captures of pieces worth less than the value of the worst threat against us are candidates for pruning, even if they have SEE>0.
* If such candidates create a new attack on an unprotected piece for us that is at least equal in value to our threatened piece, we must not prune.
* In addition, captures with our most-threatened piece must be searched even if they have SEE<0 when we have an attack against an unprotected more (or equally) valuable piece.
The latter because they create a situation in the daughter node where he now faces a threat of a hanging valuable piece against him, and will thus prune the recapture of our suicide attack, so that the SEE is not relevant. In fact we should even try it when the values are equal: although he now will not prune the recapture, we will cash our threat when he makes it, and it will be a mere trade (after we grabbed something with the initial capture). So the trade is material for tempo, which is not obviously bad, and thus does not deserve to be pruned.
The idea is that a capture is bad if after making it, the opponent captures something even bigger, so that in two ply you achieved nothing other than lowering the current eval. But this is a bit too simple, because even with SEE the two ply do have a side effect, namely that you lured another, potentially more valuable piece to the capture square. (I don't want to consider side effects like discovered threats; these are too rare to make that pay off.)
If you capture Qx(protected R) it seems a bad idea, because after recapture you are down Q vs R. It could still end well if the recapturer is Q, and you had a second attacker (say K) on the square, which now does KxQ. SEE would catch that. But now consider the case where there is a pre-existing attack on your Q, and you can play NxR. The NxR looks good SEE-wise, because he can only recapture the less valuable N. But of course the situation is just as bad as wit Qx(protected R), because he will not recapture N, but Q. The pre-existing attack on your Q counts as pre-emptive protection of everything, as it were.
But again, there is the exception that the attack on your Q is with Q, and your Q was protected, so that the initial Rook capture is merely followed by a Queen trade. So perhaps we should only consider threats that are Low x High captures, or captures of unprotected pieces. (Or, in a more refined treatment, have SEE > 0.) In the face of a Qx(unprotected Q) threat it certainly seems unwise to capture a Rook. Even if it is PxR. This can help stopping unpromising plunder raids at an earlier stage; e.g. if I can do Qx(unprotected B) in the face of an existing threat Qx(unprotected R), it doesn't really further my cause to play QxB, despite its SEE of +3. The situation is in a sense similar as for an (unsupported R)x(protected B) capture, which has SEE = -2. So with the threatening loss of -5, it seems wise to prune anything that does not at least capture +5, even if it has SEE > 0.
This is not the whole story, though. There is an essential difference between retaliation on the same square and that on a different square: the initial capturer survives, and any new attacks it might have from the new location remain in existence after the retaliation. With exchange on the same square no new moves are created (ignoring discovered threats). If after PxR our P would check his K, we would not be put off by a threat against our unprotected Q. So in deciding whether a SEE>0 capture should be pruned because of a pre-existing counter threat, it should be taken into account not only what we capture, but also whether what we attack with that capture neutralizes the counter threat. E.g. if we have a hanging R, subject to PxR, but we can play Nx(unprotected B), where the N then attacks a Q, that latter attack serves as a pre-emptive defense of our R. Even if the Q is protected we stand to gain Q-N = +6 from that attack, outweighing the -5 loss of the Rook, with a B already in the pocket. So the capture is promising, and should not be pruned.
In summary:
* 'obvious threats' against us are attacks against unprotected pieces.
* The 'value' of such threats is defined as the value of the hanging piece.
* Captures of pieces worth less than the value of the worst threat against us are candidates for pruning, even if they have SEE>0.
* If such candidates create a new attack on an unprotected piece for us that is at least equal in value to our threatened piece, we must not prune.
* In addition, captures with our most-threatened piece must be searched even if they have SEE<0 when we have an attack against an unprotected more (or equally) valuable piece.
The latter because they create a situation in the daughter node where he now faces a threat of a hanging valuable piece against him, and will thus prune the recapture of our suicide attack, so that the SEE is not relevant. In fact we should even try it when the values are equal: although he now will not prune the recapture, we will cash our threat when he makes it, and it will be a mere trade (after we grabbed something with the initial capture). So the trade is material for tempo, which is not obviously bad, and thus does not deserve to be pruned.