top of page

Week One

Introduction:

The first week of Games and AI module is already fascinating. We have looked into Artificial Intelligence (AI) in games, movement, path-finding, decision making, tactics and strategy. AI is widely used in games today. It controls the behaviour of non-player agents in a game, creates challenging gameplay, aids the player, adds subsidiary characters in multiplayer games and creates immersion. We have been assigned a lab task to present good and bad game AI we find interesting. Below you can read my research into my chosen interesting AI. Have a look at our presentation at the end of the article.

Artificial Intelligence:

AI is the collection of algorithms that make game characters appear human or animal-like and can handle uncertainty to represent the real world. "The AI in most modern games addresses three basic needs: the ability to move characters, the ability to make decisions about where to move, and the ability to think tactically or strategically." (Millington, I. and Funge, J., 2012).

(Model of Game AI: Millington, I. and Funge, J., 2012)

Movement is one of the core principles of AI. It turns decisions into movement and accounts for obstacles along the way. Left 4 Dead is one of the games which we've looked into. It encompasses an intelligent AI system called The Director which is in charge of all AI tasks. Left 4 Dead uses the A* Navigation Mesh movement algorithm, which creates the initial jagged path for the AI to follow and so adjustments are required to make the AI look more fluid (Michael Booth, n.d.) An approach that Left 4 Dead uses is discussed below:

1. Path Optimization collapses redundant path nodes to create a direct and minimal path. However, the resulting path can seem robotic. It also creates a big CPU cost at path build time and paths are often recalculated to account for other bots, corners and small props.

2. Reactive Path Following tells the AI to look ahead of the path in front and use local obstacle avoidance to determine the optimal path for them to follow. It means that repathing is cheap, the AI is able to efficiently avoid obstacles as it encounters them and hence the resulting motion is fluid. On the other hand, the AI might go off-course and require a repath.

As seen in the figures below, the resulting path is similar to the optimized path. It improves greatly upon the realism of AI movement.



Path Optimization Reactive Path Following Optimized vs Reactive Path

Decision making involves the AI figuring out what to do next: attacking, standing still, fleeing, exploring, hiding, patrolling, etc. Decision making mechanism chooses a behaviour that can then be executed using movement AI and animation technology.

An example of simple AI is Pacman. It uses finite-state machines (FSM) to determine whether the ghosts are chasing or fleeing. At each state, the ghost takes on a semi-random route at each turn:

  • Pursuit mode: each ghost has a different chance of chasing the player or choosing a random direction.

  • Fleeing mode: either run away or chose a random direction.

If the AI was made any simpler, it would either become ineffective (ghosts only move in a random direction) or predictable (ghosts always chase the player). The use of both provides an effective and unpredictable AI behaviour which moves just like you do.

Some of the disadvantages of FSM may be that AI behaviour becomes too predictable. Too many states and transitions can make the system difficult to manage and maintain. Having too few states can result in rigid behaviour also. However, simple FSM is CPU cost effective and can be made more complex to suit various genres.

Assignment:

My personal favourite game genre is stealth. This is due to the environment, immersion and strategy that stealth games encompass. My assignment idea is greatly inspired by Thief and its strategic gameplay. A simple map will be set in place, which the guard AI will patrol, listening and looking out for anything strange. The Left 4 Dead approach to reactive path following will be a great movement approach to use in this case. It will require minimal processing to produce human-like results.

For decision making, FSM could produce a great solution. However, I would like to add more states than Pacman into my game to account for rigid behaviour. For example, if a guard is in the patrol state and hears a sound, it first enters a search state. If it sees the enemy, it begins to chase the intruder. If he does not see the intruder, it returns to patrol state.

However, as we learn more about AI, I would like to incorporate more complex AI also. For example, a guard chases you into a room which has one exit door. It knows this and decides to block this door so the intruder cannot escape. The guard then starts to shout alerting the guards in a large radius before attacking. If the player gets close, the guard switches to attack mode.

Lab:

References:

1. Millington, I. and Funge, J., 2012. Artificial intelligence for games. CRC Press.

2. Maxis Software, Inc. (2000). The Sims. Electronic Arts, Inc. [PC].

3. Ubisoft Montreal Studios. (2002). Splinter Cell. Ubisoft Entertainment Software. [Multiple platforms].

4. Michael Booth n.d. The AI Systems of Left 4 Dead​ [online] Available from <http://www.valvesoftware.com/publications/2009/ai_systems_of_l4d_mike_booth.pdf> [24 January]


Featured Posts
Check back soon
Once posts are published, you’ll see them here.
Recent Posts
Archive
Search By Tags
No tags yet.
Follow US
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page