Most but not all.
No functional change.
Square bksq = pos.king_square(weakerSide);
// Does the stronger side have a passed pawn?
- if ( pos.pawn_is_passed(strongerSide, wpsq1)
- || pos.pawn_is_passed(strongerSide, wpsq2))
+ if (pos.pawn_passed(strongerSide, wpsq1) || pos.pawn_passed(strongerSide, wpsq2))
return SCALE_FACTOR_NONE;
Rank r = std::max(relative_rank(strongerSide, wpsq1), relative_rank(strongerSide, wpsq2));
const enum Piece P = make_piece(Us, PAWN);
Square d = pawn_push(Us) + (file_of(s) == FILE_A ? DELTA_E : DELTA_W);
if (pos.piece_on(s + d) == P)
- score -= !pos.is_empty(s + d + pawn_push(Us)) ? TrappedBishopA1H1 * 4
- : pos.piece_on(s + d + d) == P ? TrappedBishopA1H1 * 2
- : TrappedBishopA1H1;
+ score -= !pos.empty(s + d + pawn_push(Us)) ? TrappedBishopA1H1 * 4
+ : pos.piece_on(s + d + d) == P ? TrappedBishopA1H1 * 2
+ : TrappedBishopA1H1;
}
}
{
Square s = pop_lsb(&b);
- assert(pos.pawn_is_passed(Us, s));
+ assert(pos.pawn_passed(Us, s));
int r = int(relative_rank(Us, s) - RANK_2);
int rr = r * (r - 1);
ebonus -= Value(square_distance(pos.king_square(Us), blockSq + pawn_push(Us)) * rr);
// If the pawn is free to advance, increase bonus
- if (pos.is_empty(blockSq))
+ if (pos.empty(blockSq))
{
squaresToQueen = forward_bb(Us, s);
(mlist++)->move = make<CASTLE>(kfrom, rfrom);
- if (Checks && !pos.move_gives_check((mlist - 1)->move, CheckInfo(pos)))
+ if (Checks && !pos.gives_check((mlist - 1)->move, CheckInfo(pos)))
mlist--;
return mlist;
: generate<NON_EVASIONS>(pos, mlist);
while (cur != end)
if ( (pinned || from_sq(cur->move) == ksq || type_of(cur->move) == ENPASSANT)
- && !pos.pl_move_is_legal(cur->move, pinned))
+ && !pos.legal(cur->move, pinned))
cur->move = (--end)->move;
else
cur++;
else
stage = MAIN_SEARCH;
- ttMove = (ttm && pos.is_pseudo_legal(ttm) ? ttm : MOVE_NONE);
+ ttMove = (ttm && pos.pseudo_legal(ttm) ? ttm : MOVE_NONE);
end += (ttMove != MOVE_NONE);
}
// Skip TT move if is not a capture or a promotion, this avoids qsearch
// tree explosion due to a possible perpetual check or similar rare cases
// when TT table is full.
- if (ttm && !pos.is_capture_or_promotion(ttm))
+ if (ttm && !pos.capture_or_promotion(ttm))
ttm = MOVE_NONE;
}
else
ttm = MOVE_NONE;
}
- ttMove = (ttm && pos.is_pseudo_legal(ttm) ? ttm : MOVE_NONE);
+ ttMove = (ttm && pos.pseudo_legal(ttm) ? ttm : MOVE_NONE);
end += (ttMove != MOVE_NONE);
}
// In ProbCut we generate only captures better than parent's captured piece
captureThreshold = PieceValue[MG][pt];
- ttMove = (ttm && pos.is_pseudo_legal(ttm) ? ttm : MOVE_NONE);
+ ttMove = (ttm && pos.pseudo_legal(ttm) ? ttm : MOVE_NONE);
- if (ttMove && (!pos.is_capture(ttMove) || pos.see(ttMove) <= captureThreshold))
+ if (ttMove && (!pos.capture(ttMove) || pos.see(ttMove) <= captureThreshold))
ttMove = MOVE_NONE;
end += (ttMove != MOVE_NONE);
{
m = it->move;
it->score = PieceValue[MG][pos.piece_on(to_sq(m))]
- - type_of(pos.piece_moved(m));
+ - type_of(pos.moved_piece(m));
if (type_of(m) == PROMOTION)
it->score += PieceValue[MG][promotion_type(m)] - PieceValue[MG][PAWN];
for (ExtMove* it = moves; it != end; ++it)
{
m = it->move;
- it->score = history[pos.piece_moved(m)][to_sq(m)];
+ it->score = history[pos.moved_piece(m)][to_sq(m)];
}
}
if ((seeScore = pos.see_sign(m)) < 0)
it->score = seeScore - HistoryStats::Max; // At the bottom
- else if (pos.is_capture(m))
+ else if (pos.capture(m))
it->score = PieceValue[MG][pos.piece_on(to_sq(m))]
- - type_of(pos.piece_moved(m)) + HistoryStats::Max;
+ - type_of(pos.moved_piece(m)) + HistoryStats::Max;
else
- it->score = history[pos.piece_moved(m)][to_sq(m)];
+ it->score = history[pos.moved_piece(m)][to_sq(m)];
}
}
case KILLERS_S1:
move = (cur++)->move;
if ( move != MOVE_NONE
- && pos.is_pseudo_legal(move)
+ && pos.pseudo_legal(move)
&& move != ttMove
- && !pos.is_capture(move))
+ && !pos.capture(move))
return move;
break;
while (b)
{
Move move = make_move(pop_lsb(&b), to);
- if (!pos.pl_move_is_legal(move, pos.pinned_pieces()))
+ if (!pos.legal(move, pos.pinned_pieces()))
others ^= from_sq(move);
}
san += square_to_string(from);
}
}
- else if (pos.is_capture(m))
+ else if (pos.capture(m))
san = file_to_char(file_of(from));
- if (pos.is_capture(m))
+ if (pos.capture(m))
san += 'x';
san += square_to_string(to);
san += string("=") + PieceToChar[WHITE][promotion_type(m)];
}
- if (pos.move_gives_check(m, CheckInfo(pos)))
+ if (pos.gives_check(m, CheckInfo(pos)))
{
StateInfo st;
pos.do_move(m, st);
{
Square sq = file | rank;
- if (is_empty(sq))
+ if (empty(sq))
{
int emptyCnt = 1;
- for ( ; file < FILE_H && is_empty(++sq); ++file)
+ for ( ; file < FILE_H && empty(++sq); ++file)
emptyCnt++;
ss << emptyCnt;
}
-/// Position::pl_move_is_legal() tests whether a pseudo-legal move is legal
+/// Position::legal() tests whether a pseudo-legal move is legal
-bool Position::pl_move_is_legal(Move m, Bitboard pinned) const {
+bool Position::legal(Move m, Bitboard pinned) const {
assert(is_ok(m));
assert(pinned == pinned_pieces());
Color us = sideToMove;
Square from = from_sq(m);
- assert(color_of(piece_moved(m)) == us);
+ assert(color_of(moved_piece(m)) == us);
assert(piece_on(king_square(us)) == make_piece(us, KING));
// En passant captures are a tricky special case. Because they are rather
Bitboard b = (pieces() ^ from ^ capsq) | to;
assert(to == ep_square());
- assert(piece_moved(m) == make_piece(us, PAWN));
+ assert(moved_piece(m) == make_piece(us, PAWN));
assert(piece_on(capsq) == make_piece(them, PAWN));
assert(piece_on(to) == NO_PIECE);
}
-/// Position::is_pseudo_legal() takes a random move and tests whether the move
-/// is pseudo legal. It is used to validate moves from TT that can be corrupted
+/// Position::pseudo_legal() takes a random move and tests whether the move is
+/// pseudo legal. It is used to validate moves from TT that can be corrupted
/// due to SMP concurrent access or hash position key aliasing.
-bool Position::is_pseudo_legal(const Move m) const {
+bool Position::pseudo_legal(const Move m) const {
Color us = sideToMove;
Square from = from_sq(m);
Square to = to_sq(m);
- Piece pc = piece_moved(m);
+ Piece pc = moved_piece(m);
// Use a slower but simpler function for uncommon cases
if (type_of(m) != NORMAL)
case DELTA_N:
case DELTA_S:
// Pawn push. The destination square must be empty.
- if (!is_empty(to))
+ if (!empty(to))
return false;
break;
// rank, and both the destination square and the square between the
// source and destination squares must be empty.
if ( rank_of(to) != RANK_4
- || !is_empty(to)
- || !is_empty(from + DELTA_N))
+ || !empty(to)
+ || !empty(from + DELTA_N))
return false;
break;
// rank, and both the destination square and the square between the
// source and destination squares must be empty.
if ( rank_of(to) != RANK_5
- || !is_empty(to)
- || !is_empty(from + DELTA_S))
+ || !empty(to)
+ || !empty(from + DELTA_S))
return false;
break;
/// Position::move_gives_check() tests whether a pseudo-legal move gives a check
-bool Position::move_gives_check(Move m, const CheckInfo& ci) const {
+bool Position::gives_check(Move m, const CheckInfo& ci) const {
assert(is_ok(m));
assert(ci.dcCandidates == discovered_check_candidates());
- assert(color_of(piece_moved(m)) == sideToMove);
+ assert(color_of(moved_piece(m)) == sideToMove);
Square from = from_sq(m);
Square to = to_sq(m);
void Position::do_move(Move m, StateInfo& newSt) {
CheckInfo ci(*this);
- do_move(m, newSt, ci, move_gives_check(m, ci));
+ do_move(m, newSt, ci, gives_check(m, ci));
}
void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveIsCheck) {
Square to = to_sq(m);
Piece pc = piece_on(from);
PieceType pt = type_of(pc);
- PieceType capture = type_of(m) == ENPASSANT ? PAWN : type_of(piece_on(to));
+ PieceType captured = type_of(m) == ENPASSANT ? PAWN : type_of(piece_on(to));
assert(color_of(pc) == us);
assert(piece_on(to) == NO_PIECE || color_of(piece_on(to)) == them || type_of(m) == CASTLE);
- assert(capture != KING);
+ assert(captured != KING);
if (type_of(m) == CASTLE)
{
Square rfrom = to; // Castle is encoded as "king captures friendly rook"
Square rto = relative_square(us, kingSide ? SQ_F1 : SQ_D1);
to = relative_square(us, kingSide ? SQ_G1 : SQ_C1);
- capture = NO_PIECE_TYPE;
+ captured = NO_PIECE_TYPE;
do_castle(from, to, rfrom, rto);
k ^= Zobrist::psq[us][ROOK][rfrom] ^ Zobrist::psq[us][ROOK][rto];
}
- if (capture)
+ if (captured)
{
Square capsq = to;
// If the captured piece is a pawn, update pawn hash key, otherwise
// update non-pawn material.
- if (capture == PAWN)
+ if (captured == PAWN)
{
if (type_of(m) == ENPASSANT)
{
st->pawnKey ^= Zobrist::psq[them][PAWN][capsq];
}
else
- st->npMaterial[them] -= PieceValue[MG][capture];
+ st->npMaterial[them] -= PieceValue[MG][captured];
// Update board and piece lists
- remove_piece(capsq, them, capture);
+ remove_piece(capsq, them, captured);
// Update material hash key and prefetch access to materialTable
- k ^= Zobrist::psq[them][capture][capsq];
- st->materialKey ^= Zobrist::psq[them][capture][pieceCount[them][capture]];
+ k ^= Zobrist::psq[them][captured][capsq];
+ st->materialKey ^= Zobrist::psq[them][captured][pieceCount[them][captured]];
prefetch((char*)thisThread->materialTable[st->materialKey]);
// Update incremental scores
- st->psq -= psq[them][capture][capsq];
+ st->psq -= psq[them][captured][capsq];
// Reset rule 50 counter
st->rule50 = 0;
st->psq += psq[us][pt][to] - psq[us][pt][from];
// Set capture piece
- st->capturedType = capture;
+ st->capturedType = captured;
// Update the key with the final value
st->key = k;
Square from = from_sq(m);
Square to = to_sq(m);
PieceType pt = type_of(piece_on(to));
- PieceType capture = st->capturedType;
+ PieceType captured = st->capturedType;
- assert(is_empty(from) || type_of(m) == CASTLE);
- assert(capture != KING);
+ assert(empty(from) || type_of(m) == CASTLE);
+ assert(captured != KING);
if (type_of(m) == PROMOTION)
{
Square rfrom = to; // Castle is encoded as "king captures friendly rook"
Square rto = relative_square(us, kingSide ? SQ_F1 : SQ_D1);
to = relative_square(us, kingSide ? SQ_G1 : SQ_C1);
- capture = NO_PIECE_TYPE;
+ captured = NO_PIECE_TYPE;
pt = KING;
do_castle(to, from, rto, rfrom);
}
else
move_piece(to, from, us, pt); // Put the piece back at the source square
- if (capture)
+ if (captured)
{
Square capsq = to;
assert(piece_on(capsq) == NO_PIECE);
}
- put_piece(capsq, them, capture); // Restore the captured piece
+ put_piece(capsq, them, captured); // Restore the captured piece
}
// Finally point our state pointer back to the previous state
// Early return if SEE cannot be negative because captured piece value
// is not less then capturing one. Note that king moves always return
// here because king midgame value is set to 0.
- if (PieceValue[MG][piece_moved(m)] <= PieceValue[MG][piece_on(to_sq(m))])
+ if (PieceValue[MG][moved_piece(m)] <= PieceValue[MG][piece_on(to_sq(m))])
return 1;
return see(m);
};
-/// The StateInfo struct stores information we need to restore a Position
+/// The StateInfo struct stores information needed to restore a Position
/// object to its previous state when we retract a move. Whenever a move
-/// is made on the board (by calling Position::do_move), a StateInfo object
-/// must be passed as a parameter.
+/// is made on the board (by calling Position::do_move), a StateInfo
+/// object must be passed as a parameter.
struct StateInfo {
Key pawnKey, materialKey;
const size_t StateCopySize64 = offsetof(StateInfo, key) / sizeof(uint64_t) + 1;
-/// The position data structure. A position consists of the following data:
-///
-/// * For each piece type, a bitboard representing the squares occupied
-/// by pieces of that type.
-/// * For each color, a bitboard representing the squares occupied by
-/// pieces of that color.
-/// * A bitboard of all occupied squares.
-/// * A bitboard of all checking pieces.
-/// * A 64-entry array of pieces, indexed by the squares of the board.
-/// * The current side to move.
-/// * Information about the castling rights for both sides.
-/// * The initial files of the kings and both pairs of rooks. This is
-/// used to implement the Chess960 castling rules.
-/// * The en passant square (which is SQ_NONE if no en passant capture is
-/// possible).
-/// * The squares of the kings for both sides.
-/// * Hash keys for the position itself, the current pawn structure, and
-/// the current material situation.
-/// * Hash keys for all previous positions in the game for detecting
-/// repetition draws.
-/// * A counter for detecting 50 move rule draws.
+/// The Position class stores the information regarding the board representation
+/// like pieces, side to move, hash keys, castling info, etc. The most important
+/// methods are do_move() and undo_move(), used by the search to update node info
+/// when traversing the search tree.
class Position {
public:
Piece piece_on(Square s) const;
Square king_square(Color c) const;
Square ep_square() const;
- bool is_empty(Square s) const;
+ bool empty(Square s) const;
template<PieceType Pt> int count(Color c) const;
template<PieceType Pt> const Square* list(Color c) const;
template<PieceType> Bitboard attacks_from(Square s, Color c) const;
// Properties of moves
- bool move_gives_check(Move m, const CheckInfo& ci) const;
- bool pl_move_is_legal(Move m, Bitboard pinned) const;
- bool is_pseudo_legal(const Move m) const;
- bool is_capture(Move m) const;
- bool is_capture_or_promotion(Move m) const;
- bool is_passed_pawn_push(Move m) const;
- Piece piece_moved(Move m) const;
+ bool legal(Move m, Bitboard pinned) const;
+ bool pseudo_legal(const Move m) const;
+ bool capture(Move m) const;
+ bool capture_or_promotion(Move m) const;
+ bool gives_check(Move m, const CheckInfo& ci) const;
+ bool passed_pawn_push(Move m) const;
+ Piece moved_piece(Move m) const;
PieceType captured_piece_type() const;
// Piece specific
- bool pawn_is_passed(Color c, Square s) const;
+ bool pawn_passed(Color c, Square s) const;
bool pawn_on_7th(Color c) const;
- bool opposite_bishops() const;
bool bishop_pair(Color c) const;
+ bool opposite_bishops() const;
// Doing and undoing moves
void do_move(Move m, StateInfo& st);
return board[s];
}
-inline Piece Position::piece_moved(Move m) const {
+inline Piece Position::moved_piece(Move m) const {
return board[from_sq(m)];
}
-inline bool Position::is_empty(Square s) const {
+inline bool Position::empty(Square s) const {
return board[s] == NO_PIECE;
}
return hidden_checkers(king_square(sideToMove), ~sideToMove);
}
-inline bool Position::pawn_is_passed(Color c, Square s) const {
+inline bool Position::pawn_passed(Color c, Square s) const {
return !(pieces(~c, PAWN) & passed_pawn_mask(c, s));
}
+inline bool Position::passed_pawn_push(Move m) const {
+
+ return type_of(moved_piece(m)) == PAWN
+ && pawn_passed(sideToMove, to_sq(m));
+}
+
inline Key Position::key() const {
return st->key;
}
return st->npMaterial[c];
}
-inline bool Position::is_passed_pawn_push(Move m) const {
-
- return type_of(piece_moved(m)) == PAWN
- && pawn_is_passed(sideToMove, to_sq(m));
-}
-
inline int Position::game_ply() const {
return gamePly;
}
return chess960;
}
-inline bool Position::is_capture_or_promotion(Move m) const {
+inline bool Position::capture_or_promotion(Move m) const {
assert(is_ok(m));
- return type_of(m) ? type_of(m) != CASTLE : !is_empty(to_sq(m));
+ return type_of(m) ? type_of(m) != CASTLE : !empty(to_sq(m));
}
-inline bool Position::is_capture(Move m) const {
+inline bool Position::capture(Move m) const {
// Note that castle is coded as "king captures the rook"
assert(is_ok(m));
- return (!is_empty(to_sq(m)) && type_of(m) != CASTLE) || type_of(m) == ENPASSANT;
+ return (!empty(to_sq(m)) && type_of(m) != CASTLE) || type_of(m) == ENPASSANT;
}
inline PieceType Position::captured_piece_type() const {
for (MoveList<LEGAL> it(pos); *it; ++it)
{
- pos.do_move(*it, st, ci, pos.move_gives_check(*it, ci));
+ pos.do_move(*it, st, ci, pos.gives_check(*it, ci));
cnt += leaf ? MoveList<LEGAL>(pos).size() : ::perft(pos, depth - ONE_PLY);
pos.undo_move(*it);
}
if ( ttValue >= beta
&& ttMove
- && !pos.is_capture_or_promotion(ttMove)
+ && !pos.capture_or_promotion(ttMove)
&& ttMove != ss->killers[0])
{
ss->killers[1] = ss->killers[0];
CheckInfo ci(pos);
while ((move = mp.next_move<false>()) != MOVE_NONE)
- if (pos.pl_move_is_legal(move, ci.pinned))
+ if (pos.legal(move, ci.pinned))
{
ss->currentMove = move;
- pos.do_move(move, st, ci, pos.move_gives_check(move, ci));
+ pos.do_move(move, st, ci, pos.gives_check(move, ci));
value = -search<NonPV>(pos, ss+1, -rbeta, -rbeta+1, rdepth, !cutNode);
pos.undo_move(move);
if (value >= rbeta)
if (SpNode)
{
// Shared counter cannot be decremented later if move turns out to be illegal
- if (!pos.pl_move_is_legal(move, ci.pinned))
+ if (!pos.legal(move, ci.pinned))
continue;
moveCount = ++splitPoint->moveCount;
}
ext = DEPTH_ZERO;
- captureOrPromotion = pos.is_capture_or_promotion(move);
- givesCheck = pos.move_gives_check(move, ci);
+ captureOrPromotion = pos.capture_or_promotion(move);
+ givesCheck = pos.gives_check(move, ci);
dangerous = givesCheck
- || pos.is_passed_pawn_push(move)
+ || pos.passed_pawn_push(move)
|| type_of(move) == CASTLE;
// Step 12. Extend checks
if ( singularExtensionNode
&& move == ttMove
&& !ext
- && pos.pl_move_is_legal(move, ci.pinned)
+ && pos.legal(move, ci.pinned)
&& abs(ttValue) < VALUE_KNOWN_WIN)
{
assert(ttValue != VALUE_NONE);
// but fixing this made program slightly weaker.
Depth predictedDepth = newDepth - reduction<PvNode>(improving, depth, moveCount);
futilityValue = ss->staticEval + ss->evalMargin + futility_margin(predictedDepth, moveCount)
- + Gains[pos.piece_moved(move)][to_sq(move)];
+ + Gains[pos.moved_piece(move)][to_sq(move)];
if (futilityValue < beta)
{
ss->futilityMoveCount = 0;
// Check for legality only before to do the move
- if (!RootNode && !SpNode && !pos.pl_move_is_legal(move, ci.pinned))
+ if (!RootNode && !SpNode && !pos.legal(move, ci.pinned))
{
moveCount--;
continue;
// Quiet best move: update killers, history and countermoves
if ( bestValue >= beta
- && !pos.is_capture_or_promotion(bestMove)
+ && !pos.capture_or_promotion(bestMove)
&& !inCheck)
{
if (ss->killers[0] != bestMove)
// Increase history value of the cut-off move and decrease all the other
// played non-capture moves.
Value bonus = Value(int(depth) * int(depth));
- History.update(pos.piece_moved(bestMove), to_sq(bestMove), bonus);
+ History.update(pos.moved_piece(bestMove), to_sq(bestMove), bonus);
for (int i = 0; i < quietCount - 1; ++i)
{
Move m = quietsSearched[i];
- History.update(pos.piece_moved(m), to_sq(m), -bonus);
+ History.update(pos.moved_piece(m), to_sq(m), -bonus);
}
if (is_ok((ss-1)->currentMove))
{
assert(is_ok(move));
- givesCheck = pos.move_gives_check(move, ci);
+ givesCheck = pos.gives_check(move, ci);
// Futility pruning
if ( !PvNode
&& move != ttMove
&& type_of(move) != PROMOTION
&& futilityBase > -VALUE_KNOWN_WIN
- && !pos.is_passed_pawn_push(move))
+ && !pos.passed_pawn_push(move))
{
futilityValue = futilityBase
+ PieceValue[EG][pos.piece_on(to_sq(move))]
// Detect non-capture evasions that are candidate to be pruned
evasionPrunable = InCheck
&& bestValue > VALUE_MATED_IN_MAX_PLY
- && !pos.is_capture(move)
+ && !pos.capture(move)
&& !pos.can_castle(pos.side_to_move());
// Don't search moves with negative SEE values
continue;
// Check for legality only before to do the move
- if (!pos.pl_move_is_legal(move, ci.pinned))
+ if (!pos.legal(move, ci.pinned))
continue;
ss->currentMove = move;
// If the threatened piece has value less than or equal to the value of the
// threat piece, don't prune moves which defend it.
- if ( pos.is_capture(second)
+ if ( pos.capture(second)
&& ( PieceValue[MG][pos.piece_on(m2from)] >= PieceValue[MG][pos.piece_on(m2to)]
|| type_of(pos.piece_on(m2from)) == KING))
{
tte = TT.probe(pos.key());
} while ( tte
- && pos.is_pseudo_legal(m = tte->move()) // Local copy, TT could change
- && pos.pl_move_is_legal(m, pos.pinned_pieces())
+ && pos.pseudo_legal(m = tte->move()) // Local copy, TT could change
+ && pos.legal(m, pos.pinned_pieces())
&& ply < MAX_PLY
&& (!pos.is_draw() || ply < 2));
}
-// Thread::is_available_to() checks whether the thread is available to help the
+// Thread::available_to() checks whether the thread is available to help the
// thread 'master' at a split point. An obvious requirement is that thread must
// be idle. With more than two threads, this is not sufficient: If the thread is
// the master of some split point, it is only available as a slave to the slaves
// which are busy searching the split point at the top of slaves split point
// stack (the "helpful master concept" in YBWC terminology).
-bool Thread::is_available_to(const Thread* master) const {
+bool Thread::available_to(const Thread* master) const {
if (searching)
return false;
Thread* ThreadPool::available_slave(const Thread* master) const {
for (const_iterator it = begin(); it != end(); ++it)
- if ((*it)->is_available_to(master))
+ if ((*it)->available_to(master))
return *it;
return NULL;
// We have returned from the idle loop, which means that all threads are
// finished. Note that setting 'searching' and decreasing splitPointsSize is
- // done under lock protection to avoid a race with Thread::is_available_to().
+ // done under lock protection to avoid a race with Thread::available_to().
Threads.mutex.lock();
sp.mutex.lock();
}
Thread();
virtual void idle_loop();
bool cutoff_occurred() const;
- bool is_available_to(const Thread* master) const;
+ bool available_to(const Thread* master) const;
template <bool Fake>
void split(Position& pos, const Search::Stack* ss, Value alpha, Value beta, Value* bestValue, Move* bestMove,