A Counter-Strike 1.6 AI you can play in the browser

Play 15 rounds, one against one, with an AI model that sees only the screen and reacts 160 ms late.

Play

What is this?

A free browser game where you play Counter-Strike 1.6 one against one with an AI model. A match is 15 rounds on the small duel map aim_map. There is nothing to install and no account.

How does the AI play?

It sees only the rendered game screen, the same picture a player sees, and outputs mouse and keyboard actions: turning, moving, firing, jumping, ducking and reloading. It makes 25 decisions per second and its turning speed is capped at 1200 degrees per second. It does not read the game's memory or the enemy's position.

Is it a fair fight?

It is meant to be. Every frame reaches the model 160 ms late, which is close to human reaction time, so it cannot react instantly. An earlier version with no delay fired about 0.16 seconds after first seeing an enemy, faster than any person.

How was the model trained?

With reinforcement learning (recurrent PPO) on a small convolutional network with an LSTM. It learned by playing a very large number of duels against scripted opponents and YaPB bots in a patched open-source engine that runs faster than real time. Training started on a Mac Mini at home; the last stretch for the current model ran on a rented GPU.

How good is it?

In its final exam of about 2,000 rounds, the current model (update 35450) won 73.4% of rounds against the expert YaPB bot, 84.4% against the medium bot and 69.2% against a scripted opponent that strafes and shoots back.

Where does the game run?

On your own computer. The game engine (Xash3D FWGS compiled to WebAssembly) and the AI model (ONNX Runtime Web, on WebGPU where available) both run inside the browser tab. There is no game server.

What do I need to play?

A desktop or laptop with a mouse and keyboard and a recent browser. It does not work on phones or tablets.

Is anything saved?

The final score of each finished match is saved without a name. You can share your result as a link that shows a score card.

Is the code open source?

Yes. The training code, the engine patch and the exam results are on GitHub at github.com/Dhaiwat10/counterstrike-ai, and the model weights are attached to its releases.

Is this affiliated with Valve?

No. Counter-Strike is a trademark of Valve Corporation. This is an independent research project.