Implement symmetrized books
authorH.G.Muller <hgm@hgm-xboard.(none)>
Mon, 4 Jul 2022 18:43:59 +0000 (20:43 +0200)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Mon, 4 Jul 2022 18:43:59 +0000 (20:43 +0200)
commitae7f38b8bb36cff8d113e77640e7cbb127e345be
treec2f97098746c32b83858a7cf0969cf6ce2408fe8
parentd90809bc236c175c2202b0b24dd40c1c81c9f93d
Implement symmetrized books

Variants with a symmetric setup, (such as Xiangqi and Janggi) only need
to store half the positions. This is now implemented for books with
a filename *-sym.bin. For each position a 'canonical representation'
is defined, which is either the position itself or its mirror image,
depending on the first left-right difference. The book is then probed
for the cannonical representation, and the retreived moves are flipped
to the original representation when needed.
book.c