mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-23 05:07:14 +00:00
This PR proposes to change the parameter dependence of Stockfish's internal WDL model from full move counter to material count. In addition it ensures that an evaluation of 100 centipawns always corresponds to a 50% win probability at fishtest LTC, whereas for master this holds only at move number 32. See also https://github.com/official-stockfish/Stockfish/pull/4920 and the discussion therein. The new model was fitted based on about 340M positions extracted from 5.6M fishtest LTC games from the last three weeks, involving SF versions frome67cc979fd(SF 16.1) to current master. The involved commands are for [WDL_model](https://github.com/official-stockfish/WDL_model) are: ``` ./updateWDL.sh --firstreve67cc979fdpython scoreWDL.py updateWDL.json --plot save --pgnName update_material.png --momType "material" --momTarget 58 --materialMin 10 --modelFitting optimizeProbability ``` The anchor `58` for the material count value was chosen to be as close as possible to the observed average material count of fishtest LTC games at move 32 (`43`), while not changing the value of `NormalizeToPawnValue` compared to the move-based WDL model by more than 1. The patch only affects the displayed cp and wdl values. closes https://github.com/official-stockfish/Stockfish/pull/5121 No functional change
75 lines
2.2 KiB
C++
75 lines
2.2 KiB
C++
/*
|
|
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
|
|
Copyright (C) 2004-2024 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 UCI_H_INCLUDED
|
|
#define UCI_H_INCLUDED
|
|
|
|
#include <iostream>
|
|
#include <string>
|
|
|
|
#include "misc.h"
|
|
#include "nnue/network.h"
|
|
#include "position.h"
|
|
#include "search.h"
|
|
#include "thread.h"
|
|
#include "tt.h"
|
|
#include "ucioption.h"
|
|
|
|
namespace Stockfish {
|
|
|
|
class Move;
|
|
enum Square : int;
|
|
using Value = int;
|
|
|
|
class UCI {
|
|
public:
|
|
UCI(int argc, char** argv);
|
|
|
|
void loop();
|
|
|
|
static int to_cp(Value v, const Position& pos);
|
|
static std::string to_score(Value v, const Position& pos);
|
|
static std::string square(Square s);
|
|
static std::string move(Move m, bool chess960);
|
|
static std::string wdl(Value v, const Position& pos);
|
|
static Move to_move(const Position& pos, std::string& str);
|
|
|
|
static Search::LimitsType parse_limits(const Position& pos, std::istream& is);
|
|
|
|
const std::string& working_directory() const { return cli.workingDirectory; }
|
|
|
|
OptionsMap options;
|
|
Eval::NNUE::Networks networks;
|
|
|
|
private:
|
|
TranspositionTable tt;
|
|
ThreadPool threads;
|
|
CommandLine cli;
|
|
|
|
void go(Position& pos, std::istringstream& is, StateListPtr& states);
|
|
void bench(Position& pos, std::istream& args, StateListPtr& states);
|
|
void position(Position& pos, std::istringstream& is, StateListPtr& states);
|
|
void trace_eval(Position& pos);
|
|
void search_clear();
|
|
void setoption(std::istringstream& is);
|
|
};
|
|
|
|
} // namespace Stockfish
|
|
|
|
#endif // #ifndef UCI_H_INCLUDED
|