- Move id_loop(Position& pos, Move searchMoves[], Move* ponderMove) {
-
- SearchStack ss[PLY_MAX_PLUS_2];
- Value bestValues[PLY_MAX_PLUS_2];
- int bestMoveChanges[PLY_MAX_PLUS_2];
- int depth, aspirationDelta;
- Value value, alpha, beta;
- Move bestMove, easyMove, skillBest, skillPonder;
-
- // Initialize stuff before a new search
- memset(ss, 0, 4 * sizeof(SearchStack));
- TT.new_search();
- H.clear();
- *ponderMove = bestMove = easyMove = skillBest = skillPonder = MOVE_NONE;
- depth = aspirationDelta = 0;
- value = alpha = -VALUE_INFINITE, beta = VALUE_INFINITE;
- ss->currentMove = MOVE_NULL; // Hack to skip update gains
-
- // Moves to search are verified and copied
- Rml.init(pos, searchMoves);