Changes

Jump to: navigation, search

Titboards

259 bytes added, Yesterday at 13:35
Added a reference to new titboard engine (TDFA), as well as some new data on speed comparison between titboards and magic bitboards. Clarified the explanation for why titboards are not commonly used.
'''Titboards''',<br/>
a bitboard-based [[Move Generation|move generation]] technique invented by [[Zach Wegner]] <ref>[http://www.open-aurec.com/wbforum/viewtopic.php?f=4&t=5623&p=27838 Yet another new bitboard move generation method] by [[Zach Wegner]], [[Computer Chess Forums|Winboard Forum]], September 22, 2006</ref> and first implemented by Malik Tremain <ref name="TDFA">[https://github.com/TiltedDFA/TDFA TDFA - Titboard Engine] by Malik Tremain, January 22, 2024</ref>. Titboards are based on an extension of bitboards to ternary boards, hence the name ("bit" means binary digit, "tit" mean [https://en.wikipedia.org/wiki/Ternary_numeral_system ternary digit]). Titboards are only used for move generation, not for any other purposes that typical bitboard attack-getters will be used for.
The idea of titboards is to eliminate [[BitScan|bitscans]]. Typical bitboard move generation techniques generate a bitboard, intersect it with the set of allowable [[Squares|squares]] (empty or enemy-occupied), and then [[Bitboard Serialization|serialize]] that into a list of moves. Titboards take a bitboard occupancy for each side for just one rank, file, or diagonal, and convert them to ternary representations and add them together. This index can determine which squares can actually be moved to, instead of just attacked. It is used in a lookup table of 3^7=2187 entries per [[Direction|direction]] per square.
Titboards are not typically used (there is no one known engine that implements them<ref name="TDFA"/>). The reasons behind this This is because they are that they use currently slower than modern alternatives while being harder to implement. They require a large amount of memory look-up table (more than ~8.9 MB) and they work very differently from modern generation techniques likes [[Magic Bitboards]]), and where they require each direction to be calculated individually {File, Rank, Diagonal, Anti-Diagonal}. For each direction they must keep another attack generation method beside require the input of (square, us, them due ), as a pose to their inflexibility. Modern cpus also have built-in bitscan instructions(square, further obsoleting ternary boardsoccupied) which is more commonly used.
=Speed=
Testing shows that titboards have no speed advantage over magic bitboardson modern hardware, however, the gap seemingly narrows on older CPUs that offer less efficient bitscan operations. A full array of results can be found here<ref>[https://github.com/TiltedDFA/TDFA/blob/3c4110f860f9c98b619a3f2565d139c92fe606c8/RunResults.txt TDFA - Perft result comparison]</ref>.
<pre>
Titboard perft group:
Run 1 completed with 18652876 nps.Run 2 completed with 19684211 nps.Run 3 completed with 36981116 nps.Run 4 completed with 19180560 nps.Run 5 completed with 19103484 nps.Run 6 completed with 20140754 nps.All tests completed with means mean nps: 22290500
Pext perft group:
Run 1 completed with 39392460 nps.Run 2 completed with 40452566 nps.Run 3 completed with 48139295 nps.Run 4 completed with 38508901 nps.Run 5 completed with 36894349 nps.Run 6 completed with 40414558 nps.All tests completed with means mean nps: 40633688
Magic Bitboard perft group:
Run 1 All tests completed with 36586293 mean nps.: 37989088Run 2 completed with 37227627 nps.</pre>Run 3 completed with 45869401 nps.Run 4 completed with 35909201 nps.<pre>Run CPU: Ryzen 5 5600xTitboard perft group:All tests completed with 35063617 mean nps.: 21250050 Pext perft group:Run 6 All tests completed with 37278392 mean nps.: 36773955 Magic Bitboard perft group:All tests completed with means mean nps: 3798908834421651
</pre>
2
edits

Navigation menu