Showing posts with label Artificial Intelligence techniques. Show all posts
Showing posts with label Artificial Intelligence techniques. Show all posts

Friday, March 6, 2015

Artificial Intelligence (AI) Techniques used in games

AI (Artificial Intelligence) is one of the key elements for any game. AI is used in a game to create the illusion of intelligence.

Today's generation kids like to play more 3D games like Assassin's Creed, Need For Speed, Prince of Persia, FIFA, etc. rather than 2D games. Artificial Intelligence in such 3D games is quite obvious and easy to spot. For FIFA, the characters that are not controlled by the players are an example of AI. In this case, they are called NPC (Non-Player Characters). But that is not the only AI in these games; even the goals scored, stamina and other stats that are calculated, etc. are also Artificial Intelligence.

The techniques of AI are as follows-




I will explain a few of these techniques here-


       1. Artificial life is that technique in which characters are created with a real-life feel. They are modeled exactly like the real-world animals, humans, trees, etc. and made to have their features. Making these characters do certain gestures, is an important task for any 3D game developer using artificial life.

Example- Like cats should mouth MEOW when said sound is played, and it should not feel like the cat meows with its mouth closed.

Most notable use of this is seen in simulation games, like supercar or flight simulations, where real world characteristics of the supercar/flight need to be replicated in game.


       2. Path Finding is one of the most important AI technique to be mastered. It is used in both 2D and 3D games. Many games, even AAA games, have had serious path finding errors, and these errors are still present in the game industry. Take a look in this video of a few path finding bugs





 There are two techniques of path finding for AI-
I.       Waypoint Technique
II.       Navigation Mesh

              In the Waypoint technique, the map area is filled with points that can be used to make the AI bots move. The bots move from one point to another point connected to it. But when the map has varying terrain, this is a harder method to implement.

Example-

You see how the path from point A to point B is zigzagged and long? That is because the bots have to follow a specific path and cannot go outside the constraints of that path.

              Navigation Mesh, also called navmesh is the walkable area of the map. AI such as bots, hostages in Counter Strike, etc. need this information to ‘walk’. Navigation mesh are saved in *.nav files. Navigation systems can be split into small squares which helps programmers to make entities walk. This is an easier way for pathfinding, which requires less calculation.


Example-

In this case, the AI can walk inside the highlighted area (The transparent blueish part).


       3. Speech Processing is means the computer is made to understand ‘natural’ human talk, and then interpret results. This may come in handy best when creating simulations. Examples of how speech processing works are-









References-

AI Blog

The Relation Between The AI Technique and Computer Game AI's Applications