]> git.sesse.net Git - stockfish/commit
Add KNNvKP Endgame Heuristic
authorKurtbusch <yoshi2jared@gmail.com>
Fri, 4 Jan 2019 23:27:14 +0000 (18:27 -0500)
committerStéphane Nicolet <cassio@free.fr>
Thu, 21 Feb 2019 18:53:03 +0000 (19:53 +0100)
commitbadb2aca44d6507f35dafc8b5c3921a6649a40f8
treef5fd592eb8f5362b01860d8abb04897d4b02cbdf
parente51244cb27151075ac7a05282d0ec615cf93f290
Add KNNvKP Endgame Heuristic

This is a somewhat different patch. It fixes blindspots for
 two knights vs pawn endgame.

With local testing starting from random KNNvKP positions where the
pawn has not advanced beyond the 4th rank (thanks @protonspring !)
at 15+0.15 (4 cores), this went +105=868-27 against master. All except
two losses were won in reverse.

The heuristic is simple but effective - the strategy in these endgames
is to push the opposing king to the corner, then move the knight that's
blocking the pawn in for the checkmate while the pawn is free to move
and prevents stalemate. This patch gives SF the little boost it needs
to search the relevant king-cornering mating lines.

See the discussion in pull request 1939 for some more good results for
this test in independant tests:
https://github.com/official-stockfish/Stockfish/pull/1939

Bench: 3310239
src/endgame.cpp
src/endgame.h
src/search.cpp