v2.0 — Developer Preview
Tactical pattern
recognition for chess.
A specialized inference engine that detects, classifies, and explains tactical patterns in any chess position. One API call. Deterministic results.
3ms
L1 Median Latency
42ms
L2 Full Analysis
10
Tactical Patterns
99.7%
Uptime SLA
POST /api/v1/extract
Request
{
"fen": "r1bqkb1r/pppp1ppp/ 2n2n2/4p2Q/2B1P3/ 8/PPPP1PPP/RNB1K1NR w KQkq - 4 4",
"depth": "L2",
"with_sequence": true
}Response
{
"patterns": [{
"type": "fork",
"trigger": "Qxf7+",
"targets": ["e8", "h8"],
"is_mate": true,
"sequence": ["Qxf7#"]
}],
"meta": {
"depth": "L2",
"latency_ms": 87
}
}87ms — Fork detected (Qxf7+ targets king & rook)
How it works
Three stages. One response.
ChessGrammar processes each position through a deterministic analysis pipeline, from structural scan to forcing tree validation.
01
Parse
FEN or PGN input is validated, normalized, and converted to an internal board representation.
< 1ms
02
Detect
L1 structural scan identifies candidate patterns. L2 generates forcing trees to validate each tactic.
3ms (L1) — 42ms (L2)
03
Classify
Each confirmed pattern is typed, annotated with trigger moves, targets, material gain, and optional sequences.
Deterministic output
Pattern Taxonomy
10 tactical patterns. Formally defined.
Each pattern follows a strict definition from chess theory, with clear trigger conditions and validation rules.
Fork
One piece attacks two+
Pin
Piece shields higher value
Skewer
Reverse pin on a line
Discovered Attack
Moving piece reveals attack
Double Check
Two pieces give check
Back Rank Mate
King trapped on last rank
Smothered Mate
Knight mates boxed king
Deflection
Lure defender away
Interference
Block defensive line
Trapped Piece
No safe squares remain
Detection Pipeline
Two-layer depth model
L1 scans structure. L2 validates with forcing trees. Choose precision or speed per request.
Input
FEN / PGN
Validated & normalized
→
Layer 1
Structural Scan
Geometric pattern matching
on board geometry
~3ms
→
Layer 2
Forcing Tree
Alpha-beta validation via
forced move sequences
~42ms
→
Output
Classified Patterns
Type, trigger, targets,
material, sequences
Performance
Built for production workloads.
Measured on real-world positions from international tournament databases. All benchmarks are reproducible.
3ms
L1 Median Latency
p99 < 15ms
42ms
L2 Full Analysis
p99 < 500ms
97.3%
Detection Accuracy
vs. 25k annotated positions
| Pattern | L1 Latency (p50) | L2 Latency (p50) | Accuracy |
|---|---|---|---|
| Fork | 2ms | 38ms | 98.1% |
| Pin | 4ms | 38ms | 97.8% |
| Skewer | 1ms | 1ms | 96.5% |
| Discovered Attack | 5ms | 114ms | 97.2% |
| Double Check | 6ms | 457ms | 99.1% |
| Back Rank Mate | 2ms | 20ms | 98.4% |
| Smothered Mate | 3ms | 7ms | 99.3% |
| Deflection | 2ms | 132ms | 95.2% |
| Interference | 3ms | 246ms | 94.8% |
| Trapped Piece | 10ms | 111ms | 96.1% |
Why ChessGrammar
Not another chess engine.
Stockfish evaluates positions. ChessGrammar classifies tactics. Different problem. Purpose-built solution.
Classification, not evaluation
General engines answer "what's the best move?" — ChessGrammar answers "what tactic exists here?" with formal pattern labels and structured metadata.
Deterministic & reproducible
Same input, same output. Every time. No neural network variance, no stochastic search. Results you can rely on for production systems.
Forcing tree validation
L2 analysis builds complete forcing sequences to confirm each tactic. Not heuristic guesses — validated move-by-move with refutation handling.
API-first architecture
Designed as infrastructure from day one. RESTful, stateless, zero dependencies. Integrate into any stack with a single HTTP call.
Explore ChessGrammar.
Developer preview. No API key required. Rate limits apply.