Game Development Reference
In-Depth Information
Chapter 6. Make AI Appear Smart
Creating AI can be the most difficult and complex task in the development of a game be-
cause we have to create a balance between intelligence with good game play environment
restrictions and performance. The game AI is very different from the traditional AI in many
ways because traditional AI tries to make it as close to the human brain as possible. On the
other hand, the game AI cares more about the player experience. So, the workarounds and
cheats are acceptable. In many cases, we will see the computer abilities have toned down to
give the human players a sense of fairness. For example, we don't want to have the enemy
kill players all the time without a chance to fight back.
Most games need AI for the enemy to be able to react to the player. The AI will run to-
wards and attack the player, or it will jump or walk avoiding the obstacles, and so on.
However, we have to be careful with the balance between making the AI smart and the per-
formance speed to get the best moves. This is why the game AI and traditional AI are dif-
ferent. To get the best moves means more calculation, so it might cause a problem with per-
formance slowing down.
Note
For more details on the comparison between the game AI and traditional AI, visit
http://www.ai-blog.net/archives/000183.html .
We can use A* algorithm for the pathfinder or Minimax algorithm to calculate the best
move, but these algorithms are very complex for a beginner.
Note
A* algorithm or A Star algorithm is a computer algorithm that is widely used in path find-
ing and graph traversal nodes. Noted for its performance and accuracy, it enjoys wide-
spread use. Peter Hart, Nils Nilsson, and Bertram Raphael first described the algorithm in
1968. It is an extension of Edsger Dijkstra's 1959 algorithm.
The reference is taken from http://en.wikipedia.org/wiki/A*_search_algorithm .
The following links provide some useful information:
http://theory.stanford.edu/~amitp/GameProgramming/AStarComparison.html
http://www.policyalmanac.org/games/aStarTutorial.htm
Search WWH ::




Custom Search