140 likes | 426 Views
Half life 2/ Counter Strike: Source bot. Charlie Cross CIS 488 2-14-05. Background . Counter Strike is a multiplayer modification for Half life, released in June of 1999. Valve software hired the counterstrike team and ported Counter Strike to their new Source engine.
E N D
Half life 2/ Counter Strike: Source bot Charlie Cross CIS 488 2-14-05
Background • Counter Strike is a multiplayer modification for Half life, released in June of 1999. • Valve software hired the counterstrike team and ported Counter Strike to their new Source engine. • Outsourced a spin off single player product- Counter Strike: Condition Zero. • Ended up being finished at Turtle Rock Studios.
Background (2) • Turtle Rock developed artificial intelligence for condition zero. • AI was ported to CS: Source last month.
AI features: • Navigates map using automated systems (waypoints) combined with human teaching (navigation meshes). • Communicates with human players, telling them where enemies are located. • Follows human instructions (e.g. “follow me”, or “team fall back”) • Selects best weapon for tactical situation. Avoids tactically disadvantageous situations. • Conveys range of emotion-driven behaviors. Rushes aggressively when winning or retreats when outnumbered.
Navigation • Use of nav meshes allows bots to be less predictable and to use less structured behavior the way humans do. • A* pathfinding. • Uses reactive obstacle avoidance (like the quake bots) To avoid crashing into walls and other objects. • Monitor’s average velocity to detect when the bot is “stuck”, then uses a “random wiggle” to try to jerk free. (I have never seen this happen)
Using the tools to build paths. (Source: Mike Booth’s presentation at GDC)
Using and viewing the environment • Nav meshes include “hiding spots” that are labeled by the programmer. • When retreating or “camping” the bot will find a hiding spot to ambush the opponent. • Looks around smoothly and avoid jerky movements. • Looks around corners and checks openings.
Tactics and Bot emotions • Nav Areas hold a danger value. • Increased danger means increased cost (A*) • This forces bots to change routes. • Danger values are increased when bad things happen (such as team mates dying) • Morale determines level of aggression. • High morale: Bot is on winning team, bot is killing enemies. • Low morale: Bot is on losing team, bot is killed, hurt.
Combat and Weapon selection • Since it is a rule based system, there are an elaborate collection of rules to determine combat actions. • Examples: • Using the appropriate weapon for the range: (Sniper rifles if enemy is far, pistol if close.) • Aiming for the head. • How to use grenades effectively (flush out enemies if attacking, slow them down if defending)
Team awareness • Follows the leader (you) • Communicates enemy locations • Uses stealth (sneaking slowly to reduce noise) when heavily outnumbered • Avoids stupid problems like shooting teammates, (will yell at you if you do).
Effects on Gameplay • Why make a bot for a multi-player game? • Some servers don’t have a lot of players on them. Bots can fill in the gaps to make a full team. • Lousy internet connection wont prevent players from enjoying game. • Bots don’t accuse you of cheating when you kick their ass.
Strengths and weaknesses • Strengths: • Bot is almost convincingly human. • Bot difficulty is scalable to match different skill levels. • Bots don’t change flow of game, they are just like other players. • Weaknesses • Bots can see perfectly in dark areas. • Bots often prioritize killing enemies over completing mission objectives. (Then again, so do most human players.)