Sashité for Developers
  1. Sashité for Developers
  2. Rules
  3. Ōgi

Ōgi

Rule System for Ōgi (王棋) built on the Game Protocol.

Ōgi is a two-player abstract strategy game derived from shōgi, played on an 8×8 board with the shōgi army — lances, knights, silver generals, a gold general, a bishop, a rook and eight fu — directional, reversible pieces that promote in the opponent’s camp, captures kept in hand, and drops. Its single Gold General promotes, as in maka dai dai shōgi, to the Free Gold: a Rook that also slides diagonally forward. There is no castling and no double step.


1. Board

8×8 grid encoded in CELL.

Valid coordinates: a1–h8

FEEN serialization: rank 8 → rank 1, file a → file h, / between ranks.


2. Style

Style SIN Side
Japanese J first (Sente 先手)
Japanese j second (Gote 後手)

3. Pieces

All pieces encoded in EPIN. Both sides use the same character for a given piece (shōgi convention — armies are told apart by orientation); the abbreviations are Sashité’s. Each player starts with 18 pieces.

EPIN Name Character Qty Promoted form
K^ King 王 / 玉 1 —
-K^ King     Currently in check (transient marker)
G Gold General 金 1 +G Free Gold (奔), the Gold-General pattern at full range
R Rook 飛 1 +R Dragon (龍)
B Bishop 角 1 +B Horse (馬)
S Silver General 銀 2 +S Promoted Silver (全), Gold-General movement
N Knight 桂 2 +N Promoted Knight (圭), Gold-General movement
L Lance 香 2 +L Promoted Lance (杏), Gold-General movement
F Fu 歩 8 +F Tokin (と), Gold-General movement

Gote uses the same tokens in lowercase. Every promoted form carries the + prefix of EPIN’s enhanced state, as in the shōgi EPIN catalogue (which has no +G: the shōgi Gold General does not promote); with neither double step nor castling, no other + board state exists in Ōgi, and the prefix is unambiguous. The - prefix marks the King in check and nothing else.

Jeweled General (玉): in Ōgi vs Ōgi, the 玉 glyph is rendered for the lower-rated player (Sente if ratings tie), so that only one 王 stands on the board; it is never used when Ōgi faces another tradition. Purely cosmetic display metadata: the EPIN derivation marker K^' / k^' may optionally carry it (a composed puzzle marks the defender’s royal this way), but a canonical position writes both Kings K^ — serialization to canonical FEEN converts a Jeweled General back into a King.

Capture mutation — two rules, in order:

  1. Demotion: a captured promoted piece reverts to its unpromoted form — the + prefix is stripped (+f → f, +g → g, +r → r, +b → b, +s → s, +n → n, +l → l).
  2. Side flip: the case flips unconditionally — the piece adopts the capturing player’s camp (f → F, r → R, g → G). This is the rule of Ōgi against Ōgi; cross-variant captures follow the Sanki pairing rules.

Both change the piece’s identity, so the PMN of the capturing move carries the captured piece as it enters the hand (/F, /R — §6).

Every captured piece therefore sits in the capturer’s own camp, unpromoted, and is droppable in principle. A promoted piece is never in hand.


4. Initial Position

Encoded in FEEN:

lnsgk^snl/1r4b1/ffffffff/8/8/FFFFFFFF/1B4R1/LNSGK^SNL / J/j

Each army stands on three ranks. On the first rank, from each edge toward the centre: Lance, Knight, Silver General, then the Gold General on the d-file and the King on the e-file — the same two files for both players, as the Queen and the King in chess. The Bishop stands on each player’s left and the Rook on each player’s right, as in shōgi (Bishop b2 and Rook g2 for Sente; Rook b7 and Bishop g7 for Gote). The eight Fu form the third rank. Ranks 4 and 5 are empty. No token carries a state prefix. In the Sanki cross-variant pairings, the Gold General starts promoted, as the Free Gold (+G).


5. Movements

All pseudo-legal moves encoded in GGN. Patterns shown are representative. “Forward” is toward the opponent’s side; no piece jumps over another, except the Knight.

5.1 King

One square in any of the 8 directions. Cannot promote.

5.2 Gold General

One square orthogonally (all 4) or diagonally forward (2) — 6 destinations, the shōgi Gold General’s pattern. Never diagonally backward. Promotes to the Free Gold (+G, §5.10), and is never forced to.

5.3 Rook

Any number of squares orthogonally. Path must be clear. Promotes to the Dragon (+R): the Rook’s slide plus one square in any of the 4 diagonal directions.

5.4 Bishop

Any number of squares diagonally. Path must be clear. Promotes to the Horse (+B): the Bishop’s slide plus one square in any of the 4 orthogonal directions.

5.5 Silver General

One square straight forward, or one square on any of the 4 diagonals — 5 destinations. Never straight backward or sideways. Promotes to the Gold-General movement (+S).

5.6 Knight

{
  "J:N": {
    "e4": {
      "d6": [{ "must": { "d6": "empty" } }, { "must": { "d6": "enemy" } }],
      "f6": [{ "must": { "f6": "empty" } }, { "must": { "f6": "enemy" } }]
    }
  }
}

Two squares forward and one sideways — 2 destinations at most — jumping over anything. Never backward or sideways: the shōgi Knight, not the Western chess Knight. Promotes to the Gold-General movement (+N).

5.7 Lance

Any number of squares straight forward along its file. Path must be clear; never backward or sideways. Promotes to the Gold-General movement (+L).

5.8 Fu

{
  "J:F": {
    "e3": {
      "e4": [{ "must": { "e4": "empty" } }, { "must": { "e4": "enemy" } }]
    }
  }
}

Moves and captures one square straight forward — there is no diagonal capture and no double step. Promotes to the Tokin (+F).

5.9 The Gold-General movement (+F, +S, +N, +L)

The Tokin, the Promoted Silver, the Promoted Knight and the Promoted Lance all move alike: one square orthogonally (all 4) or diagonally forward (2) — 6 destinations, the shōgi Gold General’s pattern. None promotes further.

5.10 Free Gold (+G)

{
  "J:+G": {
    "d4": {
      "d7": [
        { "must": { "d5": "empty", "d6": "empty", "d7": "empty" } },
        { "must": { "d5": "empty", "d6": "empty", "d7": "enemy" } }
      ],
      "f6": [
        { "must": { "e5": "empty", "f6": "empty" } },
        { "must": { "e5": "empty", "f6": "enemy" } }
      ],
      "c5": [{ "must": { "c5": "empty" } }, { "must": { "c5": "enemy" } }]
    }
  }
}

Slides any number of squares in six directions: along its rank or file in either direction (the Rook’s four orthogonals) and along the two forward diagonals. Never diagonally backward. Path must be clear. The Gold General’s pattern extended to full range — the Free Gold of maka dai dai shōgi; its character, on the reverse of the Gold General, is 奔. It cannot promote further.

5.11 Drops

Instead of moving, a player may drop a piece from hand onto an empty square.

The unified drop rule: a piece is droppable iff its EPIN side (case) matches the dropping player’s side. With the capture-time side flip, every piece in hand qualifies in principle.

No-future-move restriction — a piece cannot be dropped where it would have no legal move:

  1. a Fu or a Lance on the dropping player’s last rank (rank 8 for Sente, rank 1 for Gote);
  2. a Knight on the dropping player’s last two ranks (7 and 8 for Sente, 2 and 1 for Gote).

Fu restrictions — a Fu drop is also illegal when:

  1. Nifu (二歩) — the dropping player already has an unpromoted Fu on that file (a Tokin does not count).
  2. Uchifuzume (打ち歩詰め) — the drop would deliver checkmate (check by Fu drop is allowed; only mate is forbidden; mate by the drop of any other piece is allowed).

Drop mechanics: a drop never captures and never promotes — the piece enters in its hand form, always unpromoted, even inside the promotion zone, and may promote by a later move of its own.


6. Special Move Notation

Encoded in PMN.

Move PMN Description
Promotion c6-c7=+F Fu c6→c7 enters the zone and promotes to a Tokin (the mover’s choice)
Promotion of a Rook g2-g6=+R Rook g2→g6 enters the zone and promotes to a Dragon
Move without promotion c6-c7 The same Fu move, the mover declining to promote
Drop F*e4 Fu from hand placed on e4 (*e4 when the piece is implied by context)
Capture g2+g7/B Rook captures Gote’s Bishop, which enters Sente’s hand as B (side flip, §3)
Capture of a promoted piece d4+e5/F The captured Tokin demotes and flips: it enters the hand as a Fu

The / suffix carries the captured piece as it enters the hand (§3); Ōgi’s side flip means every capture carries one. There is no castling move.


7. Termination

Status values from CGSN with game-specific interpretation. A game has exactly one of three results — 1–0, ½–½, or 0–1; there are no partial results.

7.1 Decisive

CGSN Status Result
checkmate The player to move is in check with no legal escape — they lose
resignation Resigning player loses

7.2 Draw

CGSN Status Condition
nomove The player to move has no pseudo-legal move or drop at all — the pseudo-legal set (GGN) is empty. Tested before checkmate and stalemate, and takes precedence even if the King is in check (CGSN §9.1)
stalemate No legal move or drop available, not in check. A deliberate departure from shōgi (where no-move loses), aligned on FIDE
insufficient Never triggers in pure Ōgi — captures never remove material from play (board + hands hold 2 Kings and 34 pieces, invariantly), so no materially dead configuration is reachable and the engine performs no detection; a fully blocked position ends by repetition or movelimit
repetition The same canonical position occurs a third time (see §8.4). Follows FIDE, not shōgi’s fourfold sennichite; perpetual check remains a defender’s draw
movelimit 50 full moves by each player (100 half-moves, drops included) with no capture and no board move of an unpromoted Fu. A drop — even a Fu drop — counts as a half-move but never resets the counter: it neither captures nor moves a Fu already on the board
agreement Mutual agreement

Illegal moves are not a termination cause: a rejected move is simply refused — the player keeps the turn. Time controls are out of scope of this rule system.


8. Constraints

8.1 Check constraint

A move or drop is illegal if it leaves the active player’s King in check. A King in check carries the transient -K^ marker.

8.2 Promotion zone

Sente’s zone is ranks 6, 7 and 8; Gote’s is ranks 3, 2 and 1 — the three ranks where the opponent’s army stands at the start.

8.3 Promotion

A board move whose origin or destination lies in the mover’s zone — entering it, moving within it, or leaving it — may promote the moved piece: the mover chooses, and the choice is part of the move (=+F in PMN, or nothing). Promotion is mandatory where the unpromoted piece would have no further move: a Fu or a Lance reaching the last rank, a Knight reaching either of the last two ranks. The King never promotes, and the Gold General is never forced to; a promoted piece never promotes again; drops never promote.

8.4 Position identity (threefold repetition)

Two positions are the same iff their canonical FEEN strings are equal: same squares and piece state (the + promotions and -K^ included), same hand contents for each player, same player to move.

8.5 Uchifuzume look-ahead

The one drop restriction needing look-ahead: simulate the candidate Fu drop, then test whether the opponent has any legal reply; if none and their King is in check, the drop is illegal. Nifu and the no-future-move rule are local board checks.


9. Reference


10. License

The rules of Ōgi are in the public domain (CC0 1.0). This specification of their encoding is published under Open Web Foundation Agreement 1.0 (OWFa 1.0) — OWFa 1.0.