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 directional pieces, captures kept in hand, and drops. It also adopts castling — kingside and queenside — exactly as in the Chess specification.


1. Board

8×8 grid encoded in CELL.

Valid coordinates: a1h8

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.

EPIN Name Character State / notes
K^ King 王 / 玉 Royal piece, not in check
-K^ King   Currently in check (transient)
I Princess Bishop + Knight compound; no promoted form
+R Rook Castling immediately performable
-R Rook   Castling right retained but temporarily blocked
R Rook   No castling rights (moved, or dropped from hand)
B Bishop  
N Knight  
+F Fu On its starting rank, eligible for the double step
-F Fu   Reserved in the vocabulary; never set in Ōgi — Fu capture straight forward, so en passant cannot arise
F Fu   Has moved or was dropped; no double step
T Tokin Promoted Fu — Gold-General movement. A dedicated letter, not a +F prefix, to avoid ambiguity with double-step eligibility

Gote uses the same tokens in lowercase.

Jeweled King: in Ōgi vs Ōgi, the 玉 glyph is rendered for the lower-rated player (Sente if ratings tie). Purely cosmetic display metadata — both Kings share the token K^ and the canonical position is unaffected.

Capture mutation — two rules, in order:

  1. Demotion: a captured Tokin demotes to a Fu (tf).
  2. Side flip: the case flips unconditionally — the piece adopts the capturing player’s camp (fF, rR).

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).

Hand canonicalization: a piece in hand never carries a +/- marker (+ff, -rr before the flip). This is a recomposition of the position, not a mutation of the capture, and is never a reason for a PMN suffix by itself.

Every captured piece therefore sits in the capturer’s own camp, unpromoted, and is droppable in principle. There is no way to hold a Tokin in hand.


4. Initial Position

Encoded in FEEN:

-rnbik^bn-r/+f+f+f+f+f+f+f+f/8/8/8/8/+F+F+F+F+F+F+F+F/-RNBIK^BN-R / J/j

Rooks on the a/h files, Knights b/g, Bishops c/f, the Princess on d, the King on e, Fu across rank 2 — the same file layout for both armies. Every Fu starts +F (double-step eligible); both Rooks start -R (castling right retained, temporarily blocked by the occupied home rank).


5. Movements

All pseudo-legal moves encoded in GGN. Patterns shown are representative.

5.1 King

One square in any of the 8 directions. Cannot promote. When the King moves, every Rook that could castle with it (+R/-R) becomes R. See §5.8 for castling.

5.2 Princess

{
  "J:I": {
    "d4": {
      "g7": [
        { "must": { "e5": "empty", "f6": "empty", "g7": "empty" } },
        { "must": { "e5": "empty", "f6": "empty", "g7": "enemy" } }
      ],
      "e6": [{ "must": { "e6": "empty" } }, { "must": { "e6": "enemy" } }],
      "c6": [{ "must": { "c6": "empty" } }, { "must": { "c6": "enemy" } }]
    }
  }
}

Bishop + Knight compound: slides any number of squares diagonally (blockable), and jumps in all 8 L-shape directions (over anything). No orthogonal slide — that is the Rook’s domain. No promoted form.

5.3 Rook

Any number of squares orthogonally. Path must be clear. No promoted form. Participates in castling; state mutation on move: +R/-RR.

5.4 Bishop

Any number of squares diagonally. Path must be clear. No promoted form.

5.5 Knight

L-shape, all 8 directions, jumps — the Western chess Knight, not the forward-only shōgi knight. No promoted form.

5.6 Fu

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

Moves and captures one square straight forward — there is no diagonal capture. The double step (two squares forward, both empty, never a capture) requires the +F token: stripped on the Fu’s first move, never regained — a captured-then-dropped Fu does not recover it.

5.7 Tokin

One square orthogonally (all 4) or diagonally forward (2) — the shōgi Gold-General pattern, 6 destinations. Cannot promote further.

5.8 Castling

Identical mechanics to Chess §5.7: King two squares toward a +R Rook (e1~g1 / e1~c1 for Sente, mirrored on rank 8 for Gote), Rook lands on the crossed square, conditions 1–6 as in FIDE. A castling is a move, not a drop. Drops interact only through the conditions: an opponent may drop a piece between King and Rook (blocking the path) or one that attacks a transit square — the Rook shows -R until the condition clears.

5.9 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.

Fu restrictions — a Fu drop is illegal when:

  1. Last rank — the Fu would sit where it has no legal move (rank 8 for Sente, rank 1 for Gote).
  2. Nifu (二歩) — the dropping player already has an unpromoted Fu on that file (a Tokin does not count).
  3. Uchifuzume (打ち歩詰め) — the drop would deliver checkmate (check by Fu drop is allowed; only mate is forbidden).

Drop mechanics: a drop never captures, never promotes, and never confers state — a dropped Fu is plain F (no double step), a dropped Rook is plain R (a drop never creates a castling right, even onto a home-rank corner). No other piece is constrained by the no-future-move rule on an 8×8 board.


6. Special Move Notation

Encoded in PMN.

Move PMN Description
Kingside castling (Sente) e1~g1 King e1→g1, Rook h1→f1
Queenside castling (Sente) e1~c1 King e1→c1, Rook a1→d1
Kingside castling (Gote) e8~g8 King e8→g8, Rook h8→f8
Queenside castling (Gote) e8~c8 King e8→c8, Rook a8→d8
Promotion e7-e8=T Fu e7→e8, promotes to Tokin (automatic — sole form)
Drop F*e4 Fu from hand placed on e4 (*e4 when the piece is implied by context)
Capture d4+e5/R Rook captures a Gote rook, which enters Sente’s hand as R (side flip, §3)
Capture of a Tokin d4+e5/F The captured Tokin demotes and flips: it enters the hand as a Fu

PMN writes the tokens as they stand at the moment of the move; the transient +/- markers are recomposed afterwards and never appear in a move. The / suffix carries the captured piece as it enters the hand (§3); Ōgi’s side flip means every capture of an Ōgi piece carries one.


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 30 pieces, invariantly), so no materially dead configuration is reachable and the engine performs no detection
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 with no capture and no unpromoted Fu move. A drop — even a Fu drop — is not a move and does not reset the counter
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 Castling constraints

As in Chess: illegal if the King is in check, passes through, or lands on an attacked square. +R/-R encode executability; only an original Rook on its original corner ever castles — never a dropped one.

8.3 Promotion

Mandatory and automatic when a Fu ends a move on the last rank: it becomes a Tokin (T), the sole promoted form — no prompt, no choice. No other piece promotes; 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 (+F, T, +R/-R, -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 last-rank are local board checks.


9. Reference


10. License

Open Web Foundation Agreement 1.0 (OWFa 1.0) — OWFa 1.0