This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.
Artificial Intelligence (AI) in games is a broad science of creating intelligent non-player components (NPC) and game agents (GAs). The huge increase in the processing power of CPU over the past 25 years and the use of dedicated graphics adapters for game graphic needs, game designers are able to implement several additional new features to the game play (A Game Theory Approach to High-Level Strategic Planning in First Person Shooters, 2008). This has shifted the attention towards implementing intelligent NPCs and GAME AGENTs. Next generation of games will involve highly evolved NPCs and GAME AGENTs. These agents will be able to take intelligent decisions based on their view of the game environment. The goal of AI in any computer game is to make the game as fun and as believable as possible without any unfair advantage for the game agents. This idea is termed as "suspension of disbelief" (Nareyek, 2004). In first person shooting games (FPS), AI is mainly in divided in two categories: movement & path-finding and behavior. This study aims at developing techniques in these two categories for a 3D FPS game. The study concentrates on techniques to generate dynamic waypoints and influence map for game agent movements and modifying them based on the environment and game state. These waypoints are used as reference points for basic movements. Influence map provide information about the waypoints. Based on these inputs, the path planning and A* algorithms will be used by game agents to plan their movements. These movements are analyzed by the game aggregating knowledge for all game agents as a group. This knowledge is used to tune the performance of the game agents over generations. This study also surveys the suggested AI practices for feasibility, and performance.
TABLE OF CONTENTS
Master's Thesis Document 2
TABLE OF CONTENTS 5
TABLE OF TABLES 8
TABLE OF FIGURES 9
ARTIFICIAL INTELLIGENCE FOR GAMES 11
FLEE / DEFEND 16
RELATED RESEARCH 17
OVERVIEW OF FPS GAMES 19
GAME AI MODEL 20
GROUP AI 21
AGENT AI 21
GAME DESIGN 22
GAME CHARACTERS 22
GAME PLAY 22
GAME AI DESIGN 23
WAYPOINT CREATION 23
INFLUENCE MAP 23
STATE MACHINE 23
PATH FINDING 23
CASE STUDY AND ANALYSIS 24
NO AI 24
AI PATH FINDING 24
CASE STUDY ANALYSIS 25
FUTURE wORK 26
TABLE OF TABLES
TABLE OF FIGURES
Figure 1.1 Game AI Architecture (GameAIArchitecture) 12
Figure 2.1 Game AI Model. 21
Computer games are a relatively new field of research. They originated as a part of human computer interaction. The fast growth in the processing power of hardware devices, led to an unparalleled success for the game industry. The advancement of the game industry and growths in the area of application for games has driven computer games beyond simple human computer interaction. Modern games have variety of applications like entertainment, training, scenario simulation etc.
Computer games are now available on a variety of platforms like arcade, mainframe, console, personal computers or laptops and handheld devices, etc. (Histor_of_Video_Games). Games are further divided into various types based on the game play. The common types are real time games, strategy games, turn based strategy games, action games including first person shooter games and third person view games, role playing games, simulation games, etc. (Crawford) (Typ). Unceasing leaps in the improvement of processing capabilities and newer more powerful graphic adapters over the past decade have contributed immensely to the improvement in computer games. Due to the increase in the demands for better games, attention is diverted to research for better ways to make the non-player characters (NPCs) and game agents intelligent. Artificial Intelligence (AI) can be used in computer games for vast variety of reasons. The goal of Artificial Intelligence (AI) in any computer game is to make the game as fun and as believable as possible without any unfair advantage to the game agents. The idea is to improve the gameplay experience while making the game agent behavior autonomous and giving them an ability to act like the human player (Nareyek, 2004).
ARTIFICIAL INTELLIGENCE FOR GAMES
AI is the science of study and design of intelligent systems. Intelligent systems are systems that perceive its environment and take creative, intelligent decision based on its perception. Actions can be termed as intelligent if it maximizes its chances of success (WAPEDIA_Artificial_Intelligence) (WIKI_AI). AI as a science has changed enormously over the years. The approach to AI has altered from early philosophical questions to biologically inspired techniques.
Application of AI to games involves simulation of human like behavior for the game agents. This behavior can be simulated by giving the game agents the ability to understand their environment and make decisions. AI is used in games to solve problems like collision detection, navigation, etc. These problems are lower order problems of the human brain. The objective of AI is to simulate the higher order functions of the human brain. With the increasing demand for good games, the future of the gaming industry is reliant on AI. The next generation games will heavily rely on AI in making intelligent non-player components (NPC's) and giving them an ability to act like the human player to make intelligent decisions.
As shown in the figure 1.1 below, AI for games can be divided into two basic types: Game Agent Movements and Game Agent Behavior.
Game Agent Behavior
Game agent Movement
Figure 1.1 Game AI Architecture (GameAIArchitecture)
This aspect is a lower order function of the human brain and deals with navigation and path finding. Movements are game agent activities that facilitate effective locomotion in the given game environment. They are defined by game agent movements over specific points in the map. These points are called waypoints. Waypoints are reference points that provide information about the surrounding area of the map. For example, in Call of Duty: Modern Warfare 2, the game agents constantly moves to the area being attacked by the player and his platoon. This movement is aimed at stopping the player from taking over the area.
A waypoint is a point of reference on the game map or terrain for the purpose of navigation. Waypoints are a set of co-ordinates on the game map. These points mark a specific location to assist in navigation (Waypoint_Definition). Waypoints can be any point on the map that can act as a reference or can be differentiated from the surrounding points. Generally, waypoints are defined by the map or level designer and are static.
This aspect is a higher order function of the human brain and influences the game agent's perception of the game environment. This perception helps the game agents to analyze the current environment and game state and make react to them in an intelligent way. This reaction may influence the lower order functions like movements as well. For example, in Metal Gear Solid 4, the game agent perceives the dead body of a team mate as an alert for intruder and raises the alarm. The alarm is perceived by all the other game agents in the vicinity. This triggers a state changes from normal or wandering mode to active seek mode.
This study is directed towards the analysis of intelligent game agent movements for FPS games. The approach in consideration by this study is to create dynamic waypoints. Traditionally, waypoints are designed by the level creator and stored for that level. Waypoints are the basis of movements for that game. By pre-defining waypoints, level designer block or grant access to any section of the map. In theory, waypoints can be visualized as a graph (weighted or unweighted). Generally waypoint graphs are not directed but it may depend on the level designer. Each waypoint has an influence on the map. This is represented by an influence map. We can visualize the influence map as a grid of values over the game map. These values determine the influence of a waypoint in the graph. Typically these values define the influence of that point over the surrounding map. These values are interpreted by the game agents and used for navigation.
This study aims at developing an approach for dynamic waypoint creation for map navigation. An influence map is created for each of these points. The game agents use these waypoints as reference points for navigation. As the game progresses, the influence value on each point is altered. This alteration is accomplished by the game agents based on their interaction with the game environment. This study also aims at analyzing the interaction of the game agents with the game environment. Game agents interact with the environment in two ways - Movement and Behavior.
The game agents move throughout the terrain for the entire period of game runtime. During their movement, they interact with the user, the game terrain and other game agents. This interaction and its outcome help the game agents to alter the influence value of that particular point.
The entire game is carried out for n generations. Each generation carries forward the knowledge to the next generation. At the end of each generation, the performance of game agents is analyzed. A selection process is applied to game agents and the ones with the best values survive the process. An average of the values of the surviving agents is considered for the next generation. Each generation will have the same number of game agents but with sophisticated collective intelligence. This collective intelligence can be termed as group behavior (Millington, 2006).
The study aims at analyzing the movements of these game agents. The study also aims at analyzing the performance of way point creation process in terms of improving the game agent intelligence. The game movements under consideration are of three basic types - Wander, Flee and Seek (Millington, 2006).
Wander is the game agent movement to stroll around the map in search of the player. The objective of this movement is to explore the arena and look for the player.
FLEE / DEFEND
Flee is the game agent movement to evade an ongoing attack on itself. The objective of this movement is to evade the attack and move to a safer location.
Seek is the game agent movement to attack the player once the location is known. The objective of this movement is to find the optimum path for the agent to attack the player. The attributes like current game state, current agent state, distance to player are to be considered to evaluate the path.
Agents can be defined to be autonomous, problem solving computational entities capable of solving effective operations in dynamic and open environment (Luck, et al., 2003).
An autonomous agent is an autonomous system that senses the environment and takes decision to achieve its goals (Is it an Agent, or just a Program?:A Taxonomy for Autonomous Agents, 1997) (A survey on the need and use of AI in game agents, 2008). NPCs may or may not display any autonomous characteristics. NPCs are generally systems that perform specified tasks in a predefined fashion. With the advent of AI in games, game developers were faced with the complex task of designing a NPC with a realistic, human-like artificial intelligence (Using a genetic algorithm to tune first-person shooter bots, 2004). This led to creation of game agents. Game agents are NPC's that perceive the game environment and take appropriate actions. These actions maximize their chances of survival or completion of goal (WAPEDIA_Artificial_Intelligence). Game agents generally represent the AI component of the game. Game agents are expected to show autonomy in perceiving the changes in the game environment and take actions to complete the goals set by the game play logic. Game bots (game controlled robots) and game agents refer to the same category of NPC's.
NPCs play a very vital role in FPS games. This study focuses on developing techniques for effective movement of game agents. In FPS games, the interaction between the human player and the game agents is very brief. The game play itself is very fast providing a very small opportunity for learning (Hartley, et al., 2009). Some of the popular FPS games include half-life 2, Far Cry, DOOM 3, Halo 2 Quake 4, Unreal tournament, Call of duty (Ten). FPS games face unique problems in implementing intelligent behavior for game agents. Currently most FPS commercial games, use predefined scripts for modeling behavior and A* algorithm for path planning. In spite of the great success of the mentioned games, the game agents fail to display any intelligent behavior in cases that are not pre-programmed. This study tries to simulate and analyze the use of adaptive learning techniques for game agents. Adaptive learning techniques will serve as a self-corrective, creative and measure and improve the behavior of the agents over time (Hartley, et al., 2009). Table 2.1 below shows the properties of FPS game agents considered by this study and mentioned in (Is it an Agent, or just a Program?:A Taxonomy for Autonomous Agents, 1997) and (A Game Theory Approach to High-Level Strategic Planning in First Person Shooters, 2008).
Since FPS games are fast paced, game agents have to be vigorous about their actions.
Exercises control over its actions.
Acts to accomplish certain goals.
Is continuously running.
Communicates with other agents, perhaps including people.
Changes behavior based on its previous experience.
Actions not scripted.
Believable "personality" and emotional state.
This property allows for the characters to hide thus making them partially visible to other characters.
The game environment being non-deterministic, generally FPS game agents should be stochastic. This will makes it possible for slightly different action for the same input
Generally FPS is a multi-agent environment. Many times, multiple agents have to work together
Table 2.1 Properties of FPS game agents (mentioned in (Is it an Agent, or just a Program?:A Taxonomy for Autonomous Agents, 1997) and (A Game Theory Approach to High-Level Strategic Planning in First Person Shooters, 2008))
OVERVIEW OF FPS GAMES
FPS game generally aims at eliminating the enemy. In the commercial market, the quality is primarily judged based on the game graphics, followed by the game play and then game physics and rendering and controls . AI is given the last priority. This is generally because of the limited interaction, between human player and game agents. Because of the limited interaction, game agent's get limited time for modeling the player's behavior . Also, game agents plays variety of roles in a FPS games. All these roles require the display of sophisticated moves for better entertainment . This behavior is attained by implementing state machines and scripts, thus faking an intelligent behavior . This approach does not depict the most intelligent behavior for the agents. However, commercially this approach is a viable option because of the short average lifespan of a game agents . With the advancement in CPU processing speeds and transfer of the rendering capabilities to powerful graphic adapters, the attention is shifting to AI for game agents. In spite of the availability of the extra processing power, the pace of the FPS game determines the availability of processing power for AI.
Generally a FPS game will have multiple game agents. The number of game agents varies depending on the game play and game level. Implementing any additional processing on these agents will have a ripple effect as all the game agents will be affected. Although, this is not a major issue consider the availability of multiple core to process every action, it may still slow down the execution.
GAME AI MODEL
The game considered for this study is a 3D First Person Shooter game. Figure 2.1 above illustrates the game model. The model displays two different components, of AI - Agent AI, Group AI . Each of these components provides different functionalities to improve the game play
Figure 2.1 Game AI Model.
GAME AI DESIGN
CASE STUDY AND ANALYSIS
AI PATH FINDING
CASE STUDY ANALYSIS