STEAM GROUP
Perfect Nav Mesh p_NM
STEAM GROUP
Perfect Nav Mesh p_NM
6
IN-GAME
43
ONLINE
Founded
June 12, 2013
Language
English
tomgor Jun 12, 2014 @ 11:35pm
About CS:GO Bots and how to make them more challenging
I am not going to tell you why bots are a nice add-on for CS. Michael Booth of the Rock Turtle Studios has explained that well enough in several interviews. You may also wish to study that article:
http://files.aigamedev.com/insiders/GDC2004_Booth_Michael_The_Official_Counter-Strike_Bot.pdf
https://www.dropbox.com/s/ykexusl5ew710kh/GDC2004_Booth_Michael_The_Official_Counter-Strike_Bot.pdf

You have probably noticed that CS:GO bots seemed to be not so lethal as their Source older brothers. But we can adjust several parameters in botprofile.db file to make them more challenging - mainly better aiming, better looking around when searching for enemies and when attacked, and having the same as ours or slightly better reaction times, even if not necessarily smarter than default CS:GO Expert bots (bot_difficulty 3). You can make the CS:GO bots as challenging as their CS:S brothers. You will find the botprofile.db example containing truly challenging bots (only at Expert level), in the end of this article. But first let's learn more on bots.

There is one parameter responsible for smartness in botprofile.db file located in main CS:GO folder and that is "Skill". Set it to 100, and your bot will be the smartest one (can't be any smarter), providing the nav mesh is of top quality. But without good nav mesh, "Skill = 100" does not mean much, if anything at all. Nav mesh can make a huge difference for the experience of playing with bots.

So, if we can't make them any smarter than that, and we kill them all easily, let's make them fast, possibly faster than we are, so we have to stick to these basic rules to survive encounters with bots and/or win:

1. Be the first to see the enemy and open fire.
2. Try to headshot - one shot one kill rule.
3. Try to stay 1 vs.1 in a gunfight (which means need to retreat sometimes)

While it is not comparable to playing with humans, it still requires some mental effort, cause we have to outsmart the bots, and some tactics remain important. Mind, that bots have been equipped with some kind of thinking substitutes - for example, once one of the enemy bots has seen you, for next few seconds all enemy bots can see you through walls and other obstacles (approx. as long as you are visible to enemy as a red dot on their radar). They can also hear you and mark your probable location (several nav mesh tiles, in the area where you might be located).

So, let's start with reaction time - they should have similar reaction time as ours or slightly only better (first measure your own one at http://www.humanbenchmark.com - so you have a reference before setting reaction time of your bots - I have set 0.22 second).

ReactionTime = 0.22

(There is another parameter - AttackDelay - it serves to compensate for a bots lack of ping. 50ms is standard server ping, but default value of AttackDelay is 0 for offline practice with bots)

Each bot can have its own Skill and Reaction Time.

Now, let's talk about aiming. There are 4 parameters:

AimFocusInitial = 0.6
this is initial focus spread in degrees (from desired center)

AimFocusDecay = 0.03
this is how much focus shrinks per second (.25 = 25% of size after 1 sec)

AimFocusOffsetScale = 0.016
this parameter controls accuracy when tracking to target (0 == perfect, should always be < 1)

AimfocusInterval = 0.016
this parameter controls how often focus is adjusted (smaller intervals means better movement tracking)

Each bot can have its own aiming skills.

The smaller those values are, the better aiming skills. If you feel the bots are still inferior to you when aiming skill are considered, try 0.001 for all of the above parameters. Good luck! :-)

Next on the list are looking around and forward parameters. Let's start from a basic explanation, that a bot has a head with a spring/damper system instead of his neck - it is just like a suspension in a car. If you hit a bump, the wheel will go up with certain accelaration, but how quickly a body of the car reacts and goes up depends on the spring. And we all know what damper is for, don't we? To damp oscillations. And this is exactly how it works with bots. The bottom (base) of their neck (a wheel in the car from above example), will move to the new intended position (regarding center of their field of vision angles) when so commanded, with a defined acceleration:

LookAngleMaxAccelNormal = 3000.0 (when not engaged)
LookAngleMaxAccelAttacking = 4500.0 (when engaged)

But how quickly bot's head (body of the car from the example above) follows and when and how it reaches the new intended position depends on these spring ... :

LookAngleStiffnessNormal = 150.0 (strenght of the spring when not engaged)
LookAngleStiffnessAttacking = 225.0 (strenght of the spring when engaged)

... and damper, parameters:

LookAngleDampingNormal = 30.0 (damping effect when not engaged)
LookAngleDampingAttacking = 50.0 (damping effect when engaged)

Note, that If a bot is hit by bullets in his head (and or body), its head may deviate from the intended position (and center of field of vision angles) and the about parameters define how quikly head returns to intended position and aiming starts. The damping should be set to minimum allowing for avoidance of oscillations. If it is set too high it would make the bot head movements slower.

The best way to learn the optimal values is to play with above given LookAngle values. For the beginnig, to see how it works, you may wish to change one LookAngle parameter (for example LookAngleDampingNormal and/or LookAngleDampingAttacking) by factor or 10. In this case try how it works with a very small damping effect like 1, 2 or 5.

Those parameters are global - default for all bots - you can not make them individual for each bot or template.

Finally each bot can have its own personality by selecting certain values of:
Aggression (0-100)
Teamwork (0-100)
Those are self-explanable, but I will add that, depeding on their weapon preference, you probably don't want a sniper to be very agrresive. It allows to create certain simplified types of "personality".

Of course you can also change weapon preferences.

To better understand the way a bot is "thinking" use the following:
sv_cheats 1
bot_debug 1
Open console for addditional info on "bot's brain processing".

You could also use "nav_show_danger 1" to see the danger value assigned at given time to nav mesh polygons. The "danger" value and bot's morale makes a bot to select different paths each round.

You may wish to check out and possibly - try out the bots I like to play with:
https://www.dropbox.com/s/s5ncmii8grtpjbu/botprofile_by_tomgor.db
Once downloaded you should change the file name from botprofile_by_tomgor.db to botprofile.db and put it into main csgo folder. You may also wish to save original botprofile.db to botprofile_original.db.
NOTE: Play only with Expert bots (bot_difficulty 3) please. Mainly they have been improved in the provided botprofile.db file.

You may also wish to change radiopanel.txt file to this custom one: https://www.dropbox.com/s/o98722zq3v6v3mb/radiopanel_by_tomgor.txt
for few more radio commands. You will find it in resource/ui folder. Don't forget to change the file name to radiopanel.txt .
Last edited by tomgor; Mar 6, 2015 @ 1:44am