Saturday, 16 November 2013

Basic Artificial Intelligence in Videogames

Artificial Intelligence plays a large role in video games where the players fight against the computer. They give behaviors and other features to objects in the game to produce the illusion of intelligence. Some A.I in modern games are done really well to imitate human behaviors. To create these illusions, game developers implement different algorithms to simulate intelligence in Video Games.

In most games, artificial intelligence can be broken down into three parts, Movement, Decision Making, and Strategy.

Movement:

Movement takes the decisions made by the program, and uses it to perform the specific motion. For example, a NPC can be just casually walking through a set path around the town, but when the player approaches the NPC, he/she will stop and “notice” the player. When the player moves out of range of the NPC, the NPC will continue walking along the path given.

Decision Making:
The game has to choose the correct decision based at any situation that happens in the game. This is where decision making comes in. When a situation changes, the A.I has to choose the correct behavior or action instantaneously. An example of this would be in Metal Gear Solid 4, where enemies would be doing their regular patrolling actions initially. But when they spot Snake or another enemy, they will change into a different action such as a seeking action. The game has to make the correct decision so the player will not notice any strange motions by the NPCs (unless intended). How strange would it be if instead of changing into seeking the enemies will change into a retreat action. A player would think that the enemies would be scared of you, but it would be strange. The enemies greatly outnumber the player, and can easily encounter the player. Without proper decision making it creates poor gameplay for the player to enjoy.

Strategy:
Strategy in Artificial Intelligence can be difficult or simple to implement. It is the behaviors of the game objects after the decision making has been made. Difficulty of implementing certain strategies depends on what the game developer wishes their game objects to perform. A simple strategy would be to have a single enemy attack the player. Generally implementing what a real person would do in that situation would be a difficult strategy to implement. The reason being is that people can think for themselves and are also unpredictable. Computers are very predictable and requires the game developer to write some sort of code so the computer can understand what to do. 

Here is a great example of what NOT to do when you want good A.I in your game. This video shows the lack of decision making and strategy in what a good artificial intelligence should have.


The Walking Dead: Survival Instinct

No comments:

Post a Comment