- Sashité for Developers
- Specifications
- LCN
- 1.0.0
- Examples
LCN Examples
Essential format patterns for Location Condition Notation v1.0.0.
Enemy Evaluation Context
Important: The "enemy" keyword requires an evaluation perspective to determine which pieces are considered enemy pieces.
Standard Interpretation: In the Sashité ecosystem, "enemy" is typically evaluated from the active player’s perspective (the player whose turn it is to move):
"enemy": A piece belonging to the inactive player (opponent of the active player)- Not
"enemy": A piece belonging to the active player "empty": An unoccupied location (distinct from enemy/ally considerations)
This evaluation is independent of which piece is moving. The consuming specification (e.g., GGN) must provide the active player context for correct evaluation.
Basic Keywords
Empty Keyword
{
"b2": "empty",
"c3": "empty"
}
Specifies locations with the "empty" state constraint.
Enemy Keyword
{
"e5": "enemy"
}
Specifies a location with the "enemy" state constraint (evaluated from active player’s perspective).
QPI Identifiers
Specific Piece Constraints
{
"h1": "C:+R",
"e1": "C:+K"
}
Specifies exact piece requirements using QPI identifiers.
Mixed State Values
{
"f1": "empty",
"g1": "empty",
"h1": "C:+R"
}
Combines keyword constraints with QPI identifiers.
Condition Patterns
Single Condition
{
"e4": "empty"
}
A single location constraint.
Multiple Conditions
{
"a2": "empty",
"a3": "empty",
"a4": "enemy"
}
Multiple location constraints in one LCN object.
Multiple Piece Instances
{
"e1": "S:P",
"e2": "S:P",
"e3": "S:P",
"e5": "S:P",
"e6": "S:P",
"e7": "S:P",
"e8": "S:P",
"e9": "S:P"
}
Multiple locations constrained to the same piece type.
Common Patterns
Path Specification
{
"b2": "empty",
"c3": "empty",
"d4": "empty"
}
Specifying conditions across multiple locations forming a path.
Target Location
{
"f5": "enemy"
}
Single target location with enemy constraint (requires active player context for evaluation).
Multi-Location Setup
Castling-style pattern:
{
"f1": "empty",
"g1": "empty",
"h1": "C:+R"
}
En passant-style pattern:
{
"f6": "empty",
"f5": "c:-p"
}
Multiple locations with different constraint types.
Game-Specific Patterns
Chess-Style Patterns
Rook path:
{
"a2": "empty",
"a3": "empty"
}
Diagonal capture:
{
"f5": "enemy"
}
Castling conditions:
{
"f1": "empty",
"g1": "empty",
"h1": "C:+R"
}
Shōgi-Style Patterns
Drop location:
{
"e4": "empty"
}
File pattern:
{
"e1": "S:P",
"e2": "S:P",
"e3": "S:P",
"e5": "S:P",
"e6": "S:P",
"e7": "S:P",
"e8": "S:P",
"e9": "S:P"
}
Xiangqi-Style Patterns
Cannon screen:
{
"b7": "enemy"
}
Palace constraint:
{
"e1": "C:K",
"e2": "empty",
"e3": "c:k"
}
Advanced Patterns with Negation
When used within systems that support negation (like GGN’s deny field), LCN conditions can express additional constraints:
Requiring Allied Pieces
In a system with negation support:
{
"a1": "enemy"
}
When negated (e.g., in GGN’s deny field), this means: “NOT enemy at a1”, which implies an allied piece must be present (not empty, not enemy = ally).
Requiring Occupied Locations
In a system with negation support:
{
"b7": "empty"
}
When negated, this means: “NOT empty at b7”, which implies any piece must be present (enemy or ally).
Note: These negation patterns are features of consuming specifications (like GGN), not of LCN itself. LCN only defines the format for positive conditions.
Empty LCN Object
{}
An LCN object with no conditions. Valid format representing the absence of location constraints.
Format Notes
- Keys: Must be valid CELL coordinates
- Values: Must be either
"empty","enemy", or valid QPI identifiers - Interpretation: How these constraints are evaluated is defined by consuming specifications
- Composition: How multiple conditions within one object are combined is defined by consuming specifications
- Enemy perspective: The evaluation perspective for
"enemy"must be provided by the consuming specification (typically active player)
For semantic interpretation and evaluation rules, consult the specification that uses LCN.
