Game Development Reference
In-Depth Information
Minimax algorithm is a decision rule used in decision theory, game theory, statistics, and
philosophy for minimizing the possible loss while maximizing the potential gain. Altern-
atively, it can be thought of as maximizing the minimum gain (maximin). Originally for-
mulated for two-player zero-sum game theory, covering both the cases where players take
alternate moves and those where they make simultaneous moves, it has also been exten-
ded to more complex games and to general decision making in the presence of uncer-
tainty.
The reference is taken from http://en.wikipedia.org/wiki/Minimax .
The following links provide some useful information:
http://ai-depot.com/articles/minimax-explained/
http://www.stanford.edu/~msirota/soco/minimax.html
The following link contains useful information for the AI topic: http://web.media.mit.edu/
~jorkin/aibooks.html .
AI code is a lot to cover and can be written in a whole new topic, but we will learn how to
create a simple and easy way to make our AI look smart by using a simple method such as
the random function instead of using search algorithms to get the possible moves of the
enemies. It might not make our AI as smart as using those algorithms, but we will get the
basic idea of how to create smart AI.
After the release of Unity 3.5, there is a new feature for AI called NavMesh ( Navigation
Mesh ), which is a pathfinder system that calculates the walkable area by using the origin-
al mesh to create the new one, which is used to calculate the possible path for the AI.
Even though the NavMesh feature is available in the free version after Unity 4.2, there is
still the Off Mesh Links feature. This feature is used to check for the character when it
isn't in the mesh area, such as when the character is jumping.
Note
For more information, visit http://docs.unity3d.com/Documentation/Manual/
OffMeshLinks.html .
For a quick start tutorial on how to set up NavMesh, visit http://www.youtube.com/
watch?v=TD11AzSQ0Ao .
In this chapter, we will reuse the scripts and assets from Project 5 , Build a Rocket Launch-
er! , to implement the AI enemy. We will be creating an enemy by implementing the
Search WWH ::




Custom Search