- || (Iteration >= 3 && MaxNodes && pos.nodes_searched() >= MaxNodes))
- AbortSearch = true;
- }
-
-
- // ponderhit() is called when the program is pondering (i.e. thinking while
- // it's the opponent's turn to move) in order to let the engine know that
- // it correctly predicted the opponent's move.
-
- void ponderhit() {
-
- int t = current_search_time();
- PonderSearch = false;
-
- bool stillAtFirstMove = FirstRootMove
- && !AspirationFailLow
- && t > TimeMgr.available_time();
-
- bool noMoreTime = t > TimeMgr.maximum_time()
- || stillAtFirstMove;
-
- if (Iteration >= 3 && UseTimeManagement && (noMoreTime || StopOnPonderhit))
- AbortSearch = true;
- }
-
-
- // init_ss_array() does a fast reset of the first entries of a SearchStack
- // array and of all the excludedMove and skipNullMove entries.
-
- void init_ss_array(SearchStack* ss, int size) {
-
- for (int i = 0; i < size; i++, ss++)
- {
- ss->excludedMove = MOVE_NONE;
- ss->skipNullMove = false;
- ss->reduction = DEPTH_ZERO;
- ss->sp = NULL;
-
- if (i < 3)
- ss->killers[0] = ss->killers[1] = ss->mateKiller = MOVE_NONE;
- }