Horizontal Mirroring mirrors all pieces along the vertical axis between the D- and E-File. Applicable if both sides have lost their castling rights, horizontal mirroring should result in equal static evaluationscore, but not necessarily equal search result if pieces and squares are traversed in different order. Along with vertical flipping and/or diagonal mirroring, horizontal mirroring is used in pawn-less endgame tablebases to restrict a white king to the 10 squares of the a1-d4-d1 triangle of the board.
An 8x8 Board with a rank-file mapping needs to perform an exclusive or with 7 (h1 in LERF) to horizontally mirror square coordinates. A pure 8x8 Board may be mirrored that way in C:
int board[64], sq, s;for(sq =0; sq <64; sq +=++sq &4){
s = board[sq];
board[sq]= board[sq^7];
board[sq^7]= s;}
Table of Contents
Sample Position
Horizontal Mirroring
Flipping & Rotation
Vertical flipping and horizontal mirroring (or vice versa) results in rotation by 180 degrees.Mirroring an 8x8 Board
An 8x8 Board with a rank-file mapping needs to perform an exclusive or with 7 (h1 in LERF) to horizontally mirror square coordinates. A pure 8x8 Board may be mirrored that way in C:See also
External Links
References
What links here?
Up one Level