TEOH KAI SHUN VOL. 4 · 33⅓ RL AGENTFOR ANFPS GAME強化学習 It found a strategy. Just not mine.

A robot arm with a rifle

completed
My own question

A final-year project I proposed myself at King's, supervised by Prof. Agi Kurucz. Can an agent learn to play Counter-Strike well, through the real game client, and play like a human rather than like the game's bots?

The reduction

A 1v1 post-plant round is two problems at once, positioning and a risk trade-off (avoid the enemy, or duel). Framed that way it is a robotic control task in 3D space, so goal-conditioned methods from robotics should carry over.

Why not imitation

The closest prior work imitated humans, partly because it assumed there was no live game-state API. Imitation only reacts, with no planning and little exploration. Game State Integration showed the API was there.

continuedつづく

Three machines, one agent

completed
The split

Three laptops over sockets. The Agent learns, the Player turns actions into mouse and keyboard and runs YOLOv5 enemy detection, and the Spectator streams the full game state.

Two views

An asymmetric actor-critic, from sim-to-real robotics. The critic sees everything; the actor sees only what a player could.

No reward shaping

DDPG with Hindsight Experience Replay and a sparse reward, +1 for a win and −1 for a loss, over the game's two win conditions.

Seeing

YOLOv5 for enemy detection, about 60 fps on the player machine against 16 for the first approach.

continuedつづく

39 out of 100

completed
The exploit

Over 100 rounds against the built-in bots it won 39. It had learnt that bots aim slowly and turn cautious under fire, so it kept moving and fired now and then to run the clock down.

The critique

Hard-coded mouse moves limited exploration, there was no sound and no "shot from where" cue, and five days of training on one game instance wasn't enough.

the end完