mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 17:19:36 +00:00
Added #if to fix compile errors.
This commit is contained in:
parent
a413bf7aad
commit
26271586cb
3 changed files with 12 additions and 7 deletions
|
@ -773,8 +773,10 @@ void Position::do_move(Move m, StateInfo& newSt, bool givesCheck) {
|
|||
Piece pc = piece_on(from);
|
||||
Piece captured = type_of(m) == ENPASSANT ? make_piece(them, PAWN) : piece_on(to);
|
||||
|
||||
#if defined(EVAL_NNUE)
|
||||
PieceNumber piece_no0 = PIECE_NUMBER_NB;
|
||||
PieceNumber piece_no1 = PIECE_NUMBER_NB;
|
||||
#endif // defined(EVAL_NNUE)
|
||||
|
||||
assert(color_of(pc) == us);
|
||||
assert(captured == NO_PIECE || color_of(captured) == (type_of(m) != CASTLING ? them : us));
|
||||
|
@ -820,7 +822,9 @@ void Position::do_move(Move m, StateInfo& newSt, bool givesCheck) {
|
|||
#endif // defined(EVAL_NNUE)
|
||||
|
||||
board[capsq] = NO_PIECE; // Not done by remove_piece()
|
||||
#if defined(EVAL_NNUE)
|
||||
evalList.piece_no_list_board[capsq] = PIECE_NUMBER_NB;
|
||||
#endif // defined(EVAL_NNUE)
|
||||
}
|
||||
else {
|
||||
#if defined(EVAL_NNUE)
|
||||
|
@ -1473,9 +1477,6 @@ bool Position::pos_is_ok() const {
|
|||
#if defined(EVAL_NNUE)
|
||||
PieceNumber Position::piece_no_of(Square sq) const
|
||||
{
|
||||
if (piece_on(sq) == NO_PIECE) {
|
||||
sync_cout << *this << sync_endl;
|
||||
}
|
||||
assert(piece_on(sq) != NO_PIECE);
|
||||
PieceNumber n = evalList.piece_no_of_board(sq);
|
||||
assert(is_ok(n));
|
||||
|
|
|
@ -1372,7 +1372,13 @@ moves_loop: // When in check, search starts from here
|
|||
prefetch(TT.first_entry(pos.key_after(move)));
|
||||
|
||||
// Check for legality just before making the move
|
||||
if (!pos.legal(move))
|
||||
if (
|
||||
#if defined(EVAL_LEARN)
|
||||
// HACK: pos.piece_on(from_sq(m)) sometimes will be NO_PIECE during machine learning.
|
||||
!pos.pseudo_legal(move) ||
|
||||
#endif // EVAL_LEARN
|
||||
!pos.legal(move)
|
||||
)
|
||||
{
|
||||
moveCount--;
|
||||
continue;
|
||||
|
@ -1382,9 +1388,7 @@ moves_loop: // When in check, search starts from here
|
|||
ss->continuationHistory = &thisThread->continuationHistory[pos.moved_piece(move)][to_sq(move)];
|
||||
|
||||
// Make and search the move
|
||||
//std::cout << pos << std::endl;
|
||||
pos.do_move(move, st, givesCheck);
|
||||
//std::cout << pos << std::endl;
|
||||
value = -qsearch<NT>(pos, ss+1, -beta, -alpha, depth - ONE_PLY);
|
||||
pos.undo_move(move);
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ void TranspositionTable::clear() {
|
|||
/// TTEntry t2 if its replace value is greater than that of t2.
|
||||
|
||||
TTEntry* TranspositionTable::probe(const Key key, bool& found) const {
|
||||
#if defined(EVAL_LEARN)
|
||||
#if defined(DISABLE_TT)
|
||||
return found = false, first_entry(0);
|
||||
#else
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue