What is artificial intelligence?
Artificial intelligence in the context of gaming is usually referred to the computer, game AI or enemy engine. Artificial intelligence techniques are employed to make games more challenging and more fun and compelling for the player to play. In this tutorial we will be discussing some artificial intelligence algorithms used in game development as a whole. With some examples of where each can be used in your games.
Artificial intelligence algorithms
Some of the artificial intelligence algorithms you will encounter are the following:
- Neural Networks
- Mini Max Trees
- Decision Trees
- Genetic Algorithm
- A* Path finding
Neural networks in the simplest form tries to simulate human brain biology by having a network of neurons which fire when a certain thresh hold is reached. If the outcome of the neuron firing does not produce the desired outcome back propagation is employed to correct the thresholds of the neurons to make them only fire under certain circumstances in order to produce the required result.
Mini Max Trees
Often used in solving game AI problems such as chess, checkers, uno and other turn based games which have an X amount of combinations. Mini Max trees employ a scoring approach to decision making where a score is calculated for each possible move which the artificial intelligence algorithm can take and then chooses the best possible outcome and prunes down on the worst possible outcomes.
Similar to mini max trees. Decision trees allow for multiple decisions which a artificial intelligence player can make on a particular game.
Genetic algorithms try to simulate biological evolution over time. Genetic algorithms generally can be used to find the most optimal way of AI completing a level in a game or killing the player or whatever the goal may be. Genetic algorithms or GA’s as they are known as do this through breeding a large population of outcomes together and pruning of the ones which have the least best outcome then re breading the higher performance individuals to produce even more optimised artificial intelligence.
A* Path finding
This form of algorithm divides a level into zones or a smaller grids which can be used to calculate manuvers around obstacles in your games. An example of this is counter strike bots which can navigate terrain even though they have never been exposed to a particular map.
To find out more about artificial intelligence and specifically genetic algorithms. Check out this tutorial series : Artificial intelligence and genetic algorithms