Artificial Intelligence (AI) in simple terms describes how computers can mimic "intelligence" associated with the way humans think, tackling functions such as "learning" and "problem solving". In computer game development, AI is generally the term that we give to an object controlled by the computer. These objects can respond to a player’s input and sometimes even alter its own current task. The most common form of AI that we encounter in our games is the enemy AI. These enemies in our games can be guards, aliens or even monsters. They exist not only to add life to the game, but to add possibilities in how players can approach solving certain objectives within that game. But how can we make an enemy with AI “feel fair” to the player, as opposed to becoming an impossible foe, yet still be challenging?
An answer to this question would be to make the AI predictable to a certain degree. It’s important to note that having a somewhat predictable AI doesn’t necessarily mean that it’s not challenging. Take a stealth game for example (a game that relies upon sneaking around and remaining undetected). Guards in a game such as this, would generally have a scripted path – a route that they always follow. This means you can study a guard's path and feel fairly certain when the best time to act would be... However, depending on how your level is designed, or how many guards that maybe have intersecting paths, the game can still be quite challenging! This aspect of predictability is important to game design, as you want the player to feel like they’re coming up with their own solutions. If the player fails at their task, we want them to think it was because they could have approached the problem differently rather than thinking the game is unfair.
(Being caught by a guard)
Let's take another example from a game called “Payday 2”. As with the example above, guards in this game follow a few different, yet still predictable paths. But what happens if something is out of place? Would you expect a guard to walk past and not care? Payday 2 has a great response for this when playing stealth missions. If a guard notices something out of place on their patrol routes, they’ll become “alert” and investigate it, proceeding with caution. You might not notice this game mechanic at first, and may even fail the mission because of it. But once you learn this fact about the way the AI operates – and you know for certain that this is something that they’ll do 100% of the time – the game has now become more challenging than before, yet is still fair to the player.
(A guard noticing a broken camera)
Balancing the way AI is used, to introduce this element of added realism and excitement factor into the interaction within the game, without making the AI-assisted computer player becoming too powerful is a great challenge in computer game design.