mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-17 23:56:23 +08:00
There is no need to special case KNNK ending
It is always draw, so use the corresponding proper evaluation function. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -61,8 +61,6 @@ namespace {
|
||||
ScalingFunction<KQKRP> ScaleKQKRP(WHITE), ScaleKRPKQ(BLACK);
|
||||
ScalingFunction<KPsK> ScaleKPsK(WHITE), ScaleKKPs(BLACK);
|
||||
ScalingFunction<KPKP> ScaleKPKPw(WHITE), ScaleKPKPb(BLACK);
|
||||
|
||||
Key KNNKMaterialKey, KKNNMaterialKey;
|
||||
}
|
||||
|
||||
|
||||
@@ -157,14 +155,6 @@ MaterialInfo* MaterialInfoTable::get_material_info(const Position& pos) {
|
||||
mi->clear();
|
||||
mi->key = key;
|
||||
|
||||
// A special case before looking for a specialized evaluation function
|
||||
// KNN vs K is a draw.
|
||||
if (key == KNNKMaterialKey || key == KKNNMaterialKey)
|
||||
{
|
||||
mi->factor[WHITE] = mi->factor[BLACK] = 0;
|
||||
return mi;
|
||||
}
|
||||
|
||||
// Let's look if we have a specialized evaluation function for this
|
||||
// particular material configuration. First we look for a fixed
|
||||
// configuration one, then a generic one if previous search failed.
|
||||
@@ -348,9 +338,7 @@ MaterialInfo* MaterialInfoTable::get_material_info(const Position& pos) {
|
||||
|
||||
EndgameFunctions::EndgameFunctions() {
|
||||
|
||||
KNNKMaterialKey = buildKey("KNNK");
|
||||
KKNNMaterialKey = buildKey("KKNN");
|
||||
|
||||
add<EvaluationFunction<KNNK> >("KNNK");
|
||||
add<EvaluationFunction<KPK> >("KPK");
|
||||
add<EvaluationFunction<KBNK> >("KBNK");
|
||||
add<EvaluationFunction<KRKP> >("KRKP");
|
||||
|
||||
Reference in New Issue
Block a user