- Sashité for Developers
- Specifications
- STN
- 1.0.0
- Examples
STN Examples
- State Transition Notation (STN) v1.0.0
- Author: Sashité
- License: MIT License
Overview
This document provides comprehensive examples of STN (State Transition Notation) usage across various game types and transition scenarios. These examples illustrate practical applications of the STN specification while remaining rule-agnostic.
Note: All examples are for illustration purposes only. STN does not define or assume any game-specific rules, movement patterns, or win conditions.
Examples
Movement
{
"board": {
"b2": null,
"b4": "C:-P"
}
}
Capture
{
"board": {
"b1": "S:S",
"c2": null
},
"hands": {
"S:B": 1
}
}
Drop
{
"board": {
"e5": "S:P"
},
"hands": {
"S:P": -1
}
}
Castling
{
"board": {
"e1": null,
"g1": "C:K",
"h1": null,
"f1": "C:R"
}
}
En Passant
{
"board": {
"e5": null,
"f6": "C:P",
"f5": null
},
"hands": {
"c:p": 1
}
}
3D Movement
{
"board": {
"e2A": null,
"f3B": "R:B"
}
}
Cumulative Changes (Multiple Moves)
{
"board": {
"e2": null,
"e4": "C:P",
"e5": "c:p",
"e7": null
},
"toggle": false
}
Integration with FEEN
Given the initial Western Chess position:
+rnbq+kbn+r/+p+p+p+p+p+p+p+p/8/8/8/8/+P+P+P+P+P+P+P+P/+RNBQ+KBN+R / C/c
And the position after the first move:
+rnbq+kbn+r/+p+p+p+p+p+p+p+p/8/8/4P3/8/+P+P+P+P1+P+P+P/+RNBQ+KBN+R / c/C
When we make the diff between the position after the first move and the initial position, then we get the following STN representation:
{
"board": {
"e2": null,
"e4": "C:P"
}
}
And when the position after the second move is:
+rnbq+kbn+r/+p+p+p+p1+p+p+p/8/4p3/4P3/8/+P+P+P+P1+P+P+P/+RNBQ+KBN+R / C/c
When we make the diff between the position after the second move and the initial position, then we get the following STN representation:
{
"board": {
"e2": null,
"e4": "C:P",
"e5": "c:p",
"e7": null
},
"toggle": false
}