CS2 Neural Agent (dhaiwat10/cs2-ai)

Two-stage neural Counter-Strike 2 aim-and-fire agent trained exclusively on ArnieRamesh/CounterStrike-Dataset (CounterStrike-1K), running closed-loop at 60 FPS in CS2 (-insecure offline aim_botz mode).

Included Checkpoints

File Architecture Size Training Data Key Metrics
pose_detector_v2_best.pt YOLO11s-pose (1 class player, 1 keypoint: skull/eyes center) 19.7 MB 14,000 images (10k real pro frames across 12 masked shards / all 7 CS2 maps + 4k multi-scale 34–245 px copy-paste aim_botz frames with ledge occlusion), 30 epochs, pose=24.0 98.01% skull-hitbox hit rate (97.03% on far bots <60 px, 1.08 px median head error), Box mAP50-95 = 0.930, Pose mAP50-95 = 0.995
aim_policy_v2_best.pt AimFirePolicy (2-layer GRU, hidden_dim=256, seq_len=8) 3.3 MB 60,000 pro combat sequences (51,724 engaged: 28k snap, 30.3k moving-target tracking, 26.6k firing + 8.3k negatives across 21 pro matches / 4,394 clips) yaw_MAE = 0.542° (moving_target = 0.799°), pitch_MAE = 0.189°, 91.04% directional accuracy, 0.897 fire F1

Offline Stratified Evaluation (pose_detector_v2_best.pt @ 640×384 FP16)

Evaluated on 464 validation frames (1,271 bots) with CS2 skull radius = 0.065 * gt_box_height:

Bot Distance Stratum GT Recall Head MAE (px) Median (px) Skull Hit % Effective HS %
Far (bh < 60 px) 413 97.82% 1.22 px 1.08 px 97.03% 94.92%
Mid (60 <= bh < 110 px) 398 100.00% 1.74 px 1.38 px 97.74% 97.74%
Close (bh >= 110 px) 460 98.91% 3.49 px 2.99 px 99.12% 98.04%
ALL 1,271 98.90% 2.21 px 1.56 px 98.01% 96.93%

Live Closed-Loop aim_botz Performance (720p @ 60 FPS, AK-47 Only)

  • Stationary bots (bot_stop 1): 12 kills / 30s (24.0 kills/min, including 4 headshots in 2.15s), ~11–13 ms fused FP16 CUDA Graph detection on NVIDIA L4.
  • Moving / strafing bots (bot_stop 0): 10 kills / 18 taps (55.6% 1-tap efficiency on moving targets) using aim_policy_v2_best.pt + EMA angular velocity lead.

Usage

git clone https://github.com/Dhaiwat10/cs2-ai.git
cd cs2-ai
hf download dhaiwat10/cs2-ai --local-dir weights

Run offline evaluation or live in CS2 (-insecure offline practice servers only):

python live/play_cs2.py \
  --detector weights/pose_detector_v2_best.pt \
  --policy weights/aim_policy_v2_best.pt \
  --duration 30 --fps 60 --conf 0.24 --head-y-bias 0.055 \
  --sector-deg 105 --clamp-sector --sweep-360

Disclaimer: For offline research and bot practice (-insecure) only. Never run automated input tools on VAC-secured or online servers.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train dhaiwat10/cs2-ai