Michel Van den Bergh (vdbergh)
Miguel Lahoz (miguel-l)
Mikael Bäckman (mbootsector)
+Mike Babigian (Farseer)
Mira
Miroslav Fontán (Hexik)
Moez Jellouli (MJZ1977)
Ron Britvich (Britvich)
Ronald de Man (syzygy1, syzygy)
rqs
+Rui Coelho (ruicoelhopedro)
Ryan Schmitt
Ryan Takker
Sami Kiminki (skiminki)
-Contributors to Fishtest with >10,000 CPU hours, as of 2021-12-11.
+Contributors to Fishtest with >10,000 CPU hours, as of 2022-01-08.
Thank you!
Username CPU Hours Games played
------------------------------------------------------------------
-noobpwnftw 29832955 2061725095
-mlang 2345848 162775694
-dew 1559902 93935940
-technologov 1154365 43136020
-grandphish2 988545 60725563
+noobpwnftw 30323785 2111752181
+mlang 2597136 178003354
+dew 1598255 95747056
+technologov 1395130 59347018
+grandphish2 1028906 63396841
tvijlbrief 795993 51894442
-TueRens 716909 45503672
+TueRens 737922 46359276
+okrout 719183 57150314
mibere 703840 46867607
-JojoM 675708 41046762
-okrout 648513 49953162
-linrock 563226 16184599
-pemo 520578 26816487
-gvreuls 501232 32662374
-cw 495103 33171295
-fastgm 476917 28660004
+JojoM 689134 42001146
+linrock 594355 16779359
+pemo 575248 28386103
+gvreuls 509219 33205908
+cw 500695 33575803
+fastgm 479238 28830588
crunchy 427035 27344275
-CSU_Dynasty 407300 27580858
-ctoks 386452 25757397
-oz 343309 25441096
+CSU_Dynasty 410969 27877556
+ctoks 393901 26299629
+oz 354661 26331020
Fisherman 327231 21829379
-velislav 320318 20642978
-bcross 319459 22485737
-leszek 277442 17495865
-Dantist 229980 14568674
-mgrabiak 225684 14774260
+bcross 325119 22871639
+velislav 320581 20663382
+leszek 291605 18475167
+Dantist 239411 15236750
+mgrabiak 229336 15004308
glinscott 217799 13780820
+robal 211837 13563250
nordlandia 211692 13484886
-robal 209847 13427680
-drabel 200340 13727458
+drabel 200377 13730626
bking_US 198894 11876016
Thanar 179852 12365359
-vdv 175274 9889046
-mhoram 166293 10796647
+vdv 175535 9904264
+mhoram 173134 11257113
spams 157128 10319326
marrco 150300 9402229
sqrt2 147963 9724586
-vdbergh 137186 8938965
+vdbergh 137425 8954767
CoffeeOne 137100 5024116
malala 136182 8002293
xoto 133759 9159372
-davar 122092 7960001
+davar 122113 7961971
dsmith 122059 7570238
amicic 119659 7937885
+rpngn 118952 8100045
Data 113305 8220352
BrunoBanani 112960 7436849
-rpngn 109031 7392547
CypressChess 108321 7759588
MaZePallas 102823 6633619
sterni1971 100532 5880772
sunu 100167 7040199
ElbertoOne 99028 7023771
-skiminki 98121 6478170
+skiminki 98123 6478402
+DesolatedDodo 93686 6139198
brabos 92118 6186135
+cuistot 90357 5350988
psk 89957 5984901
-cuistot 88420 5225234
-DesolatedDodo 88356 5779482
-racerschmacer 85711 6119610
+racerschmacer 85712 6119648
Vizvezdenec 83761 5344740
0x3C33 82614 5271253
BRAVONE 81239 5054681
+sschnee 78091 4678078
nssy 76497 5259388
teddybaer 75125 5407666
Pking_cda 73776 5293873
solarlight 70517 5028306
dv8silencer 70287 3883992
Bobo1239 68515 4652287
+zeryl 68203 4516139
manap 66273 4121774
-sschnee 64563 3633680
tinker 64333 4268790
-zeryl 63290 4179159
+yurikvelo 61692 4262042
qurashee 61208 3429862
-yurikvelo 60387 4169900
robnjr 57262 4053117
Freja 56938 3733019
ttruscott 56010 3680085
rkl 55132 4164467
+Wolfgang 54087 3415872
renouve 53811 3501516
finfish 51360 3370515
eva42 51272 3599691
-Wolfgang 51248 3218932
-eastorwest 50311 3409935
+eastorwest 51055 3451203
rap 49985 3219146
pb00067 49727 3298270
+Spprtr 48260 3141959
bigpen0r 47667 3336927
ronaldjerum 47654 3240695
MaxKlaxxMiner 47584 2972142
biffhero 46564 3111352
-Spprtr 45877 2995437
Fifis 45843 3088497
VoyagerOne 45476 3452465
speedycpu 43842 3003273
jbwiebe 43305 2805433
+megaman7de 43042 2823256
Antihistamine 41788 2761312
mhunt 41735 2691355
-megaman7de 40060 2625050
homyur 39893 2850481
gri 39871 2515779
-oryx 38860 2976488
+oryx 38867 2976992
SC 37299 2731694
+Garf 37213 2986270
csnodgrass 36207 2688994
jmdana 36157 2210661
-Garf 36113 2897580
strelock 34716 2074055
EthanOConnor 33370 2090311
slakovv 32915 2021889
+Calis007 32024 2163604
manapbk 30987 1810399
DMBK 30675 2383552
Prcuvu 30377 2170122
anst 30301 2190091
+armo9494 30198 2438202
jkiiski 30136 1904470
+tolkki963 29918 1822290
hyperbolic.tom 29840 2017394
chuckstablers 29659 2093438
Pyafue 29650 1902349
-tolkki963 28171 1716386
+gopeto 28881 1896862
OuaisBla 27636 1578800
-armo9494 27224 2221042
chriswk 26902 1868317
achambord 26582 1767323
-gopeto 26355 1717722
Patrick_G 26276 1801617
yorkman 26193 1992080
SFTUser 25182 1675689
Isidor 23388 1680691
Norabor 23339 1602636
cisco2015 22897 1762669
+Ente 22810 1628234
Zirie 22542 1472937
-Ente 22486 1606268
team-oh 22272 1636708
MazeOfGalious 21978 1629593
sg4032 21947 1643265
j3corre 20405 941444
Adrian.Schmidt123 20316 1281436
wei 19973 1745989
+belzedar94 19818 1434252
+user213718 19608 1334650
rstoesser 19569 1293588
eudhan 19274 1283717
vulcan 18871 1729392
-user213718 18590 1271128
jundery 18445 1115855
iisiraider 18247 1101015
ville 17883 1384026
dju 17353 978595
DragonLord 17014 1162790
IgorLeMasson 16064 1147232
+Roady 15677 1121476
ako027ako 15671 1173203
+kdave 15539 1160356
Nikolay.IT 15154 1068349
Andrew Grant 15114 895539
OssumOpossum 14857 1007129
+spcc 14838 1034050
Karby 14808 867120
enedene 14476 905279
-jsys14 14318 843704
+fishtester 14411 1016252
+jsys14 14340 844792
bpfliegel 14298 884523
+AndreasKrug 14096 1126301
mpx86 14019 759568
jpulman 13982 870599
-kdave 13933 1045550
+Ulysses 13977 1073410
crocogoat 13803 1117422
joster 13794 950160
Nesa92 13786 1114691
mbeier 13650 1044928
-AndreasKrug 13624 1090613
Hjax 13535 915487
Dark_wizzie 13422 1007152
-Ulysses 13392 1021264
-Calis007 13267 873236
Rudolphous 13244 883140
-spcc 13085 917006
Machariel 13010 863104
mabichito 12903 749391
thijsk 12886 722107
AdrianSA 12860 804972
Flopzee 12698 894821
+infinigon 12638 933684
fatmurphy 12547 853210
scuzzi 12511 845761
SapphireBrand 12416 969604
modolief 12386 896470
-fishtester 12320 873882
Farseer 12249 694108
pgontarz 12151 848794
stocky 11954 699440
mschmidt 11941 803401
Maxim 11543 836024
infinity 11470 727027
+pirt 11434 889369
aga 11409 695071
torbjo 11395 729145
-pirt 11392 886291
Thomas A. Anderson 11372 732094
savage84 11358 670860
FormazChar 11304 847663
+dbernier 11274 806566
d64 11263 789184
-dbernier 11258 805102
MooTheCow 11237 720174
snicolet 11106 869170
ali-al-zhrani 11098 768494
michaelrpg 10509 739239
OIVAS7572 10420 995586
dzjp 10343 732529
-infinigon 10319 776158
-Garruk 10314 702629
+Garruk 10332 703905
ols 10259 570669
lbraesch 10252 647825
# Stockfish, a UCI chess playing engine derived from Glaurung 2.1
-# Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+# Copyright (C) 2004-2022 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
ifneq ($(KERNEL),Darwin)
ifneq ($(KERNEL),OpenBSD)
ifneq ($(KERNEL),FreeBSD)
+ ifneq ($(findstring MINGW,$(KERNEL)),MINGW)
ifneq ($(RTLIB),compiler-rt)
LDFLAGS += -latomic
endif
endif
endif
endif
+ endif
ifeq ($(arch),$(filter $(arch),armv7 armv8))
ifeq ($(OS),Android)
CXXFLAGS += -m$(bits)
LDFLAGS += -m$(bits)
endif
+
+ ifeq ($(findstring MINGW,$(KERNEL)),MINGW)
+ LDFLAGS += -static
+ endif
+
endif
ifeq ($(KERNEL),Darwin)
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
// Chess 960
"setoption name UCI_Chess960 value true",
"bbqnnrkr/pppppppp/8/8/8/8/PPPPPPPP/BBQNNRKR w HFhf - 0 1 moves g2g3 d7d5 d2d4 c8h3 c1g5 e8d6 g5e7 f7f6",
+ "nqbnrkrb/pppppppp/8/8/8/8/PPPPPPPP/NQBNRKRB w KQkq - 0 1",
"setoption name UCI_Chess960 value false"
};
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
namespace {
// Threshold for lazy and space evaluation
- constexpr Value LazyThreshold1 = Value(3130);
- constexpr Value LazyThreshold2 = Value(2204);
+ constexpr Value LazyThreshold1 = Value(3631);
+ constexpr Value LazyThreshold2 = Value(2084);
constexpr Value SpaceThreshold = Value(11551);
// KingAttackWeights[PieceType] contains king attack weights by piece type
&& pos.piece_on(SQ_G7) == B_PAWN)
correction += CorneredBishop;
- return pos.side_to_move() == WHITE ? Value(5 * correction)
- : -Value(5 * correction);
+ return pos.side_to_move() == WHITE ? Value(3 * correction)
+ : -Value(3 * correction);
}
} // namespace Eval
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 classical = false;
-
if ( !useNNUE
- || abs(eg_value(pos.psq_score())) * 5 > (850 + pos.non_pawn_material() / 64) * (5 + pos.rule50_count()))
+ || abs(eg_value(pos.psq_score())) * 5 > (849 + pos.non_pawn_material() / 64) * (5 + pos.rule50_count()))
{
v = Evaluation<NO_TRACE>(pos).value(); // classical
- classical = abs(v) >= 300;
+ useClassical = abs(v) >= 298;
}
// If result of a classical evaluation is much lower than threshold fall back to NNUE
- if (!classical && useNNUE)
+ if (useNNUE && !useClassical)
{
- int scale = 1136
- + 20 * pos.non_pawn_material() / 1024;
-
Value nnue = NNUE::evaluate(pos, true); // NNUE
+ int scale = 1136 + 20 * pos.non_pawn_material() / 1024;
Color stm = pos.side_to_move();
Value optimism = pos.this_thread()->optimism[stm];
+ Value psq = (stm == WHITE ? 1 : -1) * eg_value(pos.psq_score());
+ int complexity = 35 * abs(nnue - psq) / 256;
+ optimism = optimism * (44 + complexity) / 32;
v = (nnue + optimism) * scale / 1024 - optimism;
if (pos.is_chess960())
}
// Damp down the evaluation linearly when shuffling
- v = v * (207 - pos.rule50_count()) / 207;
+ v = v * (208 - pos.rule50_count()) / 208;
// Guarantee evaluation does not hit the tablebase range
v = std::clamp(v, VALUE_TB_LOSS_IN_MAX_PLY + 1, VALUE_TB_WIN_IN_MAX_PLY - 1);
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
// Reductions lookup table, initialized at startup
int Reductions[MAX_MOVES]; // [depth or moveNumber]
- Depth reduction(bool i, Depth d, int mn, bool rangeReduction, Value delta, Value rootDelta) {
+ Depth reduction(bool i, Depth d, int mn, Value delta, Value rootDelta) {
int r = Reductions[d] * Reductions[mn];
- return (r + 1358 - int(delta) * 1024 / int(rootDelta)) / 1024 + (!i && r > 904) + rangeReduction;
+ return (r + 1358 - int(delta) * 1024 / int(rootDelta)) / 1024 + (!i && r > 904);
}
constexpr int futility_move_count(bool improving, Depth depth) {
if ( ss->ply > 10
&& search_explosion(thisThread) == MUST_CALM_DOWN
&& depth > (ss-1)->depth)
- depth = (ss-1)->depth;
+ depth = (ss-1)->depth;
constexpr bool PvNode = nodeType != NonPV;
constexpr bool rootNode = nodeType == Root;
bool givesCheck, improving, didLMR, priorCapture;
bool captureOrPromotion, doFullDepthSearch, moveCountPruning, ttCapture;
Piece movedPiece;
- int moveCount, captureCount, quietCount, bestMoveCount, improvement;
+ int moveCount, captureCount, quietCount, bestMoveCount, improvement, complexity;
// Step 1. Initialize node
ss->inCheck = pos.checkers();
ss->staticEval = eval = VALUE_NONE;
improving = false;
improvement = 0;
+ complexity = 0;
goto moves_loop;
}
else if (ss->ttHit)
: 200;
improving = improvement > 0;
+ complexity = abs(ss->staticEval - (us == WHITE ? eg_value(pos.psq_score()) : -eg_value(pos.psq_score())));
// Step 7. Futility pruning: child node (~25 Elo).
// The depth condition is important for mate finding.
&& (ss-1)->statScore < 23767
&& eval >= beta
&& eval >= ss->staticEval
- && ss->staticEval >= beta - 20 * depth - improvement / 15 + 204
+ && ss->staticEval >= beta - 20 * depth - improvement / 15 + 204 + complexity / 25
&& !excludedMove
&& pos.non_pawn_material(us)
&& (ss->ply >= thisThread->nmpMinPly || us != thisThread->nmpColor))
moves_loop: // When in check, search starts here
- int rangeReduction = 0;
-
// Step 11. A small Probcut idea, when we are in check (~0 Elo)
probCutBeta = beta + 409;
if ( ss->inCheck
moveCountPruning = moveCount >= futility_move_count(improving, depth);
// Reduced depth of the next LMR search
- int lmrDepth = std::max(newDepth - reduction(improving, depth, moveCount, rangeReduction > 2, delta, thisThread->rootDelta), 0);
+ int lmrDepth = std::max(newDepth - reduction(improving, depth, moveCount, delta, thisThread->rootDelta), 0);
if ( captureOrPromotion
|| givesCheck)
continue;
// SEE based pruning (~9 Elo)
- if (!pos.see_ge(move, Value(-218) * depth))
+ if (!pos.see_ge(move, Value(-217) * depth))
continue;
}
else
// Continuation history based pruning (~2 Elo)
if ( lmrDepth < 5
- && history < -3000 * depth + 3000)
+ && history < -3875 * (depth - 1))
continue;
history += thisThread->mainHistory[us][from_to(move)];
// Futility pruning: parent node (~9 Elo)
if ( !ss->inCheck
&& lmrDepth < 8
- && ss->staticEval + 142 + 139 * lmrDepth + history / 64 <= alpha)
+ && ss->staticEval + 138 + 137 * lmrDepth + history / 64 <= alpha)
continue;
// Prune moves with negative SEE (~3 Elo)
|| !captureOrPromotion
|| (cutNode && (ss-1)->moveCount > 1)))
{
- Depth r = reduction(improving, depth, moveCount, rangeReduction > 2, delta, thisThread->rootDelta);
+ Depth r = reduction(improving, depth, moveCount, delta, thisThread->rootDelta);
// Decrease reduction at some PvNodes (~2 Elo)
if ( PvNode
value = -search<NonPV>(pos, ss+1, -(alpha+1), -alpha, d, true);
- // Range reductions (~3 Elo)
- if (ss->staticEval - value < 30 && depth > 7)
- rangeReduction++;
-
// If the son is reduced and fails high it will be re-searched at full depth
doFullDepthSearch = value > alpha && d < newDepth;
- doDeeperSearch = value > alpha + 88;
+ doDeeperSearch = value > (alpha + 62 + 20 * (newDepth - d));
didLMR = true;
}
else
rm.pv.push_back(*m);
// We record how often the best move has been changed in each iteration.
- // This information is used for time management and LMR. In MultiPV mode,
+ // This information is used for time management. In MultiPV mode,
// we must take care to only do this for the first PV line.
if ( moveCount > 1
&& !thisThread->pvIdx)
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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
/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
- Copyright (C) 2004-2021 The Stockfish developers (see AUTHORS file)
+ Copyright (C) 2004-2022 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