Tuesday, July 06, 2021

[drjklkte] chess quadtree

identify a square on an 8x8 chessboard by coordinates 111 through 444.  each digit represents a quadrant in a recursive quadtree.  number the quadrants as done in trigonometry and Cartesian coordinate geometry.

unspecified: which color is on top and bottom.

first coordinate:
2 1
3 4

second coordinate:
2 1 2 1
3 4 3 4
2 1 2 1
3 4 3 4

third coordinate:
2 1 2 1 2 1 2 1
3 4 3 4 3 4 3 4
2 1 2 1 2 1 2 1
3 4 3 4 3 4 3 4
2 1 2 1 2 1 2 1
3 4 3 4 3 4 3 4
2 1 2 1 2 1 2 1
3 4 3 4 3 4 3 4

not sure what this might be useful for.  does not cleanly generalize to board sizes not a power of 2.  difficult to refer to ranks and files, two important chess concepts.  (tangentially, neither algebraic notation nor descriptive notation have easy ways to name diagonals, also important in chess.)  does not preserve chess symmetries.

slight improvement: outermost quadrant (first coordinate) numbered normally but inner quadrant numbering flipped or rotated to capture the symmetries of chess.  (previously, inspired by descriptive notation.)  1st quadrant keeps its numbering, an arbitrary choice.  center squares are x33, kings start on {1,4}22, etc.

2 1
3 4

1 2 2 1
4 3 3 4
4 3 3 4
1 2 2 1

1 2 1 2 2 1 2 1
4 3 4 3 3 4 3 4
1 2 1 2 2 1 2 1
4 3 4 3 3 4 3 4
4 3 4 3 3 4 3 4
1 2 1 2 2 1 2 1
4 3 4 3 3 4 3 4
1 2 1 2 2 1 2 1

crazier ideas:

keep rotating quadrant numbering recursively.  1st quadrant not rotated (arbitrary choice).  8x8 ends up being 4 translated copies of 4x4 because 4x4 has 90 degree rotational symmetry.  similar things happen if 2nd, 3rd, or 4th quadrants preserved.

perhaps useful for some 4-player chess variants with 90 degree rotational symmetry.

2 1
3 4

1 4 2 1
2 3 3 4
4 3 3 2
1 2 4 1

1 4 2 1 1 4 2 1
2 3 3 4 2 3 3 4
4 3 3 2 4 3 3 2
1 2 4 1 1 2 4 1
1 4 2 1 1 4 2 1
2 3 3 4 2 3 3 4
4 3 3 2 4 3 3 2
1 2 4 1 1 2 4 1

Hilbert curve:

2 1
3 4

2 1 4 1
3 4 3 2
2 1 2 3
3 4 1 4

2 1 4 1 4 3 2 1
3 4 3 2 1 2 3 4
2 1 2 3 4 1 4 1
3 4 1 4 3 2 3 2
2 1 4 1 2 3 2 3
3 4 3 2 1 4 1 4
2 1 2 3 4 3 2 1
3 4 1 4 1 2 3 4

No comments :