// PROTOTYPE     V0.1 · OPEN-SOURCE

PGN → personality
fingerprint →
a bot that actually plays
like you.

An open prototype for Chess.com's 3rd 2026 AI focus area — mapping a player's historical PGN data to a personality vector, then encoding that vector into a Stockfish-driven bot spec.

Built by Ankita Pal aka @popsicle_guy, as part of an application for the Senior ML Engineer role.

8
TRAITS
8
ARCHETYPES
Stockfish 16
ENGINE
PGN or User
INPUT
RUN THE DEMO › </> SEE METHODOLOGY
// 01 · INPUT

Feed the lab a player.

Drop a Chess.com username and we'll pull their latest games via the public API. Or paste a PGN dump directly — the parser handles multi-game files.

// 03 · METHODOLOGY

The pipeline, in plain sight.

Every step is intentionally explainable. No black boxes — yet.

chess.com /pub/player/{user}/games      PGN file
[ python-chess parser ]
per-game heuristic metrics
normalise → 8-dim trait vector ∈ [0,1]
nearest-centroid cluster
ARCHETYPE
param-mapping function
STOCKFISH BOT SPEC
skill / depth / contempt
move-bias vector
blunder injection prob
01

PGN ingestion

Pull last N games via Chess.com's public archives API, or accept a raw PGN dump. python-chess parses the mainline into board states + move metadata.

02

Heuristic feature extraction

Per-game: captures, checks, sacrifice ratio (capturer > captured), early-queen moves, castling speed, central pawn pushes, minor-piece development, longest material swing, endgame reach + result, opening (ECO) diversity, time-control base.

03

Trait normalisation

Raw stats compose into 8 traits in [0,1]: aggression, tactical vision, positional play, time mgmt, opening diversity, endgame strength, risk tolerance, blunder resistance.

04

Nearest-centroid clustering

8 hand-seeded archetype centroids (Tactical Tornado, Patient Strategist, Endgame Surgeon…). The player's trait vector is matched by Euclidean distance — distance → confidence.

05

Bot spec generation

Trait vector maps to Stockfish runtime params: skill_level, search_depth, contempt, move_time, blunder injection probability, opening-book width, time-trouble behaviour, and a 6-dim move-selection bias vector (captures / checks / sacs / quiet / simplification / theory).

06

What's next

Plug Stockfish + the bias vector into a move-sampler (top-k softmax over engine PVs weighted by bias). Add engine-eval-based blunder labelling for true tactical_vision. Train an embedding head on millions of users to replace hand-seeded centroids.

// 04 · WHY

A late-night Reddit rabbit hole,
turned prototype.

I'm Ankita Pal, @popsicle_guy on Chess.com. ML engineer with a Masters in AI/ML (2025). Chess is literally the reason I picked the degree.

Last Christmas I saw the Chess.com 2025 Wrapped posted on Reddit and it clicked: if you can fingerprint a player's style from their PGNs, you can encode that fingerprint into a bot. A bot that feels like a real opponent, not just a slider on a skill bar.

Then I saw Vinay Bhat's announcement of Chess.com's new AI org and the 3rd 2026 focus area. Same idea. So I built this.

This is v0.1. The fingerprint is real, the bot-spec is real (Stockfish + bias vector). Wiring the bias into a live move-sampler is the next weekend.