Ōgi
Rule System for Ōgi (王棋) built on the Game Protocol.
1. Board
8×8 grid encoded in CELL.
Valid coordinates: a1–h8
FEEN serialization: rank 8 → rank 1, file a → file h, / between ranks.
Promotion zones:
- First (Sente): ranks 6, 7, 8
- Second (Gote): ranks 1, 2, 3
2. Style
| SNN | SIN | Side |
|---|---|---|
Ogi |
O |
first (Sente) |
Ogi |
o |
second (Gote) |
3. Pieces
All pieces encoded in PIN.
| PIN | Name | Notes |
|---|---|---|
K^ |
King | Terminal, non-promotable |
I |
Princess | Bishop + full Knight |
+I |
Promoted Princess | Princess + one square orthogonally |
R |
Rook | |
+R |
Promoted Rook | Rook + one square diagonally |
B |
Bishop | |
+B |
Promoted Bishop | Bishop + one square orthogonally |
S |
Silver General | |
+S |
Promoted Silver | |
N |
Knight | Forward L-shape only |
+N |
Promoted Knight | Moves as Promoted Silver |
L |
Lance | Forward only |
+L |
Promoted Lance | Moves as Promoted Silver |
P |
Pawn | |
+P |
Promoted Pawn | Moves as Promoted Silver |
k^ |
King | Terminal, non-promotable |
i |
Princess | |
+i |
Promoted Princess | |
r |
Rook | |
+r |
Promoted Rook | |
b |
Bishop | |
+b |
Promoted Bishop | |
s |
Silver General | |
+s |
Promoted Silver | |
n |
Knight | |
+n |
Promoted Knight | |
l |
Lance | |
+l |
Promoted Lance | |
p |
Pawn | |
+p |
Promoted Pawn |
4. Initial Position
Encoded in FEEN:
lnsik^snl/1r4b1/pppppppp/8/8/PPPPPPPP/1B4R1/LNSIK^SNL / O/o
5. Movements
All pseudo-legal moves encoded in GGN. Patterns shown are representative.
5.1 King
{
"O:K^": {
"e4": {
"d3": [{ "must": { "d3": "empty" } }, { "must": { "d3": "enemy" } }],
"d4": [{ "must": { "d4": "empty" } }, { "must": { "d4": "enemy" } }],
"d5": [{ "must": { "d5": "empty" } }, { "must": { "d5": "enemy" } }],
"e3": [{ "must": { "e3": "empty" } }, { "must": { "e3": "enemy" } }],
"e5": [{ "must": { "e5": "empty" } }, { "must": { "e5": "enemy" } }],
"f3": [{ "must": { "f3": "empty" } }, { "must": { "f3": "enemy" } }],
"f4": [{ "must": { "f4": "empty" } }, { "must": { "f4": "enemy" } }],
"f5": [{ "must": { "f5": "empty" } }, { "must": { "f5": "enemy" } }]
}
}
}
One square in any direction. Non-promotable.
5.2 Princess
{
"O:I": {
"d4": {
"b2": [{ "must": { "c3": "empty", "b2": "empty" } }, { "must": { "c3": "empty", "b2": "enemy" } }],
"c2": [{ "must": { "c2": "empty" } }, { "must": { "c2": "enemy" } }],
"e2": [{ "must": { "e2": "empty" } }, { "must": { "e2": "enemy" } }],
"b3": [{ "must": { "b3": "empty" } }, { "must": { "b3": "enemy" } }],
"f3": [{ "must": { "f3": "empty" } }, { "must": { "f3": "enemy" } }],
"b5": [{ "must": { "b5": "empty" } }, { "must": { "b5": "enemy" } }],
"f5": [{ "must": { "f5": "empty" } }, { "must": { "f5": "enemy" } }],
"c6": [{ "must": { "c6": "empty" } }, { "must": { "c6": "enemy" } }],
"e6": [{ "must": { "e6": "empty" } }, { "must": { "e6": "enemy" } }]
}
}
}
Diagonal slides (path must be clear) + full Knight jumps (all 8 directions).
5.3 Promoted Princess
{
"O:+I": {
"d4": {
"d3": [{ "must": { "d3": "empty" } }, { "must": { "d3": "enemy" } }],
"d5": [{ "must": { "d5": "empty" } }, { "must": { "d5": "enemy" } }],
"c4": [{ "must": { "c4": "empty" } }, { "must": { "c4": "enemy" } }],
"e4": [{ "must": { "e4": "empty" } }, { "must": { "e4": "enemy" } }]
}
}
}
Princess moves + one square orthogonally.
5.4 Rook
{
"O:R": {
"a1": {
"a4": [
{ "must": { "a2": "empty", "a3": "empty", "a4": "empty" } },
{ "must": { "a2": "empty", "a3": "empty", "a4": "enemy" } }
]
}
}
}
Any number of squares orthogonally. Path must be clear.
5.5 Promoted Rook (Dragon King)
{
"O:+R": {
"d4": {
"c3": [{ "must": { "c3": "empty" } }, { "must": { "c3": "enemy" } }],
"c5": [{ "must": { "c5": "empty" } }, { "must": { "c5": "enemy" } }],
"e3": [{ "must": { "e3": "empty" } }, { "must": { "e3": "enemy" } }],
"e5": [{ "must": { "e5": "empty" } }, { "must": { "e5": "enemy" } }]
}
}
}
Rook moves + one square diagonally.
5.6 Bishop
{
"O:B": {
"c1": {
"f4": [
{ "must": { "d2": "empty", "e3": "empty", "f4": "empty" } },
{ "must": { "d2": "empty", "e3": "empty", "f4": "enemy" } }
]
}
}
}
Any number of squares diagonally. Path must be clear.
5.7 Promoted Bishop (Dragon Horse)
{
"O:+B": {
"d4": {
"d3": [{ "must": { "d3": "empty" } }, { "must": { "d3": "enemy" } }],
"d5": [{ "must": { "d5": "empty" } }, { "must": { "d5": "enemy" } }],
"c4": [{ "must": { "c4": "empty" } }, { "must": { "c4": "enemy" } }],
"e4": [{ "must": { "e4": "empty" } }, { "must": { "e4": "enemy" } }]
}
}
}
Bishop moves + one square orthogonally.
5.8 Silver General
{
"O:S": {
"d4": {
"c3": [{ "must": { "c3": "empty" } }, { "must": { "c3": "enemy" } }],
"e3": [{ "must": { "e3": "empty" } }, { "must": { "e3": "enemy" } }],
"c5": [{ "must": { "c5": "empty" } }, { "must": { "c5": "enemy" } }],
"d5": [{ "must": { "d5": "empty" } }, { "must": { "d5": "enemy" } }],
"e5": [{ "must": { "e5": "empty" } }, { "must": { "e5": "enemy" } }]
}
}
}
One square diagonally (all 4) or one square forward. Cannot move horizontally or straight backward.
5.9 Promoted Silver
{
"O:+S": {
"d4": {
"c4": [{ "must": { "c4": "empty" } }, { "must": { "c4": "enemy" } }],
"e4": [{ "must": { "e4": "empty" } }, { "must": { "e4": "enemy" } }],
"d3": [{ "must": { "d3": "empty" } }, { "must": { "d3": "enemy" } }],
"d5": [{ "must": { "d5": "empty" } }, { "must": { "d5": "enemy" } }],
"c5": [{ "must": { "c5": "empty" } }, { "must": { "c5": "enemy" } }],
"e5": [{ "must": { "e5": "empty" } }, { "must": { "e5": "enemy" } }]
}
}
}
One square orthogonally (all 4) or one square diagonally forward. Cannot move diagonally backward.
5.10 Knight
{
"O:N": {
"b1": {
"a3": [{ "must": { "a3": "empty" } }, { "must": { "a3": "enemy" } }],
"c3": [{ "must": { "c3": "empty" } }, { "must": { "c3": "enemy" } }]
}
}
}
Two squares forward + one square left/right. Jumps over pieces. Forward only (2 destinations).
5.11 Promoted Knight
Moves as Promoted Silver (see §5.9).
5.12 Lance
{
"O:L": {
"a1": {
"a4": [{ "must": { "a2": "empty", "a3": "empty", "a4": "empty" } }, { "must": { "a2": "empty", "a3": "empty", "a4": "enemy" } }]
}
}
}
Any number of squares forward only. Path must be clear.
5.13 Promoted Lance
Moves as Promoted Silver (see §5.9).
5.14 Pawn
{
"O:P": {
"e4": {
"e5": [{ "must": { "e5": "empty" } }, { "must": { "e5": "enemy" } }]
}
}
}
One square forward. Captures forward (same as move).
5.15 Promoted Pawn (Tokin)
Moves as Promoted Silver (see §5.9).
5.16 Drops
{
"O:P": {
"*": {
"e5": [{ "must": { "e5": "empty" } }]
}
},
"O:+P": {
"*": {
"e5": [{ "must": { "e5": "empty" } }]
}
}
}
Pieces in Hand can be dropped on any empty square, with restrictions (see §8).
6. Special Move Notation
Encoded in PMN.
| Move | PMN | Description |
|---|---|---|
| Drop | *-e5 |
Piece from Hand placed on e5 |
| Promotion | e7-e8/+P |
Pawn e7→e8, promotes |
| Decline promotion | e7-e8/P |
Pawn e7→e8, stays unpromoted |
No special compound moves (no castling equivalent).
7. Termination
Status values from CGSN with game-specific interpretation.
7.1 Decisive
| CGSN Status | Result |
|---|---|
mareking |
King captured → capturing player wins |
resignation |
Resigning player loses |
illegalmove |
Offending player loses |
repetition |
Player causing repetition loses |
7.2 Draw
| CGSN Status | Condition |
|---|---|
movelimit |
50 moves without capture or unpromoted Pawn move |
8. Constraints
Rules transforming pseudo-legal moves (GGN) into legal moves.
8.1 No check constraint
Unlike Chess, responding to check is not mandatory. A player may leave their King in check. If the King is captured, the game ends immediately.
8.2 Mandatory promotion
Promotion is mandatory when a piece reaches a square from which it would have no legal move:
| Piece | Mandatory promotion |
|---|---|
| Pawn | Last rank (rank 8 for Sente, rank 1 for Gote) |
| Lance | Last rank |
| Knight | Last two ranks (ranks 7–8 for Sente, ranks 1–2 for Gote) |
8.3 Drop restrictions
| Piece | Prohibited drop locations |
|---|---|
P / p (unpromoted Pawn) |
Cannot be dropped anywhere |
L / l (unpromoted Lance) |
Last rank |
N / n (unpromoted Knight) |
Last two ranks |
Promoted Pawns (+P / +p) may be dropped (when obtained via King’s privilege).
8.4 Capture demotion
When a piece is captured, it reverts to unpromoted state in the captor’s Hand.
- Captured
+R→Rin Hand - Captured
+P→Pin Hand
Exception (King’s privilege): When the King captures a promoted piece, the player may choose to keep it promoted in Hand.
8.5 Repetition (Sennichite)
A move is illegal if it:
- Uses the same piece (or same type/state for drops)
- From the same origin (or Hand)
- To the same destination
- With the same promotion choice
- AND produces an identical position to one that occurred previously
The player committing such repetition loses immediately.
9. Reference
10. License
Open Web Foundation Agreement 1.0 (OWFa 1.0) — OWFa 1.0
