mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Assorted small cleanups
closes https://github.com/official-stockfish/Stockfish/pull/3973 No functional change
This commit is contained in:
parent
cc7bcd5303
commit
f7d1491b3d
8 changed files with 42 additions and 48 deletions
|
@ -1,7 +1,6 @@
|
|||
## Overview
|
||||
|
||||
[](https://github.com/official-stockfish/Stockfish/actions)
|
||||
[](https://ci.appveyor.com/project/mcostalba/stockfish/branch/master)
|
||||
|
||||
[Stockfish](https://stockfishchess.org) is a free, powerful UCI chess engine
|
||||
derived from Glaurung 2.1. Stockfish is not a complete chess program and requires a
|
||||
|
@ -21,7 +20,7 @@ avx2, neon, or similar).
|
|||
|
||||
This distribution of Stockfish consists of the following files:
|
||||
|
||||
* [Readme.md](https://github.com/official-stockfish/Stockfish/blob/master/README.md),
|
||||
* [README.md](https://github.com/official-stockfish/Stockfish/blob/master/README.md),
|
||||
the file you are currently reading.
|
||||
|
||||
* [Copying.txt](https://github.com/official-stockfish/Stockfish/blob/master/Copying.txt),
|
||||
|
|
|
@ -192,7 +192,6 @@ using namespace Trace;
|
|||
|
||||
namespace {
|
||||
|
||||
|
||||
// Threshold for lazy and space evaluation
|
||||
constexpr Value LazyThreshold1 = Value(3631);
|
||||
constexpr Value LazyThreshold2 = Value(2084);
|
||||
|
@ -1084,13 +1083,14 @@ make_v:
|
|||
Value Eval::evaluate(const Position& pos) {
|
||||
|
||||
Value v;
|
||||
bool useClassical = false;
|
||||
// Deciding between classical and NNUE eval (~10 Elo): for high PSQ imbalance we use classical,
|
||||
// but we switch to NNUE during long shuffling or with high material on the board.
|
||||
bool useClassical = (pos.this_thread()->depth > 9 || pos.count<ALL_PIECES>() > 7) &&
|
||||
abs(eg_value(pos.psq_score())) * 5 > (856 + pos.non_pawn_material() / 64) * (10 + pos.rule50_count());
|
||||
|
||||
// Deciding between classical and NNUE eval (~10 Elo): for high PSQ imbalance we use classical,
|
||||
// but we switch to NNUE during long shuffling or with high material on the board.
|
||||
if ( !useNNUE
|
||||
|| ((pos.this_thread()->depth > 9 || pos.count<ALL_PIECES>() > 7) &&
|
||||
abs(eg_value(pos.psq_score())) * 5 > (856 + pos.non_pawn_material() / 64) * (10 + pos.rule50_count())))
|
||||
if (!useNNUE || useClassical)
|
||||
{
|
||||
v = Evaluation<NO_TRACE>(pos).value(); // classical
|
||||
useClassical = abs(v) >= 297;
|
||||
|
|
|
@ -608,7 +608,6 @@ namespace {
|
|||
(ss+2)->killers[0] = (ss+2)->killers[1] = MOVE_NONE;
|
||||
(ss+2)->cutoffCnt = 0;
|
||||
ss->doubleExtensions = (ss-1)->doubleExtensions;
|
||||
ss->depth = depth;
|
||||
Square prevSq = to_sq((ss-1)->currentMove);
|
||||
|
||||
// Initialize statScore to zero for the grandchildren of the current position.
|
||||
|
@ -869,7 +868,6 @@ namespace {
|
|||
|
||||
MovePicker mp(pos, ttMove, probCutBeta - ss->staticEval, depth - 3, &captureHistory);
|
||||
bool ttPv = ss->ttPv;
|
||||
bool captureOrPromotion;
|
||||
ss->ttPv = false;
|
||||
|
||||
while ((move = mp.next_move()) != MOVE_NONE)
|
||||
|
@ -877,11 +875,9 @@ namespace {
|
|||
{
|
||||
assert(pos.capture(move) || promotion_type(move) == QUEEN);
|
||||
|
||||
captureOrPromotion = true;
|
||||
|
||||
ss->currentMove = move;
|
||||
ss->continuationHistory = &thisThread->continuationHistory[ss->inCheck]
|
||||
[captureOrPromotion]
|
||||
[true]
|
||||
[pos.moved_piece(move)]
|
||||
[to_sq(move)];
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@ struct Stack {
|
|||
Move excludedMove;
|
||||
Move killers[2];
|
||||
Value staticEval;
|
||||
Depth depth;
|
||||
int statScore;
|
||||
int moveCount;
|
||||
bool inCheck;
|
||||
|
|
|
@ -1290,7 +1290,7 @@ void Tablebases::init(const std::string& paths) {
|
|||
for (auto s : diagonal)
|
||||
MapA1D1D4[s] = code++;
|
||||
|
||||
// MapKK[] encodes all the 461 possible legal positions of two kings where
|
||||
// MapKK[] encodes all the 462 possible legal positions of two kings where
|
||||
// the first is in the a1-d1-d4 triangle. If the first king is on the a1-d4
|
||||
// diagonal, the other one shall not to be above the a1-h8 diagonal.
|
||||
std::vector<std::pair<int, Square>> bothOnDiagonal;
|
||||
|
|
Loading…
Add table
Reference in a new issue