Counter-Strike 1.6 AI (delay160-u35450)
A Counter-Strike 1.6 reinforcement learning model that plays 1v1 duels on aim_map from raw pixels with mouse and keyboard outputs and a 160 ms human-like reaction delay.
This checkpoint (update 35450, release aim_map-delay160-lethal-update35450, 64.94M training steps) is the model running live in the browser arena.
- Codebase: Dhaiwat10/counterstrike-ai
- Live Browser Arena: cs.dhaiwat.com
Files
| File | Format | Description |
|---|---|---|
delay160-u35450.pt |
PyTorch | Trained checkpoint (checkpoints/lethal_box1_exam/u35450.pt) for local evaluation and play via train.duel |
delay160-u35450.onnx |
ONNX (fp16) | Inference-only single-step graph for browser WebGPU / WASM (onnxruntime-web), SHA-256 33e3f4cb96c701d1e94862019caa6d42198e4cee4ef9e35e0f5ed77e3fae581d |
delay160-u35450.meta.json |
JSON | Model architecture, input/output metadata, and SHA-256 checksum used by the browser runner |
Architecture & Controls
- Policy: IMPALA-style dual-stream CNN + 512-unit LSTM, trained with recurrent PPO (
train/ppo.py). - Inputs (pixels only):
- Periphery view:
160x120RGB (uint8) downsampled from640x480 - Fovea crop:
80x80RGB around the crosshair, stacked across 2 consecutive decision steps (6channels) so the model can estimate target velocity and lead moving opponents - Own action & movement history: last
8steps (act_hist=8,move_hist=true)
- Periphery view:
- Reaction delay:
160 ms(4 steps at 25 Hz) - Outputs (25 Hz, turning capped at 1200 deg/s): MultiDiscrete heads
[21, 11, 3, 3, 2, 2, 2, 2, 2]foryaw,pitch,fwd,side,attack,jump,duck,walk,reload(active heads:yaw,pitch,attack,fwd,side).
Evaluation Results
Final exam (~2,000 rounds per model, both spawn ends pooled, greedy play at 160 ms delay), compared against the previous checkpoint (update 31800):
| Opponent | Update 31800 | Update 35450 |
|---|---|---|
| Scripted opponent that strafes and shoots back | 39.6% | 69.2% |
| Strafing target that does not shoot (median TTK) | 89.2% (2.97 s) | 99.2% (0.91 s) |
| Scripted peeker that jiggles in and out of cover | 65.0% | 77.5% |
| Scripted peeker, medium | 76.7% | 85.8% |
| Roaming YaPB bot, expert | 65.7% | 73.4% |
| Roaming YaPB bot, medium | 76.2% | 84.4% |
| Roaming YaPB bot, easiest | 95.6% | 95.6% |
| Easiest scripted peeker | 97.5% | 99.4% |
| Holder at spots taken from the owner's play | 79.5% | 85.0% |
| Holder on the raised stone steps | 78.5% | 91.0% |
| Aim arena (enemy placed in view), kills | 95.3% | 93.0% |
Usage
Play locally against the PyTorch checkpoint using Dhaiwat10/counterstrike-ai:
PYTHONPATH=$PWD .venv/bin/python -m train.duel --real --delay 0.16 --snapshot delay160-u35450.pt
PYTHONPATH=$PWD .venv/bin/python -m train.duel --client
License
Project code and weights are released under GPL-3.0-or-later. Counter-Strike game content belongs to Valve Corporation and is not included.