White moves and wins |
In order to not tell false positives (classify a position as DRAW which is not) the recognizer code was very complicated. It had to spot all the exceptions. Even KNNK is not necessarily always a DRAW.
A lot of effort went in to assembling all those rules but now I finally decided to test how much damage it does if I throw them away. And the answer is
None at all.
"By a strange coincidence “None at all” is exactly how much suspicion the ape-descendant Arthur Dent had that one of his closest friends was not descended from an ape, but was, in fact, from a small planet somewhere in the vicinity of Betelgeuse." D. Adams.
So I trowed them out and replaced them by a scaling factor for each endgame type that scales the score towards a draw, sometimes depending on some easy knowledge (e.g. wrong rook pawn). Maybe iCE will play a bit more stupid in endgames but it does not hurt its overall playing strength. So I take the chance to remove 16.000 lines of code (6000 lines real code and 10.000 lines for additional tables that contain positions with exceptions).
A big step towards simplification.
The git protocol
D:\Docs\cpp\ice\ice>git merge eg-simplify
Updating cd74337..3d18b03
Fast-forward
endgame.cpp | 144 -
endgame.h | 23 -
eval.cpp | 66 +-
eval.h | 52 +-
evaleg.cpp | 6044 ++------------------------------
krkp.h | 10947 ----------------------------------------------------------
version.h | 6 +-
7 files changed, 399 insertions(+), 16883 deletions(-)
delete mode 100644 krkp.h