mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 12:47:08 +00:00
[STC](https://tests.stockfishchess.org/tests/live_elo/69cb991bc025c305b7daa219) LLR: 2.97 (-2.94,2.94) <0.00,2.00> Total: 47520 W: 12558 L: 12219 D: 22743 Ptnml(0-2): 190, 5474, 12102, 5795, 199 [LTC](https://tests.stockfishchess.org/tests/live_elo/69cc6b42731dfb72d2e92128) LLR: 2.94 (-2.94,2.94) <0.50,2.50> Total: 123756 W: 31996 L: 31497 D: 60263 Ptnml(0-2): 81, 13512, 34221, 13955, 109 Adds features for pawns pushing against other pawns. For indexing, we use the existing threats feature set by adding the forward square to the squares threatened by a pawn. This threat is only enabled when another pawn occupies that square. We then add appropriate logic changes in `update_piece_threats` and `features/full_threats.cpp`. The wonderful Ciekce (of Stormphrax) and peregrine (of Reckless) also had similar ideas with adding forward pawn movements to TI, and I appreciate their giving me motivation to figure out `nnue-pytorch` and test it. closes https://github.com/official-stockfish/Stockfish/pull/6694 Bench: 2926703
59 lines
1.9 KiB
C++
59 lines
1.9 KiB
C++
/*
|
|
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
|
|
Copyright (C) 2004-2026 The Stockfish developers (see AUTHORS file)
|
|
|
|
Stockfish is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
Stockfish is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef EVALUATE_H_INCLUDED
|
|
#define EVALUATE_H_INCLUDED
|
|
|
|
#include <string>
|
|
|
|
#include "types.h"
|
|
|
|
namespace Stockfish {
|
|
|
|
class Position;
|
|
|
|
namespace Eval {
|
|
|
|
// The default net name MUST follow the format nn-[SHA256 first 12 digits].nnue
|
|
// 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-7bf13f9655c8.nnue"
|
|
#define EvalFileDefaultNameSmall "nn-47fc8b7fff06.nnue"
|
|
|
|
namespace NNUE {
|
|
struct Networks;
|
|
struct AccumulatorCaches;
|
|
class AccumulatorStack;
|
|
}
|
|
|
|
std::string trace(Position& pos, const Eval::NNUE::Networks& networks);
|
|
|
|
int simple_eval(const Position& pos);
|
|
bool use_smallnet(const Position& pos);
|
|
Value evaluate(const NNUE::Networks& networks,
|
|
const Position& pos,
|
|
Eval::NNUE::AccumulatorStack& accumulators,
|
|
Eval::NNUE::AccumulatorCaches& caches,
|
|
int optimism);
|
|
} // namespace Eval
|
|
|
|
} // namespace Stockfish
|
|
|
|
#endif // #ifndef EVALUATE_H_INCLUDED
|