- Sashité for Developers
- Rules
- Chess
Chess
Rule System for Western Chess 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.
2. Style
| SNN | SIN | Side |
|---|---|---|
Chess |
C |
first (White) |
Chess |
c |
second (Black) |
3. Pieces
All pieces encoded in PIN.
| PIN | Name | Notes |
|---|---|---|
+K^ |
King | Castling rights intact |
K^ |
King | Castling rights forfeited |
Q |
Queen | |
+R |
Rook | Castling-eligible |
R |
Rook | |
B |
Bishop | |
N |
Knight | |
+P |
Pawn | Two-square advance available |
P |
Pawn | |
-P |
Pawn | Vulnerable to en passant |
+k^ |
King | Castling rights intact |
k^ |
King | Castling rights forfeited |
q |
Queen | |
+r |
Rook | Castling-eligible |
r |
Rook | |
b |
Bishop | |
n |
Knight | |
+p |
Pawn | Two-square advance available |
p |
Pawn | |
-p |
Pawn | Vulnerable to en passant |
4. Initial Position
Encoded in FEEN:
+rnbq+k^bn+r/+p+p+p+p+p+p+p+p/8/8/8/8/+P+P+P+P+P+P+P+P/+RNBQ+K^BN+R / C/c
5. Movements
All pseudo-legal moves encoded in GGN. Patterns shown are representative; full GGN enumerates all source/destination pairs.
5.1 King
{
"C: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. State mutation on move: +K^ → K^, +k^ → k^.
5.2 Queen
{
"C:Q": {
"d1": {
"d4": [
{ "must": { "d2": "empty", "d3": "empty", "d4": "empty" } },
{ "must": { "d2": "empty", "d3": "empty", "d4": "enemy" } }
],
"a4": [
{ "must": { "c2": "empty", "b3": "empty", "a4": "empty" } },
{ "must": { "c2": "empty", "b3": "empty", "a4": "enemy" } }
]
}
}
}
Any number of squares orthogonally or diagonally. Path must be clear.
5.3 Rook
{
"C:+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. State mutation on move: +R → R, +r → r.
5.4 Bishop
{
"C: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.5 Knight
{
"C:N": {
"b1": {
"a3": [{ "must": { "a3": "empty" } }, { "must": { "a3": "enemy" } }],
"c3": [{ "must": { "c3": "empty" } }, { "must": { "c3": "enemy" } }]
}
}
}
L-shape (2+1 or 1+2). Jumps over pieces.
5.6 Pawn (White)
{
"C:+P": {
"e2": {
"e3": [{ "must": { "e3": "empty" } }],
"e4": [{ "must": { "e3": "empty", "e4": "empty" } }],
"d3": [{ "must": { "d3": "enemy" } }],
"f3": [{ "must": { "f3": "enemy" } }]
}
},
"C:P": {
"e3": {
"e4": [{ "must": { "e4": "empty" } }],
"d4": [{ "must": { "d4": "enemy" } }],
"f4": [{ "must": { "f4": "enemy" } }]
}
}
}
+P: one or two squares forward, captures diagonally. Two-square advance mutates+P→-P.P: one square forward, captures diagonally.- Reaching rank 8: mandatory promotion to
Q,R,B, orN.
5.7 Pawn (Black)
Mirror of White pawn moving toward rank 1. Reaching rank 1: mandatory promotion to q, r, b, or n.
5.8 Castling (White)
{
"C:+K^": {
"e1": {
"g1": [{ "must": { "f1": "empty", "g1": "empty", "h1": "C:+R" } }],
"c1": [{ "must": { "d1": "empty", "c1": "empty", "b1": "empty", "a1": "C:+R" } }]
}
}
}
State mutations: +K^ → K^, +R → R.
5.9 Castling (Black)
{
"c:+k^": {
"e8": {
"g8": [{ "must": { "f8": "empty", "g8": "empty", "h8": "c:+r" } }],
"c8": [{ "must": { "d8": "empty", "c8": "empty", "b8": "empty", "a8": "c:+r" } }]
}
}
}
State mutations: +k^ → k^, +r → r.
5.10 En passant
{
"C:P": {
"e5": {
"d6": [{ "must": { "d5": "c:-p", "d6": "empty" } }],
"f6": [{ "must": { "f5": "c:-p", "f6": "empty" } }]
}
},
"c:p": {
"e4": {
"d3": [{ "must": { "d4": "C:-P", "d3": "empty" } }],
"f3": [{ "must": { "f4": "C:-P", "f3": "empty" } }]
}
}
}
Captures pawn marked -P/-p (vulnerable). The -P/-p state expires at end of opponent’s turn.
6. Special Move Notation
Encoded in PMN.
| Move | PMN | Description |
|---|---|---|
| Kingside castling (White) | e1~g1 |
King e1→g1, Rook h1→f1 |
| Queenside castling (White) | e1~c1 |
King e1→c1, Rook a1→d1 |
| Kingside castling (Black) | e8~g8 |
King e8→g8, Rook h8→f8 |
| Queenside castling (Black) | e8~c8 |
King e8→c8, Rook a8→d8 |
| En passant (White) | e5~f6 |
Pawn e5→f6, captures pawn on f5 |
| En passant (Black) | e4~f3 |
Pawn e4→f3, captures pawn on f4 |
| Promotion | e7-e8/Q |
Pawn e7→e8, promotes to Queen |
7. Termination
Status values from CGSN with game-specific interpretation.
7.1 Decisive
| CGSN Status | Result |
|---|---|
checkmate |
Active player loses |
resignation |
Resigning player loses |
timelimit |
Player exceeding time loses (unless opponent has insufficient material → draw) |
7.2 Draw
| CGSN Status | Condition |
|---|---|
stalemate |
No legal move, not in check |
insufficient |
K vs K, K+B vs K, K+N vs K, K+B vs K+B (same color) |
repetition |
Same position 3 times (same active player, castling rights, en passant rights) |
movelimit |
50 moves without pawn move or capture |
agreement |
Mutual agreement |
8. Constraints
Rules transforming pseudo-legal moves (GGN) into legal moves.
8.1 Check constraint
A move is illegal if it leaves the active player’s King (K^/k^) in check.
8.2 Castling constraints
Castling is illegal if:
- King is in check, OR
- King passes through an attacked square, OR
- King lands on an attacked square.
8.3 En passant timing
The -P/-p state (vulnerable to en passant) expires immediately after the opponent’s next move. En passant capture must occur on the immediately following turn.
8.4 Threefold repetition
Position identity includes:
- All piece positions
- Active player
- Castling rights (
+K^,+Rstates) - En passant availability (
-P/-pstate)
9. Reference
10. License
Open Web Foundation Agreement 1.0 (OWFa 1.0) — OWFa 1.0
