X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fnnue%2Ffeatures%2Fhalf_kp.h;h=708fd7ea0badd445cb2f83af418cf44c79037058;hb=HEAD;hp=2461acb725a2a5899ecc45368a1747e5fc901e32;hpb=699bae632f283746a3eee15c0950fcdbca8a355e;p=stockfish diff --git a/src/nnue/features/half_kp.h b/src/nnue/features/half_kp.h deleted file mode 100644 index 2461acb7..00000000 --- a/src/nnue/features/half_kp.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - Stockfish, a UCI chess playing engine derived from Glaurung 2.1 - Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file) - - Stockfish is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - Stockfish is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -//Definition of input features HalfKP of NNUE evaluation function - -#ifndef NNUE_FEATURES_HALF_KP_H_INCLUDED -#define NNUE_FEATURES_HALF_KP_H_INCLUDED - -#include "../../evaluate.h" -#include "features_common.h" - -namespace Stockfish::Eval::NNUE::Features { - - // Feature HalfKP: Combination of the position of own king - // and the position of pieces other than kings - template - class HalfKP { - - public: - // Feature name - static constexpr const char* kName = "HalfKP(Friend)"; - // Hash value embedded in the evaluation file - static constexpr std::uint32_t kHashValue = - 0x5D69D5B9u ^ (AssociatedKing == Side::kFriend); - // Number of feature dimensions - static constexpr IndexType kDimensions = - static_cast(SQUARE_NB) * static_cast(PS_END); - // Maximum number of simultaneously active features - static constexpr IndexType kMaxActiveDimensions = 30; // Kings don't count - // Trigger for full calculation instead of difference calculation - static constexpr TriggerEvent kRefreshTrigger = TriggerEvent::kFriendKingMoved; - - // Get a list of indices for active features - static void AppendActiveIndices(const Position& pos, Color perspective, - IndexList* active); - - // Get a list of indices for recently changed features - static void AppendChangedIndices(const Position& pos, const DirtyPiece& dp, Color perspective, - IndexList* removed, IndexList* added); - }; - -} // namespace Stockfish::Eval::NNUE::Features - -#endif // #ifndef NNUE_FEATURES_HALF_KP_H_INCLUDED