Inspiration
We made DoppelGamer an app that creates an AI clone, trained to play a video game EXACTLY like any player. That includes your favorite pro e-sports player, yourself, that friend you just can't seem to beat, or even upcoming tournament opponents.
The idea has a broad pull, including everyone from former players to anyone who wants to see how the measure up to the best in the world. Using chess.com as a POC we know DoppelGamer has the potential to drive large scale engagement across a wide fanbase. Who would want to try their skill against the best, play a clone of themselves, get custom AI coaching, improve their skills through gaming puzzles, or just see who has the best bot in the friend group.
We decided to start with Counter Strike 2, a technically hard challenge that requires low latency, game sense, planning, a strong world model, and detailed recreation of small player idiosyncrasies to create a real clone that fully emulates a target user. Counter Strike uniquely lends itself to this, being both a personal favorite for research on world models because of its complexity and the quality of existing datasets.
What it does
DoppelGamer takes CS2 match recordings as .dem files, and builds a player profile containing opening routes, weapon preferences, purchases, utility usage, and distinctive habits. You can inspect the profile, compare it with professionals, and load its clone into a private match on Mirage.
Our first player identities are donk and broky. We chose these two specifically because of Donk's unique playstyle and Brokys association with Faze. Donk's profile emphasizes aggressive rifle play; broky's emphasizes the positioning and weapon choices of an AWPer. Their profile pages show where they spend time, which routes they favor, and all the little quirks that distinguish them. A synchronized replay lets you follow the original player and the clone side by side, with spoken commentary explaining the round.
When you die, DoppelGamer captures the preceding 10 seconds and turns them into a replay puzzle. You can return to that situation, take control, and attempt a different decision. The coach gives short, situation-specific advice in chat and through voice. Puzzles also live in a searchable practice library with themes, ratings, and attempt history. We took inspiration from Li-Chess's puzzle database based on real game moments and open source for anyone to practice on.
We also built Odyssey, a second mode with four authored opponents:
- Telemachus: a hesitant beginner with slower reactions and a tendency to overspray.
- Menelaus: a steady rifle player who provides a comfortable but demanding fight.
- Odysseus: a precise, quiet opponent with a deliberately superhuman edge.
- Poseidon: relentless pressure and immunity to incoming damage. His difficulty is impossible. His challenge is survival.
Each character has 14 authored quirks and a custom ElevenLabs voice. Their dialogue and trash talk respond to the match, giving each opponent a personality you can hear as well as play against, even going as far mentioning your username. Each bot has a personality and tailors their voice/dialogue to it.
How we built it
Turning recordings into player identities
We built a Python pipeline on demoparser2 to extract positions, velocities, view angles, movement inputs, inventory, purchases, damage, shots, and grenade events from match recordings. Professional matches from OpenCS2 and user-uploaded demos pass through the same pipeline.
The pipeline measures 27 behavioral quirks, including jump frequency, burst length, crouching while shooting, stillness, and distance from teammates. We compare each player's values with the other players in their matches and identify behaviors that remain distinctive across recordings. This gives the clone specific control targets: how often to jump between fights, how long to hold a burst, and how frequently to crouch when shooting.
We also included opening routes. A route carries the player's position, movement, and view direction at each simulation tick. Purchases are grouped by side and economy, with the primary weapon and armor ordered before utility. For weapon preferences, we read what the player actually carries, including weapons retained from previous rounds.
The output is a clone bundle: a JSON profile, purchase plans, grenade data, and compressed movement recordings. As a player's match history grows, the same build process updates their profile.
Teaching the model to generate movement
For new movement, we built on CS-NET v4, a pretrained model with roughly 139 million parameters. It takes four seconds of game history and generates the next four seconds of a player's movement and general view direction. Its inputs include player state, the bomb, grenades, and distances to surrounding geometry.
We added learned player identity vectors and small trainable adapters. The identity changes the model's internal activations through a scale-and-shift layer, while the pretrained backbone supplies its existing understanding of movement. We trained the player-specific components with PyTorch on a Colab A100.
We also trained on situations created by the model's own predictions. For a given moment, the model generates eight possible futures. A scoring step selects a path that follows the player's movement while respecting human movement bounds. That path becomes another training example, mixed with real recorded play and an anchor to the original model. Repeating this process lets the model learn from the states it creates while generating.
Generated routes are prepared offline, checked against the Mirage map geometry, and reviewed in the path viewer. We interpolate the model's four movement samples per second into 64-tick playback files, including movement direction and wrapped view angles. Recorded and generated routes then enter the same game-control path. Keeping generation outside the game lets the match use ordinary bot playback while the model work runs on the GPU.
We have a learned neural model as well as a built model for our current clones. The current demo uses a hybrid model due to latency constraints due to the inference and database delay. We have a partly distilled our large model into an optimized lightweight architecture. However, the training is estimated to take another 12 hours to complete.
Getting a clone into CS2
We used CS2-Bot-Improver as the gameplay base and CS2-Bot-Controller for playback and input control. Our C# CloneDirector plugin, built with CounterStrikeSharp, connects the clone bundle to the bot, and we adjust the architecture and post train from there.
At round start, the director reads the bot's side, money, and spawn. It applies a purchase plan and selects an opening route using the player's route frequencies and the starting position. When the round goes live, the bot follows that segment. Contact interrupts playback and returns control to the combat AI, carrying the player's configured habits into the fight.
The behavior layer also uses observations from the current round to interrupt plans, adjust movement around sound, and vary routes and utility. Jumping and burst controls run only in their eligible situations, so a travel habit does not become a jump in the middle of every gunfight.
Odyssey uses the same director with authored profiles. Difficulty, aim, purchases, bursts, and movement preferences give each character a different style. Poseidon's shield runs in a damage callback before damage is applied. Odysseus receives an 8% outgoing damage boost against enemies. These rules attach to the selected character's bot.
Connecting the game to the website
A FastAPI match service connects the Next.js interface to CS2. The website creates matches and displays their progress; MatchBridge carries commands into the game, while Game State Integration sends scores and round state back to the service. The game runs on the Windows machine, and Vultr hosts the web-facing services under our project domain.
The frontend uses React, TypeScript, and Three.js for profiles, character scenes, and replay views. FaZe and Odyssey share the match infrastructure while presenting different visual worlds. Odyssey uses layered artwork, parallax, and animated character selection to introduce the opponent before the match begins.
MongoDB Atlas stores clone profiles and style vectors. Atlas Vector Search finds professionals with similar play styles. Gemini turns profile data into readable scouting reports and uses replay footage and event data to write commentary, which ElevenLabs converts into speech.
Turning a death into another attempt
CloneDirector keeps a rolling buffer of player state. A human death saves the previous 10 seconds, including positions, weapons, shots, and kills. The service packages that moment as a puzzle, and the game plugin restores the scenario with the player controlling the hero.
The feedback layer extracts candidate mistakes from the event sequence and sends a compact description to Gemini. The response becomes one or two actionable sentences. We send the text to CS2 chat and stream ElevenLabs audio through the match service at the same time. The player can hear the advice, open the saved moment, and immediately test a different approach.
Challenges we ran into
A large part of the work was translating between representations. Demo data, model output, bot playback, and browser replays all describe movement differently. We built converters around the same position and timing data, then used the replay viewer to inspect the path as it moved through the pipeline.
Latency and training-time were probably our largest issue. Inference on our model often just took too long, and we often forgot to factor in variables into our training, like aiming to prevent sound detection. These were often expensive mistakes costing another training run.
The other key challenge was game sense. Most of us aren't CS2 players, so we severely underestimated how much advanced intuition, game theory, and on the spot planning CS2 .required. It is now very clear to use why it is such a popular choice for world model research.
Accomplishments that we're proud of
Backend; We connected recorded match data, player-specific training, a live game plugin, and a browser interface into one practice system. The same profile that explains a player's habits also supplies purchases, route choices, and behavior targets to their bot.
Dreaming: In our donk movement experiment, training on generated futures reduced average path error by 11.3% relative to the generic model on the reserved test windows. Movement-bound violations fell from 0.55% to 0.05% of steps. We could inspect those differences directly in the path viewer.
Trash talk: Our trash talk feature read the game state in ultra fine detail to come up with what are honestly some pretty witty insults, in a recognizable voice.
What we learned
A player's identity lives in repeated decisions: a route they favor, a weapon they keep buying, or the way they move between fights. Measuring those habits gave us a practical way to connect match data to controls inside the game.
We also learned how much the boundaries between systems matter. A useful prediction needs a playback format. A saved death needs a way back into the game. Advice becomes something you can act on when the moment that produced it is ready to play again.
Built with
Python, PyTorch, CS-NET v4, demoparser2, OpenCS2, Colab A100, C#, CounterStrikeSharp, CS2-Bot-Improver, CS2-Bot-Controller, FastAPI, Next.js, React, TypeScript, Three.js, MongoDB Atlas Vector Search, Gemini, ElevenLabs, SQLite, and Vultr.

