mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 09:39:36 +00:00
New voting formula for threads
We now use a quadratic formula during the vote for threads when deciding on which thread to pick a move from. time control 5+0.05, with 8 threads: LLR: 2.95 (-2.94,2.94) [0.00,5.00] Total: 20202 W: 4031 L: 3813 D: 12358 http://tests.stockfishchess.org/tests/view/5c16c8e60ebc5902ba1223e2 time control 20+0.2, with 8 threads: LLR: 2.96 (-2.94,2.94) [0.00,5.00] Total: 14330 W: 2290 L: 2115 D: 9925 http://tests.stockfishchess.org/tests/view/5c16efca0ebc5902ba122993 20000 games match at time control 5+0.05, with 31 threads: ELO: 5.63 +-2.8 (95%) LOS: 100.0% Total: 20000 W: 3539 L: 3215 D: 13246 http://tests.stockfishchess.org/tests/view/5c16f07a0ebc5902ba122a20 Closes https://github.com/official-stockfish/Stockfish/pull/1876 No functional change (in simple thread mode)
This commit is contained in:
parent
7240a90bf9
commit
67ae53b020
1 changed files with 5 additions and 4 deletions
|
@ -254,7 +254,7 @@ void MainThread::search() {
|
|||
&& !Skill(Options["Skill Level"]).enabled()
|
||||
&& rootMoves[0].pv[0] != MOVE_NONE)
|
||||
{
|
||||
std::map<Move, int> votes;
|
||||
std::map<Move, int64_t> votes;
|
||||
Value minScore = this->rootMoves[0].score;
|
||||
|
||||
// Find out minimum score and reset votes for moves which can be voted
|
||||
|
@ -265,12 +265,13 @@ void MainThread::search() {
|
|||
}
|
||||
|
||||
// Vote according to score and depth
|
||||
auto square = [](int64_t x) { return x * x; };
|
||||
for (Thread* th : Threads)
|
||||
votes[th->rootMoves[0].pv[0]] += int(th->rootMoves[0].score - minScore)
|
||||
+ int(th->completedDepth);
|
||||
votes[th->rootMoves[0].pv[0]] += 200 + (square(th->rootMoves[0].score - minScore + 1)
|
||||
* int64_t(th->completedDepth));
|
||||
|
||||
// Select best thread
|
||||
int bestVote = votes[this->rootMoves[0].pv[0]];
|
||||
int64_t bestVote = votes[this->rootMoves[0].pv[0]];
|
||||
for (Thread* th : Threads)
|
||||
{
|
||||
if (votes[th->rootMoves[0].pv[0]] > bestVote)
|
||||
|
|
Loading…
Add table
Reference in a new issue