mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 20:57:10 +00:00
Merge commit 'b209f14b1ee0cda8cbd7fa3a8349e65701d1869f' into cluster
This is the last commit before there are more conflicts.
This commit is contained in:
+1
-1
@@ -33,7 +33,7 @@ namespace Eval {
|
||||
// for the build process (profile-build and fishtest) to work. Do not change the
|
||||
// name of the macro or the location where this macro is defined, as it is used
|
||||
// in the Makefile/Fishtest.
|
||||
#define EvalFileDefaultNameBig "nn-74f1d263ae9a.nnue"
|
||||
#define EvalFileDefaultNameBig "nn-e8bac1c07a5a.nnue"
|
||||
#define EvalFileDefaultNameSmall "nn-37f18f62d772.nnue"
|
||||
|
||||
namespace NNUE {
|
||||
|
||||
+4
-4
@@ -68,12 +68,12 @@ namespace Stockfish {
|
||||
// does not guarantee the availability of aligned_alloc(). Memory allocated with
|
||||
// std_aligned_alloc() must be freed with std_aligned_free().
|
||||
void* std_aligned_alloc(size_t alignment, size_t size) {
|
||||
// Apple requires 10.15, which is enforced in the makefile
|
||||
#if defined(_ISOC11_SOURCE) || defined(__APPLE__)
|
||||
#if defined(_ISOC11_SOURCE)
|
||||
return aligned_alloc(alignment, size);
|
||||
#elif defined(POSIXALIGNEDALLOC)
|
||||
void* mem;
|
||||
return posix_memalign(&mem, alignment, size) ? nullptr : mem;
|
||||
void* mem = nullptr;
|
||||
posix_memalign(&mem, alignment, size);
|
||||
return mem;
|
||||
#elif defined(_WIN32) && !defined(_M_ARM) && !defined(_M_ARM64)
|
||||
return _mm_malloc(size, alignment);
|
||||
#elif defined(_WIN32)
|
||||
|
||||
+2
-17
@@ -87,7 +87,7 @@ Value to_corrected_static_eval(Value v, const Worker& w, const Position& pos) {
|
||||
}
|
||||
|
||||
// History and stats update bonus, based on depth
|
||||
int stat_bonus(Depth d) { return std::clamp(190 * d - 298, 20, 1596); }
|
||||
int stat_bonus(Depth d) { return std::min(190 * d - 108, 1596); }
|
||||
|
||||
// History and stats update malus, based on depth
|
||||
int stat_malus(Depth d) { return (d < 4 ? 736 * d - 268 : 2044); }
|
||||
@@ -911,8 +911,6 @@ Value Search::Worker::search(
|
||||
assert(probCutBeta < VALUE_INFINITE && probCutBeta > beta);
|
||||
|
||||
MovePicker mp(pos, ttData.move, probCutBeta - ss->staticEval, &thisThread->captureHistory);
|
||||
Move probcutCapturesSearched[32];
|
||||
int probcutCaptureCount = 0;
|
||||
Piece captured;
|
||||
|
||||
while ((move = mp.next_move()) != Move::none())
|
||||
@@ -950,16 +948,6 @@ Value Search::Worker::search(
|
||||
thisThread->captureHistory[movedPiece][move.to_sq()][type_of(captured)]
|
||||
<< stat_bonus(depth - 2);
|
||||
|
||||
for (int i = 0; i < probcutCaptureCount; i++)
|
||||
{
|
||||
movedPiece = pos.moved_piece(probcutCapturesSearched[i]);
|
||||
captured = pos.piece_on(probcutCapturesSearched[i].to_sq());
|
||||
|
||||
thisThread->captureHistory[movedPiece][probcutCapturesSearched[i].to_sq()]
|
||||
[type_of(captured)]
|
||||
<< -stat_malus(depth - 3);
|
||||
}
|
||||
|
||||
// Save ProbCut data into transposition table
|
||||
Distributed::save(tt, threads, thisThread, ttWriter, posKey,
|
||||
value_to_tt(value, ss->ply), ss->ttPv, BOUND_LOWER, depth - 3,
|
||||
@@ -967,9 +955,6 @@ Value Search::Worker::search(
|
||||
return std::abs(value) < VALUE_TB_WIN_IN_MAX_PLY ? value - (probCutBeta - beta)
|
||||
: value;
|
||||
}
|
||||
|
||||
if (probcutCaptureCount < 32)
|
||||
probcutCapturesSearched[probcutCaptureCount++] = move;
|
||||
}
|
||||
|
||||
Eval::NNUE::hint_common_parent_position(pos, networks[numaAccessToken], refreshTable);
|
||||
@@ -1836,7 +1821,7 @@ void update_all_stats(const Position& pos,
|
||||
Piece moved_piece = pos.moved_piece(bestMove);
|
||||
PieceType captured;
|
||||
|
||||
int quietMoveBonus = stat_bonus(depth + 1);
|
||||
int quietMoveBonus = stat_bonus(depth);
|
||||
int quietMoveMalus = stat_malus(depth);
|
||||
|
||||
if (!pos.capture_stage(bestMove))
|
||||
|
||||
Reference in New Issue
Block a user