- Sashité for Developers
- Rules
- Xiongqi
Xiongqi
Rule System for Xiongqi (熊棋, “bear chess”) built on the Game Protocol.
Xiongqi is a two-player abstract strategy game derived from xiàngqí, played on an 8×8 board with on-board pieces only — no drops; captured pieces never re-enter play. It adopts castling exactly as in the Chess specification, performed by the General and a Chariot. The army maps one-to-one onto the Chess army: the Chariot keeps the Rook’s movement, the Bear replaces the Bishop (same diagonal slide — and names the game), the Empress replaces the Queen as a Chariot + Knight compound, the General replaces the King as a royal that steps orthogonally but captures at Chariot range, and the Soldier replaces the Pawn.
1. Board
8×8 grid encoded in CELL.
Valid coordinates: a1–h8
FEEN serialization: rank 8 → rank 1, file a → file h, / between ranks.
River: the midline between ranks 4 and 5. Its only effect is unlocking the Soldier’s sideways step — no piece is restricted by it.
2. Style
| Style | SIN | Side |
|---|---|---|
Chinese |
C |
first (Red — South, bottom) |
Chinese |
c |
second (Black — North, top) |
3. Pieces
All pieces encoded in EPIN. Following the xiàngqí tradition, the two sides use distinct, homophonic characters for the same piece type; the General, Knight, Chariot and Soldier use the traditional pairs, the Bear (雄/熊, both xióng) and the Empress (妃/騛, both fēi) use Sashité’s own.
| EPIN | Name | South (Red) | North (Black) | State / notes |
|---|---|---|---|---|
G^ |
General | 帥 | 將 | Royal piece, not in check |
-G^ |
General | Currently in check (transient) | ||
E |
Empress | 妃 | 騛 | Chariot + Knight compound; no promoted form |
+R |
Chariot | 俥 | 車 | Castling immediately performable |
-R |
Chariot | Castling right retained but temporarily blocked | ||
R |
Chariot | No castling rights (it or its General has moved, or it was born by promotion) | ||
B |
Bear | 雄 | 熊 | Diagonal slide (the Bishop’s movement) |
N |
Knight | 傌 | 馬 | All 8 L-jumps, never hobbled |
+S |
Soldier | 兵 | 卒 | On its starting rank, eligible for the double step |
-S |
Soldier | Just double-stepped, legally capturable en passant (one turn only) | ||
S |
Soldier | Has moved; no double step |
Black uses the same tokens in lowercase (g^, e, +r, …). There is no
Queen in Xiongqi.
Capture mutation: none. A captured piece enters the capturing player’s hand with type and case preserved — no demotion (a promoted Soldier is captured as whatever it became). The case is not flipped, so the hand is permanently inert (droppable-by-nobody), exactly as in Chess — yet it remains part of the canonical position (§8.4).
Hand canonicalization: a piece in hand never carries a +/- marker
(+S → S, -R → R) — a recomposition of the position, never written in
the PMN of the capturing move (§6).
4. Initial Position
Encoded in FEEN:
-rnbeg^bn-r/+s+s+s+s+s+s+s+s/8/8/8/8/+S+S+S+S+S+S+S+S/-RNBEG^BN-R / C/c
The back rank mirrors the Chess back rank: Chariots a/h, Knights b/g, Bears
c/f, the Empress on d (the Queen’s square), the General on e (the King’s
square). Every Soldier starts +S (double-step eligible); both Chariots
start -R (castling right retained, temporarily blocked).
5. Movements
All pseudo-legal moves encoded in GGN. Patterns shown are representative.
5.1 General
{
"C:G^": {
"e4": {
"e5": [{ "must": { "e5": "empty" } }],
"d4": [{ "must": { "d4": "empty" } }],
"e7": [{ "must": { "e5": "empty", "e6": "empty", "e7": "enemy" } }],
"a4": [{ "must": { "d4": "empty", "c4": "empty", "b4": "empty", "a4": "enemy" } }]
}
}
}
Moves one square orthogonally onto an empty square; captures like a Chariot — sliding any distance along a rank or file to the first occupied square, taking it if hostile. No diagonal action whatsoever. Cannot promote.
Facing royals (“flying general”): because the General captures at Chariot range, two Generals on an open shared file or rank give check to each other — an ordinary long-range threat under the standard check rules. Stepping onto such a line is self-check, hence illegal.
5.2 Empress
Chariot + Knight compound: slides any number of squares orthogonally (blockable), and jumps in all 8 L-shape directions (over anything). No diagonal slide — that is the Bear’s domain. The strongest piece. No promoted form.
5.3 Chariot
Any number of squares orthogonally — the Western Rook’s movement. Path must
be clear. No promoted form. Participates in castling; state mutation on
move: +R/-R → R.
5.4 Bear
Any number of squares diagonally — the Western Bishop’s movement. Path must be clear. No promoted form.
5.5 Knight
L-shape, all 8 directions, jumps over anything — the Western chess Knight, not the hobbled xiàngqí horse. No promoted form.
5.6 Soldier
{
"C:+S": {
"e2": {
"e3": [{ "must": { "e3": "empty" } }, { "must": { "e3": "enemy" } }],
"e4": [{ "must": { "e3": "empty", "e4": "empty" } }]
}
},
"C:S": {
"e5": {
"e6": [{ "must": { "e6": "empty" } }, { "must": { "e6": "enemy" } }],
"d5": [{ "must": { "d5": "empty" } }, { "must": { "d5": "enemy" } }],
"f5": [{ "must": { "f5": "empty" } }, { "must": { "f5": "enemy" } }]
}
}
}
Moves and captures straight forward — never diagonally, never backward.
After crossing the river (Red on ranks 5–8, Black on ranks 1–4) it gains
a sideways step — move or capture, same rank — shown in the second
sample. The double step (two squares forward, both empty, never a
capture) requires the +S token, stripped on the Soldier’s first move and
never regained. A sideways step can never reach the last rank, so promotion
always results from a forward move.
5.7 Castling
{
"C:G^": {
"e1": {
"g1": [{ "must": { "f1": "empty", "g1": "empty", "h1": "C:+R" } }],
"c1": [{ "must": { "d1": "empty", "c1": "empty", "b1": "empty", "a1": "C:+R" } }]
}
}
}
Identical mechanics to Chess §5.7, with the General in the King’s role and a Chariot in the Rook’s. Black mirrors on rank 8. Never ambiguous with the Chariot-style capture: castling is the General’s only non-capturing displacement of more than one square and lands on an empty square; a two-file General displacement onto an occupied square is an ordinary capture — no Chariot relocates, and the castling rights are gone (the General has moved).
5.8 En passant
{
"C:S": {
"e6": {
"f6": [{ "must": { "f5": "c:-s", "f6": "empty" } }]
}
}
}
When an enemy Soldier double-steps past yours, capture it on the immediately
following turn by a sideways step onto the skipped square — the only
capture whose victim is not on the destination square (it sits directly
behind it). Worked geometry: Black plays f7→f5 (skipped square f6); a Red
Soldier on e6 or g6 — necessarily across the river — steps sideways onto
f6, removing the Soldier on f5. A Soldier already on the landing rank
(e5/g5) instead captures f5 by an ordinary sideways capture, no en
passant involved.
Canonicality condition: the -S flag is set only if the capture is
actually legal (a Soldier is positioned for the sideways take and the
capture would not self-check). Otherwise the token stays plain S.
6. Special Move Notation
Encoded in PMN.
| Move | PMN | Description |
|---|---|---|
| Kingside castling (Red) | e1~g1 |
General e1→g1, Chariot h1→f1 |
| Queenside castling (Red) | e1~c1 |
General e1→c1, Chariot a1→d1 |
| Kingside castling (Black) | e8~g8 |
General e8→g8, Chariot h8→f8 |
| Queenside castling (Black) | e8~c8 |
General e8→c8, Chariot a8→d8 |
| En passant (Red) | e6~f6 |
Soldier e6→f6, captures Soldier on f5 |
| En passant (Black) | e3~f3 |
Soldier e3→f3, captures Soldier on f4 |
| Promotion | e7-e8=E |
Soldier e7→e8, promotes to Empress (player’s choice among R, N, B, E; = names the piece the actor becomes) |
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. A capture
carries a / suffix only when the captured piece’s letter or case changes on
entering the hand — never in Xiongqi, whose capture mutation is empty (§3): the
en passant capture of a -s is written e6~f6.
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. The General is never actually captured |
resignation |
Resigning player loses |
7.2 Draw
| CGSN Status | Condition |
|---|---|
nomove |
The player to move has no pseudo-legal move at all — the pseudo-legal set (GGN) is empty. Tested before checkmate and stalemate, and takes precedence even if the General is in check (CGSN §9.1) |
stalemate |
No legal move, not in check. A deliberate departure from xiàngqí (where no-move loses), aligned on FIDE |
insufficient |
Dead position, material-only detection: General versus General is the only case — almost any extra material mates a General cornered by Chariot-range checks, and a lone Soldier promotes to an Empress |
repetition |
The same canonical position occurs a third time (see §8.4). Follows FIDE — perpetual check remains a defender’s draw, unlike xiàngqí where it loses |
movelimit |
50 full moves by each player with no capture and no unpromoted Soldier move |
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 is illegal if it leaves the active player’s General in check —
including stepping the General onto an open line facing the enemy General.
A General in check carries the transient -G^ marker.
8.2 Castling constraints
As in Chess: illegal if the General is in check, passes through, or lands on
an attacked square — attack detection includes the enemy General’s
Chariot-range capture (the flying-general line). +R/-R encode
executability; a Chariot born by Soldier promotion is plain R and never
castles.
8.3 Promotion
Mandatory when a Soldier ends a forward move on the last rank, and a genuine player choice among Chariot, Knight, Bear, Empress — never a Soldier, never a General, never a Queen (none exists). The move record must carry the chosen piece; the Soldier token is replaced outright, so a promoted Soldier is thereafter indistinguishable from an original piece of that type.
8.4 Position identity (threefold repetition)
Two positions are the same iff their canonical FEEN strings are equal:
same squares and piece state (+S, -S, +R/-R, -G^ included), same
hand contents for each player (inert, but canonical), same player to move.
8.5 En passant timing
The -S/-s flag expires at the start of the next move of the player who
double-stepped, whether or not the capture was taken.
9. Reference
10. License
Open Web Foundation Agreement 1.0 (OWFa 1.0) — OWFa 1.0
