Hacker News new | ask | show | jobs
by growingconcern 4205 days ago
AI programmer here...generally "bots" are just AI that is intended to take the place of a player (typically in a versus setting and not a co-op setting).

If anything bots are tougher to make then "normal" AI since their value is measured by their performance against humans. Also the less you cheat (perfect knowledge of the other players, perfect aim, etc) the better your bot. Having a non-cheating bot beat a human is a major achievement.

The bots for a strategy game like StarCraft is fundamentally different than the bot for an FPS. They use completely different techniques and it's much harder to cheat in strategy game (though ignoring the fog of war is the most egregious). Strategy game AI is more akin to chess AI - lots of search (minimax and stuff). It's a whole field onto itself and you can only learn by studying the AI for that type of particular game.

FPS bots (like counter strike) are much closer to traditional game AI (shooters and such). Books on "Game AI" are a good place to start. Basically the two major problems is where should I go (evaluating cover, analyzing line of sight, estimating where enemies are and trying to pick a good place to stand) and how to I get there (pathfinding and pathfollowing). What you do when you get there is generally pretty straightforward (shooting at the appropriate guy). If you have a cover system you need to be able to tell them how to use cover and this involves a lot of animation (syncing my animations and position up to the cover in the world). But in an FPS this is usually just a question of crouching or not.

The big difference for FPS bots (versus single player enemy AI) is that bots need to choose between conflicting goals (should I go get ammo, should I go get health, should I attack the enemy). If you have a strict hierarchy of behaviours your bots won't be competitive (enter fuzzy logic systems, utility theory and the like - normal behaviour trees won't cut it).

Have fun!

1 comments

> Having a non-cheating bot beat a human is a major achievement.

(for some categories of games!)

I'm almost nitpicking here, but it's important to understand the distinction where when trying to build "human-like" AI that players feel are like the real thing, you also want to emulate human shortcomings. Sometimes it might not be cheating per the rules, but still be obviously outside the realm of current human capabilities.

e.g.: An AI opponent with perfect arithmetical abilities in a game like Scorched Earth: http://en.wikipedia.org/wiki/Scorched_Earth_(video_game)