Added #ifdef statements to switch the legacy evaluation function and NNUE evaluation function.

This commit is contained in:
Hisayori Noda
2019-06-16 11:11:16 +09:00
parent 48bfe86d27
commit 87445881ec
7 changed files with 68 additions and 1 deletions

View File

@@ -59,10 +59,12 @@ struct StateInfo {
Bitboard pinners[COLOR_NB];
Bitboard checkSquares[PIECE_TYPE_NB];
#if defined(EVAL_NNUE)
Eval::NNUE::Accumulator accumulator;
// <20>]<5D><><EFBFBD>l<EFBFBD>̍<EFBFBD><CC8D><EFBFBD><EFBFBD>v<EFBFBD>Z<EFBFBD>̊Ǘ<CC8A><C797>p
Eval::DirtyPiece dirtyPiece;
#endif // defined(EVAL_NNUE)
};
/// A list to keep track of the position states along the setup moves (from the
@@ -174,6 +176,7 @@ public:
bool pos_is_ok() const;
void flip();
#if defined(EVAL_NNUE)
// --- StateInfo
// <20><><EFBFBD>݂̋ǖʂɑΉ<C991><CE89><EFBFBD><EFBFBD><EFBFBD>StateInfo<66><6F><EFBFBD>Ԃ<EFBFBD><D482>B
@@ -182,6 +185,7 @@ public:
// <20>]<5D><><EFBFBD>֐<EFBFBD><D690>Ŏg<C58E><67><EFBFBD><EFBFBD><EFBFBD>߂́A<CC81>ǂ̋<C782><CC8B>ԍ<EFBFBD><D48D>̋<CC8B>ǂ<EFBFBD><C782>ɂ<EFBFBD><C982><EFBFBD>Ȃǂ̏<C782><CC8F><EFBFBD><EFBFBD>B
const Eval::EvalList* eval_list() const { return &evalList; }
#endif // defined(EVAL_NNUE)
private:
// Initialization helpers (used while setting up a position)
@@ -196,8 +200,10 @@ private:
template<bool Do>
void do_castling(Color us, Square from, Square& to, Square& rfrom, Square& rto);
#if defined(EVAL_NNUE)
// <20>Տ<EFBFBD><D58F><EFBFBD>sq<73>̏<EFBFBD><CC8F>ɂ<EFBFBD><C982><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>PieceNumber<65><72><EFBFBD>Ԃ<EFBFBD><D482>B
PieceNumber piece_no_of(Square sq) const;
#endif // defined(EVAL_NNUE)
// Data members
Piece board[SQUARE_NB];
@@ -216,8 +222,10 @@ private:
StateInfo* st;
bool chess960;
#if defined(EVAL_NNUE)
// <20>]<5D><><EFBFBD>֐<EFBFBD><D690>ŗp<C597><70><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̃<EFBFBD><CC83>X<EFBFBD>g
Eval::EvalList evalList;
#endif // defined(EVAL_NNUE)
};
namespace PSQT {