Endgame

As the number of moves available to each player decreases towards the end of the game, Zebra can search much deeper in the endgame phase of the game. In close games, Zebra can usually determine who is winning with 25-32 moves left of the game, in lopsided games even earlier. The perfect-play score is harder to calculate but can usually be found with about 23-28 moves left of the game.

The search algorithms used in the midgame work well also in the endgame; the position evaluation is switched off as all variations are searched until no player has any feasible moves. A variation of Multi Prob-Cut is used to determine preliminary scores and find moves likely to be best before the real endgame search starts.

One difference between midgame and endgame search algorithms is that the move ordering heuristics that work well in the midgame are not necessarily the best in the endgame. This is because an endgame search deals with proving who wins (and by how much) whereas a midgame search prunes bad lines and concentrate on the lines that seem good.

Zebra contains a version of the fastest-first heuristic. The key idea is that the first move to consider in a strong position should be the one for which it is easiest to prove that the position is a win. This does not necessarily coincide with the move preferred by the midgame search algorithm. The amount of work to prove that a move is winning is heavily dependent on the number of moves available to the opponent after the move is made, and move ordering is therefore based on both midgame evaluation and opponent mobility.