End game and Null move

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

lauriet
Posts: 199
Joined: Sun Nov 03, 2013 9:32 am

End game and Null move

Post by lauriet »

In general we don't do null move in the end game because of the danger of ZugZwang.
BUT:
How common is zugzwag ?
How endgame is endgame ?
Is it worth drawing a few games due to zugzwang to get the extra depth search gives with null move ?
Would my elo be better if I didn't worry about protecting against zugzwanf and do null move in the endgame ?
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: End game and Null move

Post by hgm »

The usual approach is to ignore zugzwang if you have at least one slider. This occasionally loses you an end-game with a Bishop, where the Bishop must protect two Pawns.

Note that not using null move is not the only way to recognize zugzwang; you can also do a verification search.

Whether it gains or loses Elo depends a lot on your evaluation. If the latter is good enough to have the engine pick a winning line as its first choice, zugzwang is no danger, as there can never be null-move pruning in a PV node. If you find a non-winning line with a reasonably good score first, it will never be superceded by a winning line in end-games that require zugzwang to be used. The opponent will start to defend against any alternative through null moves in the zugzwang positions, so that you will not be able to make progress, and your score will stay low in that line.

It seems that Crafty can win KRK with null move on; Fairy-Max cannot.

It should cost significant Elo when you are not able to win KPK or KRK. These are very common endings.

Of course not all Elos are the same. I guess it would cost you very little CCRL Elos if you are not able to actually win KPK and KRK, because the win would be adjudicated to you for free.
nionita
Posts: 175
Joined: Fri Oct 22, 2010 9:47 pm
Location: Austria

Re: End game and Null move

Post by nionita »

When I suppressed null move for STM having no piece a few months ago, the win was 6 Elo.
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: End game and Null move

Post by hgm »

Could you win KPK and KRK before that?
lauriet
Posts: 199
Joined: Sun Nov 03, 2013 9:32 am

Re: End game and Null move

Post by lauriet »

Does anyone know how common zugzwang is ?
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: End game and Null move

Post by hgm »

The question is not well defined. I would think that a quite large fraction of all chess games between closely matched opponents ends in KPK or KRK. Those can only be won through zugzwang.

There also is the problem that something that does not occur in any game can still have a huge impact on the game. E.g. when perpetual checking would be ruled a loss, hardly anyone would ever perpetually check. But the opportunity to perpetually check for a side that is badly behind might be plentiful (or there would have been no need for this rule in the first place), and all those games would have ended differently if all perpetual checking had been a draw.

A well-defined question would be this: if in games between otherwise equal opponents one thinks turn-passing is a legal move, but would not be allowed to play it in the root, how much below 50% would he score?
nionita
Posts: 175
Joined: Fri Oct 22, 2010 9:47 pm
Location: Austria

Re: End game and Null move

Post by nionita »

hgm wrote:Could you win KPK and KRK before that?
KRK yes, KPK often. But I did not do extensive tests with KPK.
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: End game and Null move

Post by hgm »

OK, that explains why you see little Elo impact. But it is quite possible (depending on your evaluation) that always doing null move (without verification) would prevent you from finding the KRK mate or PKP promotion. In that case it should cost you much more Elo.
jwes
Posts: 778
Joined: Sat Jul 01, 2006 7:11 am

Re: End game and Null move

Post by jwes »

lauriet wrote:In general we don't do null move in the end game because of the danger of ZugZwang.
BUT:
How common is zugzwag ?
How endgame is endgame ?
Is it worth drawing a few games due to zugzwang to get the extra depth search gives with null move ?
Would my elo be better if I didn't worry about protecting against zugzwanf and do null move in the endgame ?
My impression is that many if not most difficult endgames involve zugzwang, but these occur rarely in computer games.
An idea I had, but haven't tried, is to try zugzwang in endgames if the depth is > some small number and the hash table returns a fail high. Since this means the position failed high without zugzwang, and the consequences of zugzwang are generally immediate and large, this should avoid most zugzwangs.