fairy-stockfish / Fairy-Stockfish

chess variant engine supporting Xiangqi, Shogi, Janggi, Makruk, S-Chess, Crazyhouse, Bughouse, and many more
https://fairy-stockfish.github.io/
GNU General Public License v3.0
603 stars 189 forks source link

Opening book support #112

Open ianfab opened 4 years ago

ianfab commented 4 years ago

Open questions:

gaintpd commented 4 years ago

Hi ianfab, the binghe openbook format which is originally designed to be applied in Xiangqi, and this format can support all the variant board games that below the 16*16, and using the sqlite to store the openbook data. I think that we may find an universal solution based on this format. FYI, I have upload an text file that give an relative detailed specification about it. This specification is written in simple Chinese. You can translate it into English or your native language via the google online translator or other translator that you can reach. 局面HASHKEY计算.txt

ianfab commented 4 years ago

Thanks for the info. However, this feature has very low priority for me, since the responsibility for opening books should normally be on the GUI side, and having it in the engine would at best be a workaround for missing support in the GUI.

HGMuller commented 3 years ago

XBoard uses Polyglot format for variants, and furthermore supports creation and editing of such books. See the final section of http://hgm.nubati.net/book_format.html .

biennguyen13 commented 11 months ago

Hi ianfab, the binghe openbook format which is originally designed to be applied in Xiangqi, and this format can support all the variant board games that below the 16*16, and using the sqlite to store the openbook data. I think that we may find an universal solution based on this format. FYI, I have upload an text file that give an relative detailed specification about it. This specification is written in simple Chinese. You can translate it into English or your native language via the google online translator or other translator that you can reach. 局面HASHKEY计算.txt

Hi gaintpd. At first, thank you so much about the answer and your HASHKEY file. I'm researching about "hash key" in opening book (.obk - sqlite3 ) which created by hashing algorithm in Xiangqi. I read your file above, I think I understand how to get the "chess" in 棋子类型=>chess = FPiece14[piece]; . But, please forgive me, I can not get the "square" in 棋子=>square=Piece[FPiece[piece]]. What is "Piece" ? I did not see any where declared it. Could you explain to me how to get the "square"? Looking forward to your reply soon.

Thank you so much.