Cleanup is going to take awhile, so the site is back up but editing has been disabled.

CSS Bot Debugging

From HalfLife 2 Knowledge Base

Jump to: navigation, search
free samsung ringtones zoloft ativan online levitra qwest ringtones free mp3 ringtones free samsung ringtones free real ringtones cheap lortab free alltel ringtones hoodia cheap zyban alprazolam online wellbutrin online didrex online sagem ringtones nexium online lorazepam online clonazepam online cheap meridia free cingular ringtones free midi ringtones meridia online celexa online lisinopril online but sildenafil mono ringtones midi ringtones nexium online nokia ringtones buy xanax didrex online rivotril online free samsung ringtones tenuate online diazepam online diethylpropion zoloft online midi ringtones xanax online cheap propecia cyclobenzaprine online wwe ringtones free qwest ringtones music ringtones ultracet online free sonyericsson ringtones cheap hoodia free sonyericsson ringtones free free ringtones meridia online free cool ringtones phentermine online buy adipex cheap paxil adipex online mtv ringtones wwe ringtones tramadol online cheap phentermine cheap ortho norco online cheap phentermine buy zoloft adipex cheap clonazepam didrex online mp3 ringtones clomid rivotril free alltel ringtones free funny ringtones cheap pharmacy online online levitra samsung ringtones free mtv ringtones viagra online cheap levitra cheap valium cheap vicodin soma online free sonyericsson ringtones free sagem ringtones norco online phentermine online lorazepam online cheap zanaflex free kyocera ringtones sharp ringtones cheap propecia free sharp ringtones free samsung ringtones prozac online cheap valium free mp3 ringtones zyban online mono ringtones free ericsson ringtones buy cyclobenzaprine free sagem ringtones funny ringtones viagra online alprazolam online free mp3 ringtones celexa online phentermine online free funny ringtones cheap levitra tramadol online sildenafil online cheap wellbutrin cheap wellbutrin order lorazepam zanaflex pharmacy online online cheap norco cheap adipex real ringtones cheap propecia cheap hydrocodone free sony ericsson ringtones free kyocera ringtones cheap didrex motorola ringtones cheap meridia ativan online propecia online fioricet online sagem ringtones cheap levitra carisoprodol online order lorazepam jazz ringtones mono ringtones sony ringtones free free ringtones free online pharmacy carisoprodol online pharmacy online online cheap viagra real ringtones free punk ringtones free sony ringtones lorazepam online didrex online free qwest ringtones punk ringtones buy zanaflex free alltel ringtones free real ringtones norco online cyclobenzaprine cheap lisinopril cheap carisoprodol ericsson ringtones buy zyban punk ringtones phentermine online lisinopril online vicodin cingular ringtones zanaflex online cheap sildenafil cheap valium vigrx online cheap norco zoloft online pharmacy online online albuterol online verizon ringtones mp3 ringtones order wellbutrin music ringtones rivotril buy lorazepam free punk ringtones cheap wellbutrin free sprint ringtones diazepam online carisoprodol online music ringtones cheap nexium pharmacy online online order vigrx online zanaflex flexeril nextel ringtones paxil online order hoodia free sonyericsson ringtones soma online free real ringtones lortab free music ringtones mtv ringtones cheap clonazepam qwest ringtones buy sildenafil buy tramadol paxil online

Contents


If you are a mapper or coder, debugging the CS:S bots might be helpful to you, but it's mainly just interesting to watch the inner workings of the computer as it plays through a map. Note that most of this information is educated guesswork and might be completely wrong, since there's no way to prove it without having direct access to the source code.

Activating Debug Mode

  1. Load up CS:S and bring up the console (the ~ key by default). Enter "sv_cheats 1", followed by "bot_debug 2".
  2. Start a CS:S server with a password on it. Set the number of bots to whatever you want (they will be split evenly between Ts and CTs), and uncheck the box "Bots join after a player joins".
  3. Upon entering the server, choose "Spectate" as your team, and use the primary fire button to rotate through the bots.

The Debug Display

When debugging a bot, something like the following text will appear on-screen:

Skill = 100

ALERT
State: Hunt
Task: SEEK_AND_DESTROY
Disposition: ENGAGE_AND_INVESTIGATE
Morale: EXCELLENT

LookAt: Last enemy position (LOOK_AT_SPOT)
SteadyView: YES
Nearby friendlies: 4
Nearby enemies: 2

911.5 SetLookAt( Face outward ), duration = 3.000000
911.5 SetLookAt( Encounter Spot ), duration = 0.000000
911.8: Repathing to stay with leader.
STUCK
911.97: Grenade: THROW COMPLETE
912.0 SetLookAt( Approach Point (Hiding) ), duration = -1.000000

The top two sections will remain pretty much the same, while the bottom section rapidly scrolls through the console spam generated by bot_debug. The next section will tell you what the indicators in the top sections mean, and what possible values they can have.

Bot Indicators

Note that this section is somewhat incomplete, and only includes values that can be generated by DE maps (which is most of them, anyway).

Skill

The "Skill" value at the very top of the debug display is simply an arbitrary measure of the current bot's skill, on a scale of 1 to 100. Skill tends to affect the steadiness of a bot's aim (how often they hit their target), and the time it takes them to react to certain circumstances (like turning around when they hear gunfire behind them). Values for each bot are permanently set when the game starts and are not recalculated until the map rotates or gets reloaded. Maximum skill level is determined by the "Bot Skill" radio buttons when starting a server; the actual skill level of any given bot is usually within 10 points of the maximum.

ALERT, PANIC, and BLIND

These indicators appear in the space above "State" when they are active, and disappear completely when they no longer apply.

  • ALERT indicates that the bot is in a heightened state of awareness; they are more likely to notice combat-related events and will react to such events with greater speed. Alert bots are also slightly more cautious in their actions. All bots start the round in a non-alert state; the state is triggered if the bot in question witnesses a combat-related event or hears a loud noise nearby. It will remain active so long as the bot has evidence that combat is occurring in the area or has occurred recently. ALERT will shut off if no combat has been detected for a while, but this is a rare occurence.
  • PANIC indicates that the current bot is panicking. This generally means that the bot is highly distressed for some reason, but is unable to determine the source of the problem; being shot at by a hidden sniper, for instance, or being suddenly rushed by a crowd of enemies. Panicking bots look around wildly, move erratically, and are usually incapable of acquiring a target with any reliability. In the vast majority of cases, PANIC does not last for more than a few seconds; chances are that the bot will either be killed, or find its intended target and snap out of it.
  • <<<BLIND>>> indicates that the bot has been hit with a flashbang grenade and cannot see or hear reliably. When blinded, a bot will attempt to back away from the source of the flashbang (with mixed success rates) and will sometimes fire randomly. Blindness goes away after a predictable amount of time, just as it does for human players.

State

"State" is a general indicator of what the bot is doing at any given moment. "Task" gives a more specific description of the current action being performed, while "Disposition" shows the bot's current attitude towards enemies.

  • Idle -- The bot literally has nothing to do. This can only happen in the short time after a round is completed; if all enemies are dead and there is no ticking bomb, the bots will switch to Idle mode and wait for the next round to commence.
  • Buy -- The bot is frozen in the spawn location and is waiting for the round to start. A bot in the Buy state is automatically switched to Hunt when the round begins.
  • Hunt -- The bot is hunting for enemies. It will actively seek out areas of suspected enemy activity, preferring to stay with teammates when possible.
  • Hide -- The bot is within or is moving towards a hiding place. It may do this because it wants to sit there and pick off incoming enemies, or because it is under fire and needs a safe place to reload.
  • MoveTo -- The bot has a specific location in mind and is moving towards it. This usually happens when teammates radio for help, or when the location of the bomb has been discovered.
  • Follow -- The bot is following behind a specific player. This seems to occur randomly; I have observed both teams using it, but the only condition I've been able to pinpoint is that Terrorists will often decide to Follow a bomb carrier.
  • InvestigateNoise -- The bot has heard a combat-related noise nearby and is moving towards its source. If the bot has been investigating for a while and hasn't found anything interesting, it will usually switch to another mode.
  • FetchBomb -- The bot is aware of a dropped bomb in the area and is trying to pick it up, attacking any enemies around it. This mode overrides any other mode until the bomb is picked up.
  • PlantBomb -- The bot is currently planting the bomb or is within a bomb site and is moving towards a planting location. Mode usually changes to Hide when finished, since the bot will want to guard the ticking bomb.
  • Attacking: Name -- This text completely replaces the State, Task, Disposition, and Morale indicators. It only appears when the bot is currently firing their weapon at the enemy; whatever shows up in place of "Name" is the name of the enemy being attacked.

Task

"Task" is a more specific indication of what a bot is currently doing than "State".

  • SEEK_AND_DESTROY -- Moving towards possible encounter spots and seeking enemies to kill.
  • GUARD_INITIAL_ENCOUNTER -- Moving towards or sitting in a position that allows the bot to guard an area where an enemy encounter is likely to occur.
  • HOLD_POSITION -- I can't quite figure out exactly why bots decide to perform this task. It seems to happen if the bot has recently seen an enemy and expects the enemy to return to a visible location sometime soon.
  • MOVE_TO_LAST_KNOWN_ENEMY_POSITION -- Moving towards a location where an enemy was recently spotted, with the intention of killing it.
  • FOLLOW -- The only task that can be performed while the Follow state is active. See "Follow" above for a description.
  • MOVE_TO_SNIPER_SPOT -- Moving towards a good sniping location. This task can only be chosen if the bot has equipped a weapon with a zoom function.
  • SNIPING -- Zoomed in with a sniping weapon, waiting for targets to appear.
  • GUARD_BOMB_ZONE -- A Counter-Terrorist is guarding a bomb site, usually with the Hide state active.
  • GUARD_LOOSE_BOMB -- A Counter-Terrorist is guarding a bomb that has been dropped on the ground.
  • FIND_TICKING_BOMB -- A Counter-Terrorist is aware that the bomb has been planted, but does not know where it is and is trying to find it.
  • DEFUSE_BOMB -- A Counter-Terrorist is aware of the bomb's location and is moving towards it or defusing it.
  • PLANT_BOMB -- A Terrorist is within a bomb zone and is planting the bomb or moving towards a good location to do so.
  • GUARD_TICKING_BOMB -- A Terrorist is guarding a bomb site that contains a ticking bomb, usually with the Hide state active.
  • ESCAPE_FROM_BOMB -- Running away from a ticking bomb, aware that there is no longer enough time to defuse it. Both teams will do this as soon as the "point of no return" occurs.

Disposition

"Disposition" is an indicator of the bot's current attitude towards enemies.

  • ENGAGE_AND_INVESTIGATE -- Actively investigating areas of suspected enemy activity and firing on any visible enemies within range.
  • OPPORTUNITY_FIRE -- Sitting in a hiding spot and firing on any enemies that pass by.
  • IGNORE_ENEMIES -- Not engaging enemies at all. This usually happens when a bot is running away, possibly because it needs to find a hiding spot or has been blinded.

Morale

Morale can run the gamut from EXCELLENT to TERRIBLE, with NEUTRAL being the middle ground. From all observations, it doesn't seem to have any measurable effect on a bot's behavior. However, teams whose average morale is high tend to win more rounds than teams with low morale, assuming an even balance with all-bot teams. What factors affect morale is a complete mystery.

LookAt

This indicator only appears when a bot is looking at a specific location, not during normal navigation or attacking. After any of these, LOOK_TOWARD_SPOT indicates that the bot is swinging its view towards the target area, and LOOK_AT_SPOT indicates that the view has stabilized and the bot is looking at whatever it intended to look at.

  • Approach point (Hiding) -- Looking at a hiding spot that the bot is currently approaching.
  • Face outward -- A hiding spot has been reached, turning around to face outward from the spot.
  • Encounter spot -- Looking at a spot that the enemy is likely to appear at.
  • Last enemy position -- An enemy just disappeared around a corner, looking at the spot they were last seen at.
  • Noise -- Heard a combat-related noise nearby, looking towards it to see what caused it.
  • Panic -- Looking around wildly (see PANIC above).
  • Plant bomb on floor -- Planting the bomb, looking straight down at the ground.
  • Defuse bomb -- Defusing a bomb, crouching near it and looking directly at it.

SteadyView

If NO is displayed after this indicator, the bot's view is unstable and it will probably miss any shots that it decides to fire shortly afterwards. This happens when the view is rapidly swinging around, usually while navigating corners or executing a LOOK_TOWARD_SPOT instruction.

Nearby friendlies/enemies

These two indicators display the number of known friendlies and enemies in the immediate area. A friendly or enemy is "known" if it is currently visible or was visible a few seconds ago. A bot is less likely to charge into an unsecured area if there are few friendlies nearby; likewise, more caution will be exercised near areas that are known to contain large numbers of enemies.

Console Spam

If you want to record all the console spam that goes scrolling by in the lower section, start the game with the "-condebug" parameter. This will save all console output to a file named "console.log" in Steam\SteamApps\{username}\counter-strike source\cstrike. Many of the messages are SetState (see "State" above) or SetLookAt (see "LookAt" above) instructions. Everything else is mostly self-explanatory:

"Teammate said what I was going to say - shutting up."
"I tried to say something I'm already saying."
"Attacking our friend's killer!"
"Checking out where our friend was killed"
"Can't get to my hiding spot - finding another..."
"Grenade: Friend is in the way..."
"The enemy I was chasing was killed - giving up."
"Attending to noise..."

Personal tools