rm.score = -VALUE_INFINITE;
}
- bool newBestMove = false;
if (value > bestValue)
{
bestValue = SpNode ? splitPoint->bestValue = value : value;
&& (move != EasyMove.get(pos.key()) || moveCount > 1))
EasyMove.clear();
- newBestMove = true;
bestMove = SpNode ? splitPoint->bestMove = move : move;
if (PvNode && !RootNode) // Update pv even in fail-high case
}
}
- if (!SpNode && !captureOrPromotion && !newBestMove && quietCount < 64)
+ if (!SpNode && !captureOrPromotion && move != bestMove && quietCount < 64)
quietsSearched[quietCount++] = move;
// Step 19. Check for splitting the search
: inCheck ? mated_in(ss->ply) : DrawValue[pos.side_to_move()];
// Quiet best move: update killers, history and countermoves
- else if (bestMove != MOVE_NONE && !pos.capture_or_promotion(bestMove))
+ else if (bestMove && !pos.capture_or_promotion(bestMove))
update_stats(pos, ss, bestMove, depth, quietsSearched, quietCount);
tte->save(posKey, value_to_tt(bestValue, ss->ply),
*pv = MOVE_NONE;
}
- // update_stats() updates killers, history, countermove history and countermoves stats for a quiet best move.
- void update_stats(const Position& pos, Stack* ss, Move move, Depth depth, Move* quiets, int quietsCnt) {
+ // update_stats() updates killers, history, countermove history and
+ // countermoves stats for a quiet best move.
+
+ void update_stats(const Position& pos, Stack* ss, Move move,
+ Depth depth, Move* quiets, int quietsCnt) {
if (ss->killers[0] != move)
{
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef UCIOPTION_H_INCLUDED
-#define UCIOPTION_H_INCLUDED
+#ifndef UCI_H_INCLUDED
+#define UCI_H_INCLUDED
#include <map>
#include <string>
extern UCI::OptionsMap Options;
-#endif // #ifndef UCIOPTION_H_INCLUDED
+#endif // #ifndef UCI_H_INCLUDED
o["Write Debug Log"] << Option(false, on_logger);
o["Contempt"] << Option(0, -100, 100);
- o["Min Split Depth"] << Option(0, 0, 12, on_threads);
+ o["Min Split Depth"] << Option(5, 0, 12, on_threads);
o["Threads"] << Option(1, 1, MAX_THREADS, on_threads);
o["Hash"] << Option(16, 1, MaxHashMB, on_hash_size);
o["Clear Hash"] << Option(on_clear_hash);