Value *alpha, Value *beta, Value *bestValue,
const Value futilityValue, const Value approximateValue,
Depth depth, int *moves,
- MovePicker *mp, Bitboard dcCandidates, int master, bool pvNode);
+ MovePicker *mp, int master, bool pvNode);
void wake_sleeping_threads();
#if !defined(_MSC_VER)
int perft(Position& pos, Depth depth)
{
Move move;
- MovePicker mp = MovePicker(pos, MOVE_NONE, depth, H);
int sum = 0;
+ MovePicker mp = MovePicker(pos, MOVE_NONE, depth, H);
// If we are at the last ply we don't need to do and undo
// the moves, just to count them.
if (depth <= OnePly) // Replace with '<' to test also qsearch
{
- while ((move = mp.get_next_move()) != MOVE_NONE) sum++;
+ while (mp.get_next_move()) sum++;
return sum;
}
CheckInfo ci(pos);
while ((move = mp.get_next_move()) != MOVE_NONE)
{
- StateInfo st;
- pos.do_move(move, st, ci, pos.move_is_check(move, ci));
- sum += perft(pos, depth - OnePly);
- pos.undo_move(move);
+ StateInfo st;
+ pos.do_move(move, st, ci, pos.move_is_check(move, ci));
+ sum += perft(pos, depth - OnePly);
+ pos.undo_move(move);
}
return sum;
}
&& idle_thread_exists(threadID)
&& !AbortSearch
&& !thread_should_stop(threadID)
- && split(pos, ss, ply, &alpha, &beta, &bestValue, VALUE_NONE, VALUE_NONE, depth,
- &moveCount, &mp, ci.dcCandidates, threadID, true))
+ && split(pos, ss, ply, &alpha, &beta, &bestValue, VALUE_NONE, VALUE_NONE,
+ depth, &moveCount, &mp, threadID, true))
break;
}
&& idle_thread_exists(threadID)
&& !AbortSearch
&& !thread_should_stop(threadID)
- && split(pos, ss, ply, &beta, &beta, &bestValue, futilityValue, approximateEval, depth, &moveCount,
- &mp, ci.dcCandidates, threadID, false))
+ && split(pos, ss, ply, &beta, &beta, &bestValue, futilityValue, approximateEval,
+ depth, &moveCount, &mp, threadID, false))
break;
}
bool split(const Position& p, SearchStack* sstck, int ply,
Value* alpha, Value* beta, Value* bestValue, const Value futilityValue,
const Value approximateEval, Depth depth, int* moves,
- MovePicker* mp, Bitboard dcCandidates, int master, bool pvNode) {
+ MovePicker* mp, int master, bool pvNode) {
assert(p.is_ok());
assert(sstck != NULL);
splitPoint->alpha = pvNode? *alpha : (*beta - 1);
splitPoint->beta = *beta;
splitPoint->pvNode = pvNode;
- splitPoint->dcCandidates = dcCandidates;
splitPoint->bestValue = *bestValue;
splitPoint->futilityValue = futilityValue;
splitPoint->approximateEval = approximateEval;