I have added all algos of commentors that sent me PMs and thanks to you all for the nice messages! - With some experience I could squeeze more performance out of some algorithms than their original authors.
This git repo contains one single header for any and all algorithms that you can think of in the best possible and most up to date version:
https://github.com/Gigantua/Chess_Movegen
Now I managed to increase SBAMG by Syed Fahad with the o^(o-3cbn) trick from 280 to 400Mnps! - with some optimsiations. In my opinion this git repo is really great to read and look at all the ideas in a modern C++20 envelope.
No Initialisation - just copy paste any header of your liking and play with it.
If someone is missing an algorithm just respond or PM me.
All algos that support templating have a seperate templated call that improves performance by another 40-70%! (this is possible if the square you query is a constant like in a compiletime unrolled loop!)
If you read this message please run it and posts results! I am Interested in any processor really.
Greetings - Daniel
Code: Select all
AMD Ryzen 9 5950X 16-Core Processor
Megalooks Known Positions/s:
Name Performance [MQueens/s] Tablesize Dependencies Template Author Reference
Exploding Bitboards 151.495605 768 [6kb] imul64 no Harald Lüßen http://www.open-aurec.com/wbforum/viewtopic.php?f=4&t=4523&start=80
Reference (Switch Lookup) 202.809546 0 [0kb] none yes Daniel Inführ (dangi12012) http://www.talkchess.com/forum3/viewtopic.php?f=7&t=78235&p=907362&hilit=espresso#p907362
Pext Emulated 97.441194 107904 [843kb] none no Zach Wegner https://randombit.net/bitbashing/posts/haswell_bit_permutations.html
Dumb7 Fill 110.854068 0 [0kb] none no Gunnar Andersson https://www.chessprogramming.org/Dumb7Fill
Kogge-Stone 180.547527 0 [0kb] none no Peter M. Kogge, Harold S. Stone https://www.chessprogramming.org/Kogge-Stone_Algorithm
Rotated Bitboards 60.483067 1848 [14kb] none no Robert Hyatt https://www.chessprogramming.org/Rotated_Bitboards
QBBEngine 226.598966 0 [0kb] countr_zero, countl_zero yes Fabio Gobbato https://www.chessprogramming.org/QBBEngine
Classical Bob-Mike 265.402686 1024 [8kb] countr_zero, countl_zero yes Robert Hyatt and Michael Sherwin https://www.chessprogramming.org/Classical_Approach
Leorik 230.667371 128 [1kb] countl_zero no Thomas Jahn (lithander) https://github.com/lithander/MinimalChessEngine
Leorik Inline 314.600666 0 [0kb] countl_zero no Thomas Jahn (lithander) https://github.com/lithander/MinimalChessEngine
Obstruction Difference 259.557390 768 [6kb] countl_zero no Michael Hoffmann http://www.talkchess.com/forum3/viewtopic.php?t=29087
Obstruction Difference Inline 606.763325 0 [0kb] countl_zero yes Michael Hoffmann http://www.talkchess.com/forum3/viewtopic.php?t=29087
Slide Arithmetic 262.357123 256 [2kb] bzhi_u64, blsmsk_u64 no Jakob Progsch and Daniel Inführ http://www.talkchess.com/forum3/viewtopic.php?f=7&t=78693&p=914767&hilit=SlideArithm#p914767
Slide Arithmetic Inline 303.428841 0 [0kb] bzhi_u64, blsmsk_u64 no Jakob Progsch and Daniel Inführ http://www.talkchess.com/forum3/viewtopic.php?f=7&t=78693&p=914767&hilit=SlideArithm#p914767
SBAMG o^(o-3cbn) 283.322362 576 [4kb] countl_zero, bswap yes Syed Fahad http://www.talkchess.com/forum3/viewtopic.php?t=59845
SBAMG Inline 416.909593 0 [0kb] countl_zero, bswap yes Syed Fahad and Daniel Inführ http://www.talkchess.com/forum3/viewtopic.php?t=59845
Hyperbola Quintessence o^(o-2r) 319.183210 256 [2kb] bswap no Ryan Mack https://www.chessprogramming.org/Hyperbola_Quintessence
Hyperbola Quintessence Inline 386.557931 0 [0kb] bswap yes Ryan Mack https://www.chessprogramming.org/Hyperbola_Quintessence
Kindergarten 406.239070 16640 [130kb] imul64 no Urban Koistinen https://www.chessprogramming.org/Kindergarten_Bitboards
SISSY Bitboards 260.810387 180416 [1409kb] none no Michael Sherwin http://www.talkchess.com/forum3/viewtopic.php?f=7&t=73083
Magic BB - Fancy variable shift 292.180875 93376 [729kb] imul64 yes Pradu Kannan https://www.chessprogramming.org/Magic_Bitboards#Fancy
Magic BB - Plain 916.191392 295168 [2306kb] imul64 no Lasse Hansen https://www.chessprogramming.org/Magic_Bitboards#Plain
Black Magic BB - Fixed shift 1300.287079 88891 [694kb] imul64 no Onno Garms and Volker Annuss https://www.chessprogramming.org/Magic_Bitboards#Fixed_shift_Fancy
Pext constexpr 1643.976368 107904 [843kb] pext_u64 yes Zach Wegner https://www.chessprogramming.org/BMI2#PEXTBitboards
HyperCube 329.714714 107680 [841kb] none yes Daniel Inführ (dangi12012) http://www.talkchess.com/forum3/viewtopic.php?f=7&t=79004&p=916723&hilit=hypercube#p916723
If you have additional ideas or results please contact me. Now I will focus more on the CUDA side and I am currently creating one more algorithm that should be competitive!
Greetings - Daniel