Recent video games, irrespective of their platform, are becoming increasingly challenging for players. Veteran gamers may cope with such challenges; however the ‘unpredictability’ factor in games is still a conundrum. It is to be admitted that despite the game design and other related aspects of game development, Artificial Intelligence is crucial in engaging players for long hours of gameplay. In the complex game worlds which include high-textured game environments, intriguing storyline, and lucid interface, it is equally important to have requisite amount of AI in varying difficulty levels in order to ensure that player feels a balance in gameplay throughout the game. Though static game behavior in some game missions do succeed in engaging the player due to their innovative gameplay or creative game responses, sometimes the game fails if such aspects dominate the AI.
Tactical AI is important to challenge a hardcore gamer. At the same time, with the increase in complexity of games, AI shouldn’t cease the sense of achievement from the player. It must take out the best of the gamers’ ability to confront a game in highest difficulty level.
AI in early games
Early games had predefined logic which is scripted by the developers and hence the game behavior is acutely predictable. However, such games still succeeded because of the ‘unpredictability’ factor in gameplay rather than game behavior. In games like Mario, the player character needs to do a lot of adventures to complete a level. There are many levels in the game and each level has innovative gameplay and challenging villains. Other factors like collecting gold coins, time bonus, bonus levels, etc. contribute to long hours of game play. Games such as Minesweeper, DX-ball, etc, that had limited art work but promising game play, were hugely successful.
Predictable AI in mario
AI in Pacman
The NPCs in early FPS games had scripted behavior. For instance, AI in a typical war game would be any of these possibilities:
- If the player shoots, hide for 5 seconds and then shoot back
- If the player shoots, hide for 5 seconds and then shoot back or shoot from a different position.
- If the player shoots, escape the fire and shoot back.
And so on! However, if NPCs are scripted differently and each NPC has a unique behavior, it constitutes to a challenging gameplay. But that is practically impossible.
The seeds of game AI were sown when Chess was developed on computer. Though the rules of the game were limited, computer made innumerably accurate and clever decisions to counter a player’s move. Other games which also had good AI are Pacman, Tetris, etc.
The ‘unpredictability’ factor
Now, let’s look at what factors constitute for an ‘unpredictable’ AI behavior. Recent console and PC games have high AI. AI is vital in many action-adventure games especially when it comes to boss battles. When player character encounters a boss after killing a hundred minions, it is obvious that a whole new strategy must be adapted to kill the boss. However, as the player loses the boss battle for 2-3 times, the player understands the limitations or rather ‘weaknesses’ of the boss and hence fights the boss afresh. Here, the learning curve depends on the player’s exposure to wide-range of games. A hardcore gamer may need to lose just once to beat the boss.
Let us consider the case where the NPC learns from player’s pattern of attack and plans its counter accordingly. The game behavior then becomes increasingly unpredictable.
Let us take an example of AI in Tekken: Dark Resurrection and analyze the NPC behavior.
Easy:
- NPC allows the player to hit first
- Its hit to block ratio is approximately 5:1
- Crawling attacks are minimal
- Normal to combo attack ratio is 7:1
Medium:
- NPC does more attack combos
- Hit to block ratio is 5:3
- Grappling attacks are often used
- High kicks and triple punches are dominant
Hard:
- NPC detects players patterns and plans its combos
- Perfect timing is maintained for a knockout
- Enables defense mechanism if NPC’s health is low
- Special moves and combo attacks are dominant
Note: If the difficulty is set to the highest, the NPC has the ability to tactfully plan the attacks; if the player uses a flying kick that deflects NPC’s stance, it defends its position by a grappling attack. This is a classic example of excellent implementation of AI.
Which technique is used?
The unpredictability factor can be achieved through Fuzzy logic where the range of values programmed for NPC behavior is more. Fuzzy logic is an intelligent technique that could be used to boost the performance of games. It handles complex control problems at low computational costs, without sacrificing the subtle details. This causes uncertainty in NPC behavior as the possibilities of responding differently to a predictable situation in a game environment are abundant. The applications of fuzzy logic in behavior game design are the key to ‘intelligent’ behavior of an NPC.
Limitations of AI in games
Why is it necessary to limit AI in games? What happens when AI is excess? Before considering these questions, it is important to understand the following factors that relate to constructive AI.
- Situational analysis: By making scripted actions appear more dynamic and realistic, it adds a dimension of believability. Examples may be subtle effects like crawling through bushes in a war game, or more complex problem-solving behaviors like an NPC escaping from a trap set by the player using objects in the game environment.
- Behavioral programming: This is a critical factor that determines the underlying NPC behavior in the game environment. Behavioral programming is the random scripting with character types. In an RTS, if an infantry unit adapts a defensive stance, its likelihood of doing a particular action could be tweaked as 25% of grenade attacks, 5% of rushing, 70% of taking cover. If the infantry unit is set to aggressive stance, 40 % grenade attacks, 45% of rushing, 20% of taking cover. Character based programming is often adjusted throughout game balancing.
- Pathfinding: Getting an NPC from point A to B.  3D terrain and cover in a map are huge. The player must keep in account where the NPC is, is he firing, should the NPC fire when he moves, or go as fast as possible and at the end, did that look real and so on.
As Oliver G. Selfridge, author of ‘The Gardens of Learning’, said “If an expert system–brilliantly designed, engineered and implemented–cannot learn not to repeat its mistakes, it is not as intelligent as a worm or a sea anemone or a kitten”.If a learning system (expert system), designed through algorithms, can learn to make effective decisions by learning from each play, the system maintains a database of values and it juggles these results to come up with a clever counter attack. Hence AI becomes stronger and even the best gamer in the world can’t beat the game. But this is not the intention of any good game design. Excessive game AI often confuses the player and leads to boredom as the player keeps losing the game. An optimum use of AI in a game can be when the player feels as if he/she is playing with another human rather than a dumb computer program.
No comments:
Post a Comment