-# List of authors for Stockfish, as of March 31, 2021
+# List of authors for Stockfish, as of May 17, 2021
# Founders of the Stockfish project and fishtest infrastructure
Tord Romstad (romstad)
DiscanX
Dominik Schlösser (domschl)
double-beep
+Douglas Matos Gomes (dsmsgms)
Eduardo Cáceres (eduherminio)
Eelco de Groot (KingDefender)
Elvin Liu (solarlight2)
ifeq ($(ARCH), $(filter $(ARCH), \
x86-64-vnni512 x86-64-vnni256 x86-64-avx512 x86-64-bmi2 x86-64-avx2 \
x86-64-sse41-popcnt x86-64-modern x86-64-ssse3 x86-64-sse3-popcnt \
- x86-64 x86-32-sse41-popcnt x86-32-sse2 x86-32 ppc-64 ppc-32 \
- e2k \
+ x86-64 x86-32-sse41-popcnt x86-32-sse2 x86-32 ppc-64 ppc-32 e2k \
armv7 armv7-neon armv8 apple-silicon general-64 general-32))
SUPPORTED_ARCH=true
else
@test "$(optimize)" = "yes" || test "$(optimize)" = "no"
@test "$(SUPPORTED_ARCH)" = "true"
@test "$(arch)" = "any" || test "$(arch)" = "x86_64" || test "$(arch)" = "i386" || \
- test "$(arch)" = "ppc64" || test "$(arch)" = "ppc" || \
- test "$(arch)" = "e2k" || \
+ test "$(arch)" = "ppc64" || test "$(arch)" = "ppc" || test "$(arch)" = "e2k" || \
test "$(arch)" = "armv7" || test "$(arch)" = "armv8" || test "$(arch)" = "arm64"
@test "$(bits)" = "32" || test "$(bits)" = "64"
@test "$(prefetch)" = "yes" || test "$(prefetch)" = "no"
}
}
+ /// NNUE::export_net() exports the currently loaded network to a file
void NNUE::export_net(const std::optional<std::string>& filename) {
std::string actualFilename;
- if (filename.has_value()) {
- actualFilename = filename.value();
- } else {
- if (eval_file_loaded != EvalFileDefaultName) {
- sync_cout << "Failed to export a net. A non-embedded net can only be saved if the filename is specified." << sync_endl;
- return;
- }
- actualFilename = EvalFileDefaultName;
+
+ if (filename.has_value())
+ actualFilename = filename.value();
+ else
+ {
+ if (eval_file_loaded != EvalFileDefaultName)
+ {
+ sync_cout << "Failed to export a net. A non-embedded net can only be saved if the filename is specified." << sync_endl;
+ return;
+ }
+ actualFilename = EvalFileDefaultName;
}
ofstream stream(actualFilename, std::ios_base::binary);
- if (save_eval(stream)) {
+
+ if (save_eval(stream))
sync_cout << "Network saved successfully to " << actualFilename << "." << sync_endl;
- } else {
+ else
sync_cout << "Failed to export a net." << sync_endl;
- }
}
/// NNUE::verify() verifies that the last net used was loaded successfully
Color strongSide = eg > VALUE_DRAW ? WHITE : BLACK;
int sf = me->scale_factor(pos, strongSide);
- // If scale factor is not already specific, scale down via general heuristics
+ // If scale factor is not already specific, scale up/down via general heuristics
if (sf == SCALE_FACTOR_NORMAL)
{
if (pos.opposite_bishops())
return true;
}
- // Read network parameters
+ // Write network parameters
bool write_parameters(std::ostream& /*stream*/) const {
return true;
}
}
-/// Position::do(undo)_null_move() is used to do(undo) a "null move": it flips
+/// Position::do_null_move() is used to do a "null move": it flips
/// the side to move without executing any move on the board.
void Position::do_null_move(StateInfo& newSt) {
assert(pos_is_ok());
}
+
+/// Position::undo_null_move() must be used to undo a "null move"
+
void Position::undo_null_move() {
assert(!checkers());
if (!(stmAttackers = attackers & pieces(stm)))
break;
- // Don't allow pinned pieces to attack (except the king) as long as
- // there are pinners on their original square.
+ // Don't allow pinned pieces to attack as long as there are
+ // pinners on their original square.
if (pinners(~stm) & occupied)
stmAttackers &= ~blockers_for_king(stm);
&& ttValue != VALUE_NONE
&& ttValue < probCutBeta))
{
-
assert(probCutBeta < VALUE_INFINITE);
MovePicker mp(pos, ttMove, probCutBeta - ss->staticEval, &captureHistory);
}
else
{
- // Countermoves based pruning (~20 Elo)
+ // Continuation history based pruning (~20 Elo)
if ( lmrDepth < 4
&& (*contHist[0])[movedPiece][to_sq(move)] < CounterMovePruneThreshold
&& (*contHist[1])[movedPiece][to_sq(move)] < CounterMovePruneThreshold)
[pos.moved_piece(move)]
[to_sq(move)];
- // CounterMove based pruning
+ // Continuation history based pruning
if ( !captureOrPromotion
&& bestValue > VALUE_TB_LOSS_IN_MAX_PLY
&& (*contHist[0])[pos.moved_piece(move)][to_sq(move)] < CounterMovePruneThreshold
void idle_loop();
void start_searching();
void wait_for_search_finished();
- int id() const { return idx; }
+ size_t id() const { return idx; }
Pawns::Table pawnsTable;
Material::Table materialTable;
echo "reprosearch testing started"
-# repeat two short games, separated by ucinewgame.
+# repeat two short games, separated by ucinewgame.
# with go nodes $nodes they should result in exactly
# the same node count for each iteration.
cat << EOF > repeat.exp