SYSTEM MANUAL // CLASSIFIED INTEL

TELEMETRY & HEURISTICS SPECIFICATION

Under the hood: formulas, data derivation, and diagnostic models for SacThatRook

1. Overview & Pipeline Architecture

SacThatRook is designed as a zero-overhead, serverless intelligence engine. It fetches public, anonymized game history records directly from the Chess.com REST API, parsing metadata and move patterns in real-time.

Unlike traditional engines that compute raw move evaluation percentages (eval spam), this system analyzes the **human factors** of play: structural preferences, comfort systems, focus preservation, and emotional tilt profiles.

DATA PARSING PIPELINE DOSSIER
STAGE 01 // Fetch player game archives via standard public HTTP endpoints.
STAGE 02 // Spawn background Web Worker threads (`pgnWorker`) to handle heavy regex PGN parsing without UI main-thread freezing.
STAGE 03 // Cache raw parsing outputs inside locally embedded IndexedDB storage via Dexie.js for instant offline retrieval.
STAGE 04 // Compile metrics and trigger the derived heuristics engine to evaluate player habits and tactical exposures.

2. Opening DNA Diagnostics

The Opening DNA panel acts as the player's primary chess identity registry, mapping comfort structures and repertoire concentration:

Signature Weapon

Identified as the player's most frequent opening family (grouped by base name, stripping specific variation sub-lines).

Heuristics: Count game volume where name matches regex split. Sort by count desc. Top opening is Signature.

Comfort Systems

Systems where the player experiences maximum success (win/draw score) with a minimum sample size to screen out anomalies.

Score Calculation:
score = (wins + 0.5 * draws) / total * 100

Structural Preference

Measures preferred structural sharpness based on standard Encyclopedia of Chess Openings (ECO) codes.

Open (King's Pawn): ECO B00-B99, C00-C99
Closed (Queen's Pawn, Flank): ECO A00-A99, D00-E99

Repertoire Concentration

Indicates predictability of play. High percentage concentration implies a specialized, narrow preparation.

Formula:
diversity = (games in top 3 families) / total * 100

3. Tactical Playstyle Heuristics

Playstyle profiles are derived mathematically from game length statistics, structural openness, and the frequency of decisive vs. peaceful draw outcomes.

AGGRESSION SCORE

Calculates the tendency to force sharp, double-edged structures and avoid draw conditions.

Derivation: 40% Draw Avoidance + 30% Open Structures % + 30% Short Decisive Game Rate.

CHAOS INDEX

Indicates structural volatility and tactical instability. High scores represent tactical slugfests with short move counts.

Derivation: Derived from frequency of decisive games resolved in less than 22 moves.

DRAW RESISTANCE

Measures zero-sum preference. A high score means the player prefers fighting to a finish over accepting draw compromises.

Derivation: 100 - drawPercentage.

POSITIONAL STABILITY

Reflects comfort in quiet, maneuver-oriented, and slow endgames. High scores are linked to long structural conversion games.

Derivation: 50% Closed Structures % + 40% Long Game Rate (moves >= 35) + 10% Draw Frequency.

4. Weakness & Collapse Telemetry

Vulnerability logging evaluates structural underperformance. The algorithms identify systems where the player experiences a tactical or focus breakdown:

Late-Game Focus Collapse

Tracks if a specific opening structure has a disproportionate loss rate once games extend past move 25. Indicates stamina drain or weak endgame conversions in that setup.

Formula:
Collapse Ratio = (losses >= 25 moves) / total games in structure

Hidden Weapons vs. Fear Openings

**Fear Openings** are opponent systems the player performs poorly against. **Hidden Weapons** are rare lines (2-4 games played) with a success score of >= 70%.

Filters:
Fear: games >= 2 & score < 40%
Hidden: 2 <= games <= 4 & score >= 70%

5. Tilt & Emotional Monitor

Psychological performance indicators track consecutive loss volatility and session behaviors to identify emotional state transitions:

Rage Queue Detection

Tracks consecutive blitz/bullet matches launched immediately after losses, representing emotional queuing patterns.

Trigger: Delta < 120s post-loss
Losing Streaks (Tilt Chains)

Tracks consecutive losses without draws or wins in a single continuous session block.

Monitored Chronologically
Time-Based Session Collapse

Evaluates win/loss drops based on the local hour of the session, pinpointing late-night cognitive drop-offs.

Trigger: Post-Midnight Blitz