HN 日本語サマリー

← 一覧へ戻る
科学・技術

astraにプレイ可能な4Dチェスを作らせた

I asked astra to make playable 4D chess (4d-chess.pages.dev)

21 pointsby mikiyas9 コメント

要約

この記事は、4次元チェスの概念と、それをウェブ上でプレイ可能にする方法について解説しています。4次元チェスは、通常の3次元チェスに時間軸(W軸)を加えたもので、移動ルールやチェックメイトの概念が拡張されています。記事では、4次元空間の投影図や、各駒の移動ルールが詳細に説明されており、実際にブラウザ上でプレイできるデモへのリンクも提供されています。

全文翻訳

White to move Undo New game Retry computer Z = 0 Z = 1 Clear Tesseract projection Reset view Four-dimensional board projected into 3D W = 0 is the inner cube. W = 1 is the outer cube. How to play, from 3D to 4D Back to game ↑ The goal is still checkmate. White moves first. Select a piece, then a marked square. A solid dot is an empty destination; a ring marks a capture. In computer mode, choose White or Black using the side selector. 1. Give your 3D board one more coordinate Think of a 3D chessboard as layers of ordinary boards. X and Y locate a square within a layer; Z chooses the layer. Here, each 3D board has two 4 × 4 layers. Now make a second copy of that whole 3D board. W chooses which copy you are in. Every square has a corresponding square in the other copy. A move along W changes copies while keeping X, Y, and Z the same. In the tesseract view, W = 0 is the inner cube and W = 1 is the outer cube. Both represent equally sized spaces. The inner cube looks smaller because of the projection. W is another spatial direction; it does not mean time. The four coordinates on your screen Axis Where it takes you X Across a board, files a to d. Y Up a board, ranks 1 to 4. Z Between the left and right boards in the same row. W Between the bottom and top boards in the same column. a1 [0,1] means file a, rank 1, Z = 0, W = 1. That is a1 on the top-left board. 2. Compare a move in 3D and 4D Choose a piece, then play or scrub through its move. These cleared-board examples use this game's rules. Other 3D chess variants may define their pieces differently. Rook Bishop Knight Queen King Pawn 4D example Legal move Common mistake Reset views In one 3D board In the 4D tesseract Play move Move progress Before Drag either drawing to rotate both. You can also focus a drawing and use the arrow keys. Home resets the views. Same 4D move on the flat boards These diagrams illustrate movement. In your game, pieces along a sliding path block it, and every move must keep your king safe. 3. Count the coordinates that change Judge a move by its coordinates. A W move can look diagonal in the drawing and still count as a straight rook move. Rotating the view changes how a move looks, not whether it is legal. Movement rules for all six pieces Piece Movement in this game Watch for Rook Change exactly one coordinate by any distance. Changing W and Z together is a diagonal, so a rook cannot do it. Bishop Change exactly two coordinates by equal distances. X + W or Z + W works. X + Y + W changes three axes and does not. Knight Change one coordinate by two and a different coordinate by one. Jump over pieces. The two-step part must use X or Y. Z and W have only two positions. Queen Change any nonempty combination of coordinates by equal distances. One step on all four axes is legal. Two on X and one on W is not. King Change any nonempty combination of coordinates by one step. Every destination must be safe, including threats from another cube. Pawn Advance one empty square along Y. Capture one Y step forward plus one step along exactly one of X, Z, or W. White advances toward rank 4; Black toward rank 1. Reaching that rank automatically makes a queen. Any bishop or queen move involving Z or W is at most one step long on this board. Those axes only run from 0 to 1. X and Y each have four positions. 4. Look for threats across W A king can be in check from a piece in the other cube. For example, a rook at a1 [0,0] attacks a king at a1 [0,1] along W. Distance on the screen gives you no protection. You may capture the attacker, block a longer sliding attack, or move the king, provided the resulting position is safe. A one-step W attack has no intermediate square to block. Checkmate means your king is attacked and no legal reply escapes it. Two lines crossing in the projection do not necessarily share a square. A piece blocks a sliding move only when its full X, Y, Z, W position lies on the path. Knights jump. Your first W move From the starting position, choose White's rook on a1 in the bottom-left board. Select a1 in the top-left board. The rook goes from a1 [0,0] to a1 [0,1]. Only W changes. In the tesseract, that is a move from the inner cube to its matching point on the outer cube. The rook is still moving along just one axis. Try it on the board ↑ Setup, special moves, and draws Each side starts with a king, queen, two rooks, a bishop, a knight, and four pawns. There is no castling, en passant, or opening pawn double move. The game draws on stalemate, the third occurrence of the same position with the same side to move, 100 turns without a pawn move or capture, or two bare kings. The king is never captured.