null move revisited

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
hgm
Posts: 28457
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

null move revisited

Post by hgm »

In the thread about 'Jokerchess' some interesting issues came up in connection with null-move pruning, which could have general implications. Therefore I decided to start a new thread about it.

The issues originally came up because of the presence of a Joker piece, which moves like the opponent piece moved in the previous ply. (I.e. if the opponent moved a Knight, the Joker can do any Knight move, etc.) The question is: which Joker moves should you search in reply to a null move? None, because the opponent did not move anything? All, like a 'super-piece' that combines moves of Queen and Knight? Some intermediate of that?

What does this have to do with orthodox Chess? Well, in many cases Joker tactics is logically equivalent to a pin. If my Joker attacks a Queen through a Knight jump, this is merely a 'virtual attack', as I am not sure the Joker can move as a Knight on the upcoming turn. It is the opponent that determines that, by moving a Knight, or not. As allowing his Queen to be taken by the Joker will obviously be a bad deal, it means he cannot move a Knight. It is as if the Knight is soft-pinned against the Queen by the Joker. He either must move away the Queen from the dangerous position, or chase the Joker away (there is no interposing on Knight moves, so this is like a 'contact pin'), before he can safely move his Knight again.

Now normally the fact that my Knight is pinned would not be a reason to refrain from null moving (or, equivalently, make the null move fail low). If a Rook would have soft-pinned a Knight against a Queen, we would definitely not search the move RxQ where the Rook jumps over the pinned Knight. In analogy, it thus seems not necessary to search the 'virtual capture' JxQ in the null-move reply. Because this same argument can be made for any of the virtual threats made by the Joker, one arrives at the conclusion that it is not necessary to search any of the Joker moves. They are all virtual, and the opponent can prevent you execute them by not moving the corresponding piece. Just as you can prevent he cashes in on a soft-pin by not moving the pinned piece.

There is a snag, however: the virtual moves of a Joker constitute a super-piece, and thus can create a substantial number of soft-pin at once. Especially since (unlike a real super-piece) the Joker is likely worth less than a Rook, so even virtual attacks against protected R or Q are dangerous, and paralyze the piece that could make that capture. In addition, it does not just 'pseudo-pin' a single piece, but all pieces of a given type (which is often two). Plus that it is can pseudo-pin several types at once: if the Joker steps diagonally next to an unprotected Rook, you now stand to lose a Rook when you move any of your Q, B, K or P!

Especially in the end-game, when you don't have many pieces, and thus not much choice, such massive pinning can totally paralyze you. If you have only K, N and Pawns, and the Joker manages to pseudo-pin N on K and K on N, you can only move Pawns, which likely will not resolve the Pins, and brings you in zugzwang pretty quickly. You will only see the zugzwang if the null move fails low. And the multiple pseudo-pin is relatively easy to accomplish through a virtual fork: put the Joker next to a Knight at a Knight's jump from the King. This is out of range from both Knight and King. Moving the Knight would expose your king to JxK, and is thus absolutely forbidden, while moving the King activates JxN. This creates an unresolvable perpetual zugzwang, and you would never know it unless you would search at least some of the virtual Joker moves in the null-move reply.

[d]8/8/8/3Nb3/8/5K2/8/8 w
The Bishop represents a Joker, virtually forking N and K

So the moral lesson is: (soft-)pins are not too dangerous, unless there are very many of them, and you have only few pieces. Or in other words, if too large a fraction of your pieces is pinned, you are likely to be in zugzwang. This brings a position in mind from Capablanca Chess, in the K+A (= Archbishop = BN compound) vs K+C (= Chancellor = RN compound), where the A can get an 'unbreakable' pin on the C. To recognize such positions when null-move pruning is still on you should take some special action to make null move fail low if too large a fraction of your pieces suffers from pin-paralysis. Pins where the pin target is responsible for protecting the pinned piece are particularly bad. (In Chinese Chess there the infamous case of a Cannon trapped between opposing Rooks is also an example of that.)

[d]8/8/8/4b3/3R4/2K5/8/8 w
R and B represent C and A (i.e. both also move as N), which causes an unbreakable pin of the Chancellor
[d]8/8/5p2/3KpP2/4R3/5b2/8/8 w
An unbreakable pin in orthodox Chess
Pippo
Posts: 50
Joined: Tue Mar 04, 2014 6:40 pm
Location: Murcia España

Re: null move revisited

Post by Pippo »

Maybe - at least in some circumstance - it could be useful to try with something like a strategy in 4 steps:

1. To make a "null move pruning" only with standard pieces (namely assigning no imitation value to enemy joker(s))
2. To extimate some good movement for you with some of your pieces.
3. To repeat the "null move pruning" assigning now to the enemy joker(s), one by one, the imitation values of those pieces.
4. Finally, to move the most safe piece.

Alternatively, in the step 1, you could assign to the enemy joker(s) imitation of king [since you have previously show - in the "chessjoker" thread - that it is a good approximate approach].

Undoubtly, this criterion could be too expansive when there are many pieces on board, but maybe not when are few.

Do you think that this idea could have some sense?