A recent update has given bots in CS:GO deathmatch improved AI! Rather than to run about looking
for the next person to shoot like a Call of Duty player would, they’ll now play smarter,
running to key locations, listening out for sounds, and remembering where they saw enemies
last! I believe this was done to help them to behave
in a more human-like manner to make playing with or against them more enjoyable. Or more
difficult. Why not both. AND it could possibly be to prepare them for the next Operation
that will come out next week I WISH. If you fancy playing against them yourself, you can
right now in deathmatch mode. So how has their behaviour changed?
Perhaps the most NOTICEABLE adjustment-although not the most exciting- is how they now take
3 seconds to buy a weapon after spawning. This pause is obviously to imitate the time
it takes for players to choose a weapon to play with, and will likely serve to cut down
on the number of human players who are unfairly shot in the back by a freshly spawned AI player.
So although this change in behaviour isn’t something to get that excited about, it’s
important that we’ve covered it. Now to move onto the more interesting behaviours.
Their aim has been made to look a lot more natural. They often overshoot when turning
corners, ending up looking into walls or at the floor. This accurately mimics a player
who’s not quite used to his mouse’s sensitivity, or who has something else on his mind when
warming up for a competitive match! Valve really have thought of everything. Their behaviours
with different weapons and at skill levels is available in this bt_config.kv3 text file
if you’re interested in taking a look. They treat various types of weapons differently
from one another- since firing them optimally requires different sets of rules. For instance,
they won’t use shotguns and rifles in the same way as one another. But there are still
limitations- they’ll still only use secondary fire with the revolver, and won’t use the
SG or AUG’s scope, though Bez believes it could be possible with future additions to
the text file. With the sniper, sometimes they zoom in and
remain zoomed in as they run around for a bit, which also mimics some real players that
I’ve seen. And they also stop scope flick shoot! And they still struggle to keep up
with players who are moving- so as long as you remain on your toes you should be able
to out-smart bot snipers. Though with adjustments to the text file this could also be changed.
From my own observations about them, after they’ve seen you, they take a moment to
start firing (how long depends on their difficulty level) and they continue firing after the
enemy has died instead of immediately seeking out their next target. Again, mimicking human
reflexes. Intentional or not, their delayed reflexes can often lead to a fair few wallbangs,
so maybe it’s best this is kept in. Some of the tap shooting they do is extremely
authentic, but the spraying itself looks horribly fake. As you know, weapons in CS:GO have a
recoil pattern and the bots trace this perfectly, which can look very odd at times as their
view shoots down unnaturally- not dissimilar to an aimbot, really. I guess that’s literally
what it is in this case! This ‘flick’ gets worse the larger the gun’s recoil patterns
are- so it’s particularly noticeable with guns like the SG and AUG. I don’t think
the shooting is going to fool anybody, but the bit before and the bit after might.
From my observations, the new AI also spends more time hunting players that they’ve previously
seen or heard- even going as far as to look away from spots you’d normally expect enemies
to come from in deathmatch mode. I’d sometimes ask myself where they were going, before looking
at the minimap and realising that an enemy was lurking just around the corner there.
But it’s dangerous to try and assess AI just from observations- AI gets very complicated.
I could be interpreting some of their actions as intentional when actually just a result
of coincidence. It’s this uncertainty with AI that can make testing it difficult. For
an example of this, take the game Aliens: Colonial Marines, which shipped with a one-letter
typo in the AI script. This went undetected for YEARS, until discovered by a player. Fixing
this made the Alien AI much smarter, allowing them to flank and to ambush the player! So
to make sure we’re not missing anything, let’s look at the science behind the AI
to see what’s going on. The Youtube channel, AI and Games, has an
excellent video showing how AI in Half Life works, using Finite State Machines and how
that sort of thing was eventually superseded by goal-oriented action planning systems.
Really worth a watch. But if I had to summarise, I’d describe the bot AI systems as a glorified
flow chart, where certain choices and actions are allowed under certain conditions- the
intention being to make them behave realistically, and within the constraints of what they are
within the digital world they inhabit. Bez the Bot Whisperer showed me the
cv_bot_ai_bt_debug_target -1 command. This shows the inner thoughts of
one of the bots on the server. It displays dozens of different titles across the screen,
in various, changing colours. This is how a bot in CS:GO thinks. Some of its options
are disabled at certain times- it can’t for instance, fire and reload at the same
time. Or- I don’t know… it would get complicated to try and explain, plus I don’t really
know how it works myself. Honestly, I didn’t find looking at this information too useful
in working out how the bots behaved. For this, let’s go DEEPER, into the scripts folder
for CS:GO. This one in particular- inside these files
is all sorts of cool stuff. And yes, it can be changed.
For a start, here’s the 3 second buy time delay… so you could make that longer or
shorter if you wanted to. But more interestingly, there’s talk of
MEMORY. They don’t just run about, shooting when they see things. They remember sounds
that they’ve heard, or enemies that they’ve spotted but then lost again. They might get
distracted by a firefight, but after all that’s over, they’ll check their memory to see
if there’s anything else they should be investigating, which certainly explains why
they sometimes start running off somewhere odd even when no enemy’s there anymore.
Don’t expect anything too genius from them, though- their short-term memory is 3 seconds
long, and their longterm is 10. And they forget they’re in a fight after .7 of a second!
A goldfish could do better. And if I’m not mistaken, their memory for
stuff they’ve seen only extends up to 1500 units… while their audio extends to 3000.
Maybe sight trumps an audio memory, but they fall back to hearing if they’re truly out
of things to do. Also, there’s a minimum audio range of 400,
so in theory if you’re closer than that, but behind them, then you can do whatever
you like and they won’t know you’re there unless they turn around and see you!
It’s interesting that there’s a branch for healing if their health is below 60. Could
Valve be preparing an operation where bots could serve as companions?! You heard it here
first. Unless you watch Bananagaming, who suggested the same thing over a week ago.
And last, if they don’t know what else to do and there’s nothing in their memory banks…
they resort to hunting areas for enemies, randomly chosen between the bombsites and
the spawn sites. This should hopefully- on average- move them all towards the more important
locations of the map, before running between them if they find nothing of interest at one.
This is shown nicely here, with 2 bots on the server and sped up 16x.
The improvements to the AI are welcome, but it’s worth mentioning the limitations of
these AI systems. They’re still based on ‘Behaviour Trees’, as opposed to Neural
Networks- which is that cool new technology where computers learn from information they’re
fed, surpassing the limitations of human-coded designs. I’m actually a little bit surprised
this wasn’t done here, since I thought if anybody would do this, it would have been
Valve. Just last year, during a presentation, Valve
explained how they had 64 blade servers running 24 hours a day to crunch through the 600,000
or so 5v5 matches played on CS:GO daily. They were doing this to scan for suspicious player
activity, whereupon the suspected player would be automatically submitted for judgement from
the overwatch system. Scanning such a colossal quantity of matches
requires 1,667 processors to be on 24 hours a day. All of this is in place, scanning how
every player in Counter-Strike behaves… it seems like the PERFECT system to train
bot behaviour on! Plus the irony of it would be that they could use something intended
to detect humans using bots in order to create bots which behave more like humans. But it
doesn’t seem like they’ve done this just yet.
This kind of thing is possible- an experimental branch in EA created self-learning AI bots
for Battlefield 1! They still acted a bit silly at times, but it’s a solid attempt
to create AI for a sophisticated game, and I do think is the future of gaming, as it
will bypass many of the limitations of traditional AI systems. Who knows what the future will
hold for Counter-Strike’s bots? One thing’s for sure: Bez the Bot Whisperer will be ready
for it. Thanks to him for helping me with this video. Once again his knowledge and enthusiasm
for non-human players has helped me no end. Check out his youtube channel here, and thank
him if you enjoyed this video. Don’t forget to subscribe to him!