Artificial Intelligence for Games
Notes de lecture sur le livre “Artificial Intelligence for Games” de John Funge et Ian Millington.
Sommaire :
1 Introduction
1.2 Model of Game AI
1.2.3 Strategy
strategy: overall approach used by a group of characters
Vs decision making: for one character on his own
Decision making is influenced by strategy.
2 Game AI
2.2 The Kind of AI in Games
2.2.2 Heuristics
heuristic: rule of thumb, approximate solution that might work in many situations
common heuristics:
- - Most Constrained: make the choice that would be possible for the fewest number of states
- - Do the Most Difficult Thing First
- - Try the Most Promising Thing First
3 Movement
3.1 The Basics of Movement Algorithms
vocabulary:
- - velocity: speed
- - orientation: azimuth
- - rotation: angular velocity
- - steering: acceleration
- - seek Vs flee
wandering:
- 1) change orientation by steering behavior
- 2) move in direction of orientation
3.2 Kinematic Movement Algorithms
3.2.2 Wandering
To return a random number between -1 and +1 where values around 0 are more likely:
def random_binomial:
return random() - random()
3.3 Steering Behaviors
3.3.14 Collison Avoidance
For rapidly calculating potential collisions when there are many characters:
- - multi-resolution maps
- - quad or octrees
- - binary space partition (BSP) trees
Time of closest approach between moving character and moving target:
- dv = vt - vc
- dp = pt - pc
- t closest = - (dp . dv) / |dv|2
- p't = pc + vc . t closest
- p't = pt + vt . t closest
3.3.15 Obstacle and Wall Avoidance
To avoid complex objects (that cannot be represented by a sphere) such as walls:
- - cast ray(s) in the direction of motion;
- - limit to a few seconds of movement;
- - create target location at fixed distance from the surface, from collision point and normal to the surface.
La dernière mise à jour de cette page date de décembre 2017.
Le contenu de ce site est, en tant qu'œuvre originale de l'esprit, protégé par le droit d'auteur.
Pour tout commentaire, vous pouvez m'écrire à xavier.lamorlette@gmail.com.