Horizontal+Mirroring

toc =Sample Position=
 * Home * Chess * Position * Horizontal Mirroring**
 * [[image:cheating-cheat-chess-mirror-best-demotivational-posters.jpg link="http://bestdemotivationalposters.com/delusion/"]] ||~ || **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 evaluation score, 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. ||
 * Mirroring ||~ ||^ ||

Horizontal Mirroring

 * ~ Original ||~ ||~ Horizontal Mirroring ||
 * [[image:http://webchess.freehostia.com/diag/chessdiag.php?fen=k7/8/NK2B3/8/8/8/8/8%20w%20-%20-&size=medium&coord=yes&cap=no&stm=yes&fb=no&theme=classic&color1=E3CEAA&color2=635147&color3=000000]] ||~ || [[image:http://webchess.freehostia.com/diag/chessdiag.php?fen=7k/8/3B2KN/8/8/8/8/8%20w%20-%20-&size=medium&coord=yes&cap=no&stm=yes&fb=no&theme=classic&color1=E3CEAA&color2=635147&color3=000000]] ||
 * k7/8/NK2B3/8/8/8/8/8 w - - ||~ || 7k/8/3B2KN/8/8/8/8/8 w - - ||

Flipping & Rotation
Vertical flipping and horizontal mirroring (or vice versa) results in [|rotation] by 180 degrees.
 * ~ Vertical Flipping ||~ ||~ 180° Rotation ||
 * [[image:http://webchess.freehostia.com/diag/chessdiag.php?fen=8/8/8/8/8/NK2B3/8/k7%20w%20-%20-&size=medium&coord=yes&cap=no&stm=yes&fb=no&theme=classic&color1=E3CEAA&color2=635147&color3=000000]] ||~ || [[image:http://webchess.freehostia.com/diag/chessdiag.php?fen=8/8/8/8/8/3B2KN/8/7k%20w%20-%20-&size=medium&coord=yes&cap=no&stm=yes&fb=no&theme=classic&color1=E3CEAA&color2=635147&color3=000000]] ||
 * 8/8/8/8/8/NK2B3/8/k7 w - - ||~ || 8/8/8/8/8/3B2KN/8/7k w - - ||

=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: code format="cpp" 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; } code

=See also=
 * Color Flipping
 * Diagonal Mirroring
 * Flipping, Mirroring and Rotating of Bitboards
 * Vertical Flipping

=External Links=
 * [|Mirror from Wikipedia]
 * [|Mirroring (psychology) from Wikipedia]
 * [|Reflection (mathematics) from Wikipedia]
 * [|Reflection (physics) from Wikipedia]
 * [|Reflection symmetry from Wikipedia]
 * [|Venus effect from Wikipedia]
 * [|Why do Mirrors Reverse Left and Right?]

=References= =What links here?= include page="Horizontal Mirroring" component="backlinks" limit="40"
 * Up one Level**