Changes

Jump to: navigation, search

Diagonal Mirroring

2,080 bytes added, 18:29, 10 May 2018
Created page with "'''Home * Chess * Position * Diagonal Mirroring''' '''Diagonal mirroring''' mirrors all pieces along the Diagonals|main diag..."
'''[[Main Page|Home]] * [[Chess]] * [[Chess Position|Position]] * Diagonal Mirroring'''

'''Diagonal mirroring''' mirrors all [[Pieces|pieces]] along the [[Diagonals|main diagonal]] or [[Anti-Diagonals|main anti-diagonal]]. It is applicable in pawn-less [[Endgame|endgames]] with [[Castling|castling]] no longer possible. Along with [[Horizontal Mirroring|horizontal]] and/or [[Vertical Flipping|vertical flipping]], diagonal mirroring is used in pawn-less [[Endgame Tablebases|endgame tablebases]] to restrict a white king to the 10 squares of the a1-d4-d1 triangle of the board.

=Sample Position=
{|
|-
! Original
! Diagonal Mirror
! Anti-Diagonal Mirror
|-
| <fentt border="double" style="font-size:24pt">k7/8/NK2B3/8/8/8/8/8</fentt>
| <fentt border="double" style="font-size:24pt">8/8/8/5B2/8/8/5K2/5N1k</fentt>
| <fentt border="double" style="font-size:24pt">k1N5/2K5/8/8/2B5/8/8/8</fentt>
|-
| k7/8/NK2B3/8/8/8/8/8 w - -
| 8/8/8/5B2/8/8/5K2/5N1k w - -
| k1N5/2K5/8/8/2B5/8/8/8 w - -
|}

=Mirroring an 8x8 Board=
An [[8x8 Board]] with a [[Squares|rank-file mapping]] needs to swap [[Ranks|rank]] and [[Files|file]]. A pure 8x8 Board may be mirrored along the main diagonal that way in [[C]]:
<pre>
int board[64], f, r, sm, sq, s;

for (f = 1; f < 8; ++f)
for (r = 0; r < f; ++r)
{
sq = 8*r + f;
sm = 8*f + r;
s = board[sq];
board[sq] = board[sm];
board[sm] = s;
}
</pre>

=See also=
* [[Color Flipping]]
* [[Flipping Mirroring and Rotating|Flipping, Mirroring and Rotating]] of [[Bitboards]]
* [[Horizontal Mirroring]]
* [[Vertical Flipping]]

=External Links=
* [https://en.wikipedia.org/wiki/Mirror Mirror from Wikipedia]
* [https://en.wikipedia.org/wiki/Mirroring_%28psychology%29 Mirroring (psychology) from Wikipedia]
* [https://en.wikipedia.org/wiki/Reflection_%28mathematics%29 Reflection (mathematics) from Wikipedia]
* [https://en.wikipedia.org/wiki/Reflection_%28physics%29 Reflection (physics) from Wikipedia]
* [https://en.wikipedia.org/wiki/Reflection_symmetry Reflection symmetry from Wikipedia]

'''[[Chess Position|Up one Level]]'''

Navigation menu