]> git.sesse.net Git - stockfish/commit
Retire redundant endgames
authorMarco Costalba <mcostalba@gmail.com>
Thu, 22 Aug 2013 11:02:20 +0000 (13:02 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Thu, 22 Aug 2013 11:13:06 +0000 (13:13 +0200)
commitc4533e0d94a273cc10e0530a2953d369c6afbb8e
tree039a4cf23a5a2008562a7d84dd0be1b0274e892a
parentf39cf1b00801c1d2688fa2ba1375d211e205b13a
Retire redundant endgames

The case of two lone kings on the board is already considered
by the "No pawns" scaling factor rules in material.cpp as is
KBK and KNK.

Moreover we had a small leak in endgames map because for
KK endgame it happens white and black material keys are the
same (both equal to zero), so when adding the black endgame in
Endgames::add() we were overwriting the already exsisting
white one, leading to a memory leak found by Valgrind.

So remove the endgames althogheter and rely on scaling
to correctly set the endgames value to a draw.

No functional change.
src/endgame.cpp
src/endgame.h
src/material.cpp