Releases: Nonlinear2/Bread-Engine
Bread 3.0.0
Bread 3.0.0 is much stronger than version 2.1.1 thanks to various search and NNUE improvements. The code has been largely refactored and the occasional search explosions should now be fixed. You can find the progression tests results in the table below:
| Short time control (8 + 0.08 s) | +158 Elo |
| Long time control (40 + 0.4 s) | +155 Elo |
What's new:
Main search:
- material scaling (~26 elo)
- pawn correction history (~17 elo)
- TT refactors, TT entry replacement (~12 elo)
- SPSA tunes (~10 elo)
- sorted move generation improvements (~ 8 elo)
- better search termination (~7 elo)
- history bonus tweaks (~5 elo)
- refactor SEE (~5 elo)
- add skip quiets to qsearch (~ 4 elo)
- add double extensions (~4 elo)
- capture history (~2 elo)
NNUE:
- a modified architecture ((768x10 -> 1024)x2 -> 1x8) featuring input buckets and training data from a new training stage (~50 elo)
- add support for AVX512 instructions
- avoid recomputing both accumulators when the king moves (~10 elo)
- add finny tables (~3 elo)
- various refactors (~5 elo)
Simplifications / Bug fixes:
- fixed the
go infinitecommand. - fixed occasional search explosions
Progression tests results
STC: 8 + 0.08 s
Elo | 158.45 +- 4.95 (95%)
Conf | 8.0+0.08s Threads=1 Hash=32MB
Games | N: 10104 W: 4962 L: 649 D: 4493
Penta | [21, 256, 1310, 2319, 1146]
https://nonlinear.eu.pythonanywhere.com/test/1000/
LTC: 40 + 0.4 s
Elo | 155.44 +- 4.51 (95%)
Conf | 40.0+0.40s Threads=1 Hash=128MB
Games | N: 10020 W: 4596 L: 390 D: 5034
Penta | [6, 160, 1425, 2460, 959]
https://nonlinear.eu.pythonanywhere.com/test/1001/
Bread Engine 2.1.1
This is a bugfix release of version 2.1.0, and should no longer crash during games. This version should be downloaded instead of version 2.1.0.
Bread Engine 2.1.0
Bread 2.1.0 is quite a bit stronger than version 2.0.0 thanks to various search and NNUE improvements. You can find the progression tests results in the table below:
| Short time control (8 + 0.08 s) | +144 Elo |
| Long time control (40 + 0.4 s) | +132 Elo |
What's new:
Main search:
- (finally) add PVS (~33 elo)
- add aspiration windows (~16 elo)
- improve time management (~17 elo)
- add fractional depth reductions (~12 elo)
- tweak history bonuses (~12 elo)
- skip late quiet moves (~10 elo)
- improve RFP (~10 elo)
- tweak singular extensions (~9 elo)
- improve NMP (~9 elo)
- add TT prefetching (~7 elo)
- improve SEE pruning condition (~7 elo)
- SPSA tune (~5 elo)
- tweak qsearch tt storage (~5 elo)
- reduce check extensions (~5 elo)
- add improving reductions (~5 elo)
- store more pv entries in the transpositon table (~4 elo)
- add mate distance pruning (~3 elo)
- reduce PV nodes (~3 elo)
- tweak piece values (~2 elo)
- add cutnode reductions (~2 elo)
NNUE:
- fix AVX register allocation (~23 elo)
- add horizontal mirroring (~18 elo)
- add lazy updates (~8 elo)
- factor out an if/else condition (~2 elo)
- prefetch weights for lazy updates (~2 elo)
Simplifications / Bug fixes:
- fix ply count
- remove king square maps
Progression tests results
STC: 8 + 0.08 s
Elo | 144.04 +- 4.81 (95%)
Conf | 8.0+0.08s Threads=1 Hash=32MB
Games | N: 10034 W: 4594 L: 657 D: 4783
Penta | [23, 279, 1458, 2252, 1005]
https://nonlinear.eu.pythonanywhere.com/test/725/
LTC: 40 + 0.4 s
Elo | 132.12 +- 4.30 (95%)
Conf | 40.0+0.40s Threads=1 Hash=128MB
Games | N: 10010 W: 4078 L: 445 D: 5487
Penta | [7, 219, 1664, 2364, 751]
https://nonlinear.eu.pythonanywhere.com/test/726/
Bread 2.0.0
Thanks to a new neural network and many search improvements, Bread 2.0.0 is much stronger than version 1.6.0!
| Short time control (8 + 0.08 s) | +382 Elo |
| Long time control (40 + 0.4 s) | +340 Elo |
NNUE
Bread's neural network has been mostly rewritten. It was retrained from zero knowledge on 40 million games of self play, making Bread a "zero" engine.
More precisely, improvements include:
- a modified architecture: 768x2 -> 1024x2 -> 1, trained on ~5 billion positions with 10 self play training iterations (~369 elo)
- screlu activation for the feature transformer (~21 elo)
- output buckets (~5 elo)
- direct accumulator calculation (~30 elo)
- a sped up L1 inference (~8 elo)
Main search:
- use tt_capture for nmp reductions (~7 elo)
- add continuation history pruning (~15 elo)
- two SPSA tunes (~48 elo)
General improvements:
- add support for the genfens command
- fixed makefile executable extension for linux
- improve threefold detection (~22 elo)
Improved Nonsense option
Bread features a uci option called Nonsense, which has been improved in this release. If the option is active, bread will:
- play the bongcloud opening
- print lyrics from "never gonna give you up" during search
- take all of the opponent's pieces and promote all pawns to knights and bishops
Progression tests results
STC: 8 + 0.08 s
Results of bread_engine_2.0.0 vs bread_engine_1.6.0 (8+0.08, 1t, 16MB, UHO_2024_8mvs_big_+115_+134.pgn):
Elo: 382.18 +/- 19.10, nElo: 618.97 +/- 15.23
LOS: 100.00 %, DrawRatio: 7.60 %, PairsRatio: 461.00
Games: 2000, Wins: 1666, Losses: 65, Draws: 269, Points: 1800.5 (90.03 %)
Ptnml(0-2): [0, 2, 76, 241, 681], WL/DD Ratio: 4.85
LTC: 40 + 0.4 s
Results of bread_engine_2.0.0 vs bread_engine_1.6.0 (40+0.4, 1t, 128MB, UHO_2024_8mvs_big_+115_+134.pgn):
Elo: 339.63 +/- 19.19, nElo: 552.46 +/- 17.58
LOS: 100.00 %, DrawRatio: 8.67 %, PairsRatio: 227.33
Games: 1500, Wins: 1188, Losses: 60, Draws: 252, Points: 1314.0 (87.60 %)
Ptnml(0-2): [0, 3, 65, 233, 449], WL/DD Ratio: 7.12
Bread Engine 1.6.0
Bread Engine 1.6.0 is around 97 elo stronger at short time control (8+0.08s) and 100 elo stronger at long time control (40+0.4s).
This version includes major bugfixes and should no longer crash during engames. SPSA is now supported, and two tunes of 40k games have been run for the main search and move ordering, resulting in a 30 elo increase.
Major parts of Bread's codebase have also been rewritten and improved.
General
- ability to dump the engine state in a file for bug reproduction
- added a makefile as a way to build the engine
- better benchmark positions
- SPSA tune (~30 elo)
- merge the root negamax search with the main search
Additions/Improvements:
- static exchange evaluation pruning to the main search (~21 elo)
- improving heuristic for reverse futility pruning and late move pruning (~12 elo)
- multi cut pruning (~11 elo)
- search transposition table moves in qsearch when in check (~16 elo)
- prevent transposition table cuts on pv nodes (~18 elo)
- decrease the move ordering static exchange evaluation threshold (~6 elo)
- store best moves only if they increase alpha (~5 elo)
Bug fixes:
- fix storing invalid evaluations in the transposition table when the only legal move is excluded
- fix singular beta going out of the legal evaluation range (~3 elo)
- fix a search stack overflow (~3 elo)
- fix an overflow in reported nodes per second
STC: 8 + 0.08 s
Score of bread_engine_1.6.0 vs bread_engine_1.5.0: 1523 - 703 - 774 [0.637] 3000
... bread_engine_1.6.0 playing White: 883 - 287 - 330 [0.699] 1500
... bread_engine_1.6.0 playing Black: 640 - 416 - 444 [0.575] 1500
... White vs Black: 1299 - 927 - 774 [0.562] 3000
Elo difference: 97.4 +/- 11.0, LOS: 100.0 %, DrawRatio: 25.8 %
LTC: 40 + 0.4 s
Score of bread_engine_1.6.0 vs bread_engine_1.5.0: 351 - 140 - 259 [0.641] 750
... bread_engine_1.6.0 playing White: 199 - 55 - 121 [0.692] 375
... bread_engine_1.6.0 playing Black: 152 - 85 - 138 [0.589] 375
... White vs Black: 284 - 207 - 259 [0.551] 750
Elo difference: 100.5 +/- 20.5, LOS: 100.0 %, DrawRatio: 34.5 %
Bread Engine 1.5.5
This is a bugfix release of Bread, that should no longer crash during engames. This version is also stronger than version 1.5.0 by around 40 elo, though i haven't ran a progression test.
Additions/Improvements:
- better debugging features
- added static exchange evaluation pruning to the main search
- added the improving heuristic
Bug fixes:
- fixed storing invalid evaluations in the transposition table when the only legal move is excluded
- fixed singular beta going out of the legal evaluation range
- fixed a search stack overflow
Bread Engine 1.5.0
Bread Engine 1.5.0 is around 124 elo stronger than version 1.4.0 in STC and around 167 elo stronger in LTC.
These gains mainly come from new heuristics, better histories and bugfixes. The nodes per second in the bench command can no longer be negative (oops), and there sould be no more illegal pv lines.
The executable is also roughly two times smaller as the neural network weights are now embedded in their quantized integer type.
Additions/Improvements:
- improve late move reductions (~10 elo)
- switch to a quadratic razoring threshold (~16 elo)
- refactor and improve root move ordering (~13 elo)
- use static exchange evaluation in move ordering (~47 elo)
- use an assembly incbin macro to embed the neural network in the executable
- add and improve continuation history (~27 elo)
- add singular extensions (~14 elo)
Bug fixes:
- fixed reporting illegal pv moves when the game ends in a draw
- fixed a bug with quiescence search transposition evaluations
- fixed an integer overflow when displaying the nodes per seconds in bench
- fixed the quiet history being used only for one side (~53 elo)
Of course adding up the elo estimates of each improvement doesn't match the overall gain, as life would be too good otherwise.
In addition, major refactors and readability improvements have been done in the move ordering, root search, nnue and search parts of Bread.
STC: 8 + 0.08 s
Results of bread_engine_1.5.0 vs bread_engine_1.4.0 (8+0.08, NULL, NULL, UHO_2024_8mvs_big_+115_+134.pgn):
Elo: 123.55 +/- 14.22, nElo: 166.12 +/- 17.58
LOS: 100.00 %, DrawRatio: 32.67 %, PairsRatio: 5.39
Games: 1500, Wins: 817, Losses: 305, Draws: 378, Points: 1006.0 (67.07 %)
Ptnml(0-2): [19, 60, 245, 242, 184], WL/DD Ratio: 5.45
LTC: 40 + 0.4 s
Results of bread_engine_1.5.0 vs bread_engine_1.4.0 (40+0.4, NULL, NULL, UHO_2024_8mvs_big_+115_+134.pgn):
Elo: 167.53 +/- 21.02, nElo: 230.86 +/- 24.87
LOS: 100.00 %, DrawRatio: 25.60 %, PairsRatio: 8.30
Games: 750, Wins: 433, Losses: 97, Draws: 220, Points: 543.0 (72.40 %)
Ptnml(0-2): [2, 28, 96, 130, 119], WL/DD Ratio: 2.10
Bread Engine 1.4.0
Bread Engine 1.4.0 is around 64 elo stronger than version 1.3.0 in STC and around 44 elo stronger in LTC.
Additions/Improvements:
- improved null move pruning condition
- removed second search on root node
- avoid pruning recaptures or promotions in quiescence search
- prune late moves in quiescence search
- improve history bonuses.
bug fixes:
- fix the fifty move rule draw detection
- avoid generating legal moves when there is a transposition table move
- fix transposition evaluations in quiescence search
In addition, version 1.4.0 has many code refactors and cleanups compared to version 1.3.0.
STC: 10 + 0.1 s
Results of bread_engine_1.4.0 vs bread_engine_1.3.0 (10+0.1, 1t, MB, UHO_2024_8mvs_big_+115_+134.pgn):
Elo: 64.19 +/- 13.60, nElo: 84.91 +/- 17.58
LOS: 100.00 %, DrawRatio: 36.93 %, PairsRatio: 2.28
Games: 1500, Wins: 654, Losses: 380, Draws: 466, Points: 887.0 (59.13 %)
Ptnml(0-2): [33, 111, 277, 207, 122]
LTC: 40 + 0.4 s
Results of bread_engine_1.4.0 vs bread_engine_1.3.0 (40+0.4, 1t, MB, UHO_2024_8mvs_big_+115_+134.pgn):
Elo: 43.78 +/- 18.29, nElo: 60.20 +/- 24.87
LOS: 100.00 %, DrawRatio: 41.07 %, PairsRatio: 1.80
Games: 750, Wins: 308, Losses: 214, Draws: 228, Points: 422.0 (56.27 %)
Ptnml(0-2): [17, 62, 154, 94, 48]
Bread Engine 1.3.0
Bread Engine 1.3.0 is around 58 elo stronger than version 1.2.0 in STC and around 45 elo stronger in LTC.
NNUE improvements:
Until now, Bread Engine had a neural network trained on lichess pgns featuring stockfish evaluations.
Bread Engine 1.3.0 has a new neural network, that was trained from scratch using games of self-play from version 1.2.0.
The new network has a slightly modified architecture, and a bug that produced integer overflows due to bad weight clipping has been fixed.
Other improvements:
- better transposition tables
- code refactors
STC: 10 + 0.1 s
Results of bread_engine_1.3.0 vs bread_engine_1.2.0 (10+0.1, 1t, MB, UHO_2024_8mvs_big_+115_+134.pgn):
Elo: 57.97 +/- 13.68, nElo: 75.95 +/- 17.58
LOS: 100.00 %, DrawRatio: 39.47 %, PairsRatio: 2.09
Games: 1500, Wins: 692, Losses: 444, Draws: 364, Points: 874.0 (58.27 %)
Ptnml(0-2): [37, 110, 296, 182, 125]
LTC: 40 + 0.4 s
Results of bread_engine_1.3.0 vs bread_engine_1.2.0 (40+0.4, 1t, MB, UHO_2024_8mvs_big_+115_+134.pgn):
Elo: 45.19 +/- 19.21, nElo: 59.21 +/- 24.87
LOS: 100.00 %, DrawRatio: 39.73 %, PairsRatio: 1.72
Games: 750, Wins: 318, Losses: 221, Draws: 211, Points: 423.5 (56.47 %)
Ptnml(0-2): [20, 63, 149, 86, 57]
Bread Engine 1.2.0
Bread Engine 1.2.0 is around 45 elo stronger than version 1.1.0 at short time control, and 55 elo stronger at long time control.
Added features include:
- late move pruning (~15 elo)
- tweaks to null move pruning and reverse futility pruning (~10 elo)
- check guards (~10 elo)
- more search reductions (~15 elo)
- and an improved move ordering scheme (~9 elo)
The build system has also been modified, and a bench command has been added.
STC: 10 + 0.1 s
Results of bread_engine_1.2.0 vs bread_engine_1.1.0 (10+0.1, 1t, MB, UHO_2024_8mvs_big_+115_+134.pgn):
Elo: 46.60 +/- 13.46, nElo: 61.66 +/- 17.58
LOS: 100.00 %, DrawRatio: 38.00 %, PairsRatio: 1.82
Games: 1500, Wins: 607, Losses: 407, Draws: 486, Points: 850.0 (56.67 %)
Ptnml(0-2): [40, 125, 285, 195, 105]
LTC: 40 + 0.4 s
Results of bread_engine_1.2.0 vs bread_engine_1.1.0 (40+0.4, 1t, MB, UHO_2024_8mvs_big_+115_+134.pgn):
Elo: 56.55 +/- 18.85, nElo: 76.00 +/- 24.87
LOS: 100.00 %, DrawRatio: 36.80 %, PairsRatio: 2.20
Games: 750, Wins: 307, Losses: 186, Draws: 257, Points: 435.5 (58.07 %)
Ptnml(0-2): [19, 55, 138, 112, 51]