CS2 Predicting Hidden Opponents with a Limited Budget of Teammate Frames

When memory saves frames, and why choosing the camera adds little

James Liu

Release v1.0.0 · December 2026

A held-out round on the development map, de_dust2, from a test match never used in training. Four times a second the model reads the raw frame of one teammate camera, chosen by the learned selector, and shades each region of the map by its belief that an opponent stands there; the white dots are the opponents' true positions, which it never sees. The clip was picked for action, the window with the most opponent sightings, not as a typical round.Gameplay frames: CounterStrike-Dataset (Ramesh, 2026), CC BY-NC 4.0, resized and composited with the model's output. Counter-Strike 2 © Valve.

Summary

Question. Five teammates in a Counter-Strike 2 round each carry a camera. To know where the five opponents are, a system could run a vision model on all five feeds all the time, or read a few frames and remember what they showed. How few frames are enough, and does it pay to choose which camera to read?

Setup. Recorded rounds of professional play are replayed, so every policy faces exactly the same round. Four times a second a policy buys one, two or all five current frames without seeing them first, and an observer gives, for each of 64 map regions, the probability that an opponent stands there now and one second later. Everything was developed on one map; 31 hypotheses were then frozen in code before seven held-out maps (37 matches) were scored.

Findings. All 31 came out as stated. With memory, 1.47 frames per second match the same network without memory reading all 20: fourteen times fewer frames. Choosing the camera adds little: even complete information improves on simply taking turns by only 1.6 %, and a learned selector ties with taking turns. Read from raw pixels through a frozen encoder, 58 % of the improvement survives on a held-out map.

Scope. Most results replace perception by the dataset's labels of what a frame shows. One training run per map is registered; two more, added afterwards, repeat 32 of the 34 verdicts.

1 The task

An observer may read only a few of its own team's camera frames, and must say, four times a second, how likely each part of the map is to hold an opponent.

Every round in the dataset has ten synchronized first-person recordings, one per player; an episode is one round seen by one team. At each step the policy names the cameras it wants, before it sees any of them. The replay returns only those frames and charges every request, even for a camera whose player has died. A recorded round does not react to what is watched, so every policy faces exactly the same round, frame for frame.

Diagram of one decision step: memory feeds the policy, which names cameras; the replay environment returns only those frames; the observer writes them into memory and outputs a belief over 64 regions. Below a dashed line, the recorded round with true positions is visible only to the evaluator.

Scroll sideways to see the whole diagram.

Figure 1. One decision step. The policy chooses before it sees any current frame. Only the frames it paid for cross from the recorded round to the models; positions, visibility labels and the unselected frames stay on the private side, where only the evaluator reads them.

The target is whether at least one living opponent stands in each of 64 regions, now and one second ahead. Direct evidence is rare: a purchased frame shows an opponent only 1.4 to 2.2 % of the time, and 69 to 76 % of the region-steps that hold an opponent belong to opponents no teammate has had in view so far in the round.

Two top-down maps of de_dust2 divided into regions, shaded by how often each holds an opponent: Counter-Terrorists cluster around the bombsites and mid, Terrorists around the tunnels, mid and outside long.
Figure 2. The 64 regions of the development map, de_dust2, shaded by the share of live steps at which an opponent stands in each, for the two sides. Regions are fitted on the training matches' player positions and follow the game's place names. Resolved by elapsed time, this picture is the prior, the reference that uses no frame.
Data
The CounterStrike-1K release of the CounterStrike dataset (Ramesh, 2026), pinned to one revision: 318 professional matches, 6,508 rounds and 1,209 hours of first-person video on eight maps, with tick-level positions and visibility labels. Whole matches are split into training, validation and test (233 / 43 / 42).
Budget
One, two or all five teammate cameras per step, four steps per second: 4, 8 or 20 frames per second.
Frames
Main track: a label token, what perfect single-frame perception would report, which keeps memory and selection apart from perception error. Visual track: raw 448 × 252 frames through a frozen DINOv2 ViT-S/14 encoder and a small adapter.
Observer
1.5 million parameters: a recurrent state (a GRU with 384 units) beside an explicit evidence memory that keeps, per region and over five time constants, the strongest sighting bought so far, fading with time.
Score
Brier score over regions and live steps. Results are relative differences with 95 % intervals from a hierarchical bootstrap over matches and rounds; negative means the first-named system is better.

2 Memory saves frames

With memory, about one and a half frames per second are worth twenty without it.

As the budget shrinks, the observer with memory degrades slowly (Figure 3). It matches the same network without memory reading all five feeds, 20 frames per second, at 1.47 frames per second [1.17, 1.84]: fourteen times fewer frames C3-2. It matches a classical persistence tracker fed all five feeds at 0.72 frames per second [0.54, 0.97] C3-1.

Brier score against frames bought per second, on a log scale. The main observer's curve falls steadily and crosses the level of the memoryless observer fed all five feeds at 1.47 frames per second and the persistence rule at 0.72 frames per second.
Figure 3. Accuracy against frames bought (lower is better), pooled over the seven held-out maps. Blue: the main observer on a rotation at decreasing frame rates, then two frames per step and all five feeds. Dashed: alternatives fed all five feeds, and the prior, which uses no frame. Drop lines: where the observer matches its memoryless version and the persistence rule.

The kind of memory matters. Against the same network without memory the observer is better by 3.42 % [3.02, 3.81] at one frame per step; keeping only the recurrent state and removing the evidence memory costs 2.76 to 4.36 %, and the learned observer beats a tuned persistence rule and a transition filter by 4.25 to 6.57 %. The recurrent state adds little on top of the evidence memory: within ±1 % in every training run, so a plain record of what was seen, where and when does nearly all of the work.

3 Choosing the camera adds little

Reading every camera beats taking turns by only 1.6 %, so a clever camera choice has little to find.

With the observer held fixed, reading all five feeds instead of one per step in rotation improves the score by only 1.63 % [1.41, 1.85] C4-1; an oracle that always buys the frame showing the most opponents gains 1.70 %. A selector that must choose before it sees cannot be expected to beat complete information. The learned gain selector, trained on counterfactual rollouts to predict how much each camera's frame would lower the loss, ties with the rotation: −0.06 % [−0.19, +0.07], equivalent within the registered ±1 % C5-1.

Forest plot of camera-selection policies against the rotation. Complete information sits near minus 1.6 to minus 1.9 percent; the gain selector at minus 0.06; MVSelect and scheduler ports above zero; hand-written rules between minus 0.23 and plus 3.8 percent; only a clairvoyant query that reads hidden state reaches the minus 5 percent target.

Scroll sideways to see the whole chart.

Figure 4. Which camera to buy. Every policy at one frame per step against the rotation over living teammates (negative: better than taking turns), same observer, seven held-out maps. Orange: complete information; green: selectors learned from permitted history; grey: hand-written rules; hollow: hindsight diagnostics that read hidden state. Dashed: the −5 % target of the original plan, reached only by a query that reads the labels to choose.

The gain selector beats ports of MVSelect and of a camera scheduler, both of which do worse than taking turns. The one deployable policy that beat taking turns was hand-written, follow the last sighting, by 0.23 % [0.12, 0.33]. Is the training simply unable to find gains? On a control task where one feed at a time reports every opponent, the same training recovers 69 % and 70 % of the gap between the rotation and all five feeds. The machinery finds a gain where one exists; on the real task there is little to find.

4 Where the skill comes from

Most opponents have not been seen by anyone yet, and much of the observer's skill does not depend on sightings.

Per opponent, frames help most where they show something: on opponents in view, the rotation lowers the Brier score from 0.83 (the prior) to 0.37, and all five feeds to 0.07 (Figure 5). But opponents nobody has seen in the round hold 72 % of the region-steps with an opponent. With every purchased frame that showed an opponent withheld, the observer keeps 62 % of its improvement over the prior at one frame per step; with no frames at all, only 7 %. One reading, examined on the development map only, is that the frames tell the observer where its own teammates are and look.

Brier score on occupied regions by how recently any teammate saw the opponent: in view now, the prior scores 0.83, the rotation 0.37 and all five feeds 0.07; for opponents never seen this round all policies sit between about 0.6 and 0.7.

Scroll sideways to see the whole chart.

Figure 5. Where the error sits. Brier score on region-steps that hold a living opponent, split by the time since any teammate last had that opponent in view, a reference that does not depend on which frames a policy bought (lower is better; seven held-out maps).

Where sightings exist, they are kept and used. Withholding the purchased frames that showed an opponent hurts by 4.76 % [4.29, 5.30] more than withholding as many frames without one (all five feeds), and shuffling the order of old frames hurts too. The memory holds a sighting for seconds (Figure 6): the probability on the opponent's true region falls from 0.85 while in view to 0.58 a quarter of a second later, 0.39 after one to two seconds and 0.22 after four to eight, while a recurrent state alone puts 0.18 there even at the moment of the sighting.

Mean probability on the opponent's true region against time since the last sighting: the main observer starts at 0.85 and decays over about eight seconds toward 0.2; the recurrent state alone and the observer with sightings withheld stay near 0.15 throughout.

Scroll sideways to see the whole chart.

Figure 6. How long a sighting stays in the belief. Mean probability on the region an opponent is really in, by time since that opponent last appeared on a purchased frame (rotation, one frame per step; thin lines: single maps). The last column holds opponents never shown. Descriptive.

5 From pixels

Read from raw video on a held-out map, about half of the improvement survives; with this encoder and frame size, perception is what limits the system.

The visual track repeats the study on raw frames for the one held-out map that has them, de_mirage (5 test matches). A frozen DINOv2 encoder and a small cross-fitted adapter turn each purchased frame into an evidence token for an observer of the same design, trained on those tokens. One frame per step lowers the prior's Brier score by 4.30 % [3.26, 5.35], and video keeps 58.2 % [50.1, 66.6] of the improvement that label tokens of the same frames give (46.9 % with all five feeds). Thirty-two hypotheses were frozen for this track: 26 were confirmed, none refuted and 6 stayed inconclusive.

Table 1. Selected hypotheses of the visual track, held-out map de_mirage. With one map, a verdict needs the bootstrap interval and, where the statistic has one, a Student-t interval over matches to agree.
StatementEstimate95 % intervalVerdict
V2 One frame per step beats the prior, which sees nothing−4.30 %[−5.35, −3.26]Confirmed
V5 Video keeps more than half of the label-token improvement58.2 %[50.1, 66.6]Confirmed, narrowly
V3 Frames score worse than label tokens of the same frames+3.33 %[+2.61, +4.08]Confirmed
V6 Memory beats no memory, one frame per step−1.30 %[−2.00, −0.69]Confirmed
V7 Memory beats no memory, all five feeds0.00 %[−0.55, +0.53]Inconclusive
V21 All five feeds and the rotation agree within ±1 %0.00 %[−0.35, +0.39]Confirmed
V25 The gain selector and the rotation agree within ±1 %0.00 %[−0.27, +0.26]Confirmed

Three things weaken on video: more feeds add almost nothing the observer can use, sightings carry little, and memory helps only where frames are scarce. At 1 % false alarms the adapter flags only about a third of the frames that show an opponent, who is often a few pixels wide at this size, while it reads the camera player's own region far more reliably. Run decision by decision from the original video on one RTX 4070 Ti, one frame per step costs 7.9 ms of GPU time and all five feeds 13.3 ms, both far inside real time; on one desktop GPU the saving is throughput, not feasibility.

6 How it was tested

Everything was designed on one map. The claims, the commands and the rule that decides each claim were frozen in code before seven other maps were scored.

A hypothesis is confirmed when its pooled 95 % interval satisfies the stated rule and at least six of the seven held-out maps agree in direction, refuted when the interval lies entirely on the other side, and inconclusive otherwise. There is no adjustment for multiplicity.

  1. Development

    All design, tuning and early tests ran on de_dust2, whose numbers are never evidence. An automated adversarial review attacked the leakage guarantees: it found 12 defects, all fixed before the freeze, and no path by which unselected views, future frames or labels reach a model.

  2. Freeze

    31 hypotheses, 3 manipulation checks, the exact command for every map and the decision rule written into code. Code identity da134a736845498b, a digest of the package sources that every stored result row carries.

  3. Seven held-out maps

    One registered training run per map, scored on 37 test matches (1,228 episodes). No occupancy model, policy or diagnostic had been run on these maps before.

  4. Visual addendum

    32 hypotheses for raw video on de_mirage, frozen before its visual run started, and analysed once when it finished.

  5. Analysis, once

    The frozen analysis ran once on the complete set: all 31 hypotheses and the 3 checks came out as stated, and the control task passed on both of its maps. One map, de_mirage, had been analysed alone when it finished, about an hour after the freeze.

  6. Two more runs per map

    An exploratory replication, specified before the runs: every held-out map trained twice more with other seeds and analysed once. Both new runs repeat 32 of the 34 verdicts; the two others, the equivalence of the full memory and the evidence memory alone, are inconclusive with one of them.

All times are on 2 December 2026. The repository's ledger records every run, including killed and discarded ones. Five reviews, each by a separate automated reviewer with read-only access, checked the leakage guarantees, the hypothesis list, the text against the result files, and the replication analysis before it ran.

7 Limitations

  • Labels stand in for perception in the main results, and the label token carries health and flash state that a frame does not show. The visual track covers one held-out map with five test matches.
  • One registered training run per map. The two further runs are exploratory; the control task and the visual track rest on one run each.
  • Choices made with development results in view. The evidence memory, the early-stopping rule and the rewritten hypothesis list preceded the freeze but followed results on the development map.
  • Selection with a fixed observer. Joint training of observer and selector was tried on the development map only; a stronger selector might find gains this one does not. The ported selection methods are re-implementations.
  • One data release and a coarse target. All matches come from one release of professional play on eight maps, and the target is occupancy of 64 regions.

8 Code and data

The repository jamesliuai/cs2-hidden-opponent-prediction holds the replay environment, the models and baselines, the frozen protocol, the stored results (aggregate scores and intervals), the analysis, the reviews and a ledger of every run; its 166 tests pass against the frozen code. It does not contain the dataset: the scripts download what they need from the pinned revision and record the hash of every file they read. The only media that show its frames, or positions from its labels, are a few credited videos and images, listed in the data notice.

  • The technical report: question, method, results, related work and limitations.

  • reports/REPORT.md full report

    Every hypothesis with its per-map results, every table and figure, and the disclosures.

  • reports/PROTOCOL.md frozen protocol

    The hypotheses, commands and decision rule as frozen before the held-out maps were scored.

  • Every run of the study, with its command, code identity and outcome.

Quick start

git clone https://github.com/jamesliuai/cs2-hidden-opponent-prediction
cd cs2-hidden-opponent-prediction
python -m venv .venv
# activate: .venv\Scripts\Activate.ps1 (PowerShell) or source .venv/bin/activate
python -m pip install -e ".[test]"
python -m pytest
python scripts/build_report.py

Python 3.11 or newer. The tests and the report need neither the dataset nor a GPU: the report is built from the stored result files alone. Running the experiments again needs the pinned download (about 15 GB for the label-token track), a CUDA GPU with 12 GB and about 32 GB of RAM; the README lists every step.

9 Credits and licences

Data and game

Recordings and labels come from CounterStrike-Dataset by Anirudhh Ramesh (Ramesh, 2026), released under CC BY-NC 4.0. The clip on this page shows its frames, resized and composited with the model's output, for non-commercial use with the credit line above. Thanks to Anirudhh Ramesh for releasing the dataset.

Counter-Strike 2 and its assets are the property of Valve Corporation. This is an independent project, not affiliated with or endorsed by Valve.

The visual track uses DINOv2 (Oquab et al., 2024), downloaded at run time. MVSelect (Hou, Gould and Zheng, 2024) and the camera scheduler of Sharma, Anand and Kaul (2022) are re-implemented as baselines.

Licences

  • Code: MIT.
  • Technical report, full report, figures, result files and the text of this site: CC BY-NC 4.0, attributed to James Liu.
  • Media that show dataset frames or positions from its labels (the clip, its poster and the link-preview image; Figure 1 of the technical report; the demo videos, stills and audit sheets in the repository): CC BY-NC 4.0, under the dataset's terms and with its credit line.

These grants cover only rights James Liu holds. They grant nothing in the dataset or in Valve's assets.

Citation

@misc{liu2026hiddenopponents,
  author = {Liu, James},
  title  = {{CS2} Predicting Hidden Opponents with a Limited Budget
            of Teammate Frames},
  year   = {2026},
  note   = {Technical report, release v1.0.0},
  url    = {https://jamesliuai.github.io/cs2-hidden-opponent-prediction/}
}