Article:Designing Artificial Intelligence for Games
From unthinkMedia
http://software.intel.com/en-us/articles/designing-artificial-intelligence-for-games-part-1/
After reading about information processing I decided to see how this applies to games, which brought me to Artificial Intellegence for games. AI for games enables an object to make decisions based on various criteria and algorithms that enable it to emulate a player sometimes called a Non-Player Character (NPC). This may also include any game element that could be acted upon, or even objects such as missiles, health etc. AI in games could range from very simple rule based systems, to complex elaborate implementation that challenge a player.
AI, as it pertains to games, is typically not interested in creating real "intelligence", however there is work being done in the field that is looking to do just that. This would be overkill for game since objects in a game typically don't need to learn much more then what their strictly defined roles are in the game. The goal in AI is to "simulate" enough intelligence that it offers the player enough of a challenge.
Bellow is a list of various methods of implementing AI in a game environment.
Basic Needs
- Decision Making: The core concept behind AI is giving the object choice, and to act upon those choices. There are two types of decisions:
- AI push: the AI is concerned with the big picture and spends its time calculating the best choices given the current context.
- Entity pull: the object calls on the AI system when the entity “thinks,” or updates itself.
- Basic Perceptions: The decisions that AI makes need to be meaningful, and depending on the complexity of the game may need other factors such as environment and conflict.
- Rules-Based Systems: This is the most basic type of AI system. The technique dispatches preset behaviors based on criteria. This creates a sense of an action that is not obvious, yet isn't based on much intelligent in the part of the system. Although predefined, rules do not have to be hardcoded. Attributes like strength, energy could be part of the criteria set by the system, making it somewhat more diverse. These type of rule based systems are the foundation of artificial intelligence.
- Finite State Machines as AI: This method of AI integrates various states that an object could be in.
- Idle: This is a passive state. The object might be standing or walking around.
- Aware: In this state the AI system actively searches due to a shift in the environment such as an open door or body on the floor.
- Intrigued: Once "aware" the AI system may leave it courant location to investigate.
- Alert: During their investigation, they may see the player, which cause the non-player character to sound an alarm, or get into fighting range.
- Aggressive: the state of battle against the player. NPC seeks for cover and commences an attack until either the system runs out of ammunition, the kills the player, or is low in health.
- Fleeing: Once the NPC feel they are in danger, they proceed to retreat. The gameworld may supply NPC's with health that they are able to find. Once they are stable they would return to battle or go into an Alert state.
- Dead: This state might mean different things in games. In a boxing game it might be an NPC being knocked out temporarily, it could also consist of a NPC "crying out" for help, alerting other NPCs.
- Adaptive AI: This type of AI is reserved for typically for strategy and fighting games that support a large quantity of action in it's mechanics. This allows for the system to adapt to the player action or series of actions and adapt strategies based on those actions.
- Prediction: Adaptive systems need a bit of intuition and be able to predict the players next move. This could involve advanced pattern recognition algorithms or random guesses.
An example might be if, in a boxing a player has a history of throwing a right cross immediately after a left hook, the play could predict it coming and act accordingly.

