Game AI resources (links, videos)


Game AI resources that I have found today.
This is not Bge only, but that might be useful for some members.

18 Embarrassing Game AI Bugs Caught On Tape… and Fixed!

Nice article.
Here is what you can find (Videos) :

  • AI can’t see until seen
  • Your Last known position is…
  • No swimming (Npcs do not have the same abilities as the player)
  • When priorities go wrong! (The NPC’s investigate behavior is activated when an unexpected sound is emitted by the landing barrel, but the fact that the barrel is burning is not taken into account… BOOM!)
  • What sound does a knife make?
  • Standing still is a strategy (The individual player has found a “terminal” state in the behavior which offers no way out. )
  • The shortest path is a straightline (pathfinding)
  • I’m invisible : Go around me (An invisible sniper controlled by the player causes the tank to stop and pathfind around him everytime he moves. Yet the tank and the enemies are not aware of the sniper and therefore don’t engage him.)
  • Moonwalking is fun (NPC guards are seen on two instances walking into posts and closed doors repeatedly, while the animation keeps on walking.)
  • Who’s your enemy? (An enemy NPC was unresponsive until attacked. The NPC responds to the player once hit with the sword, but decides to target another NPC before dealing with the player. In the end, the NPC ends up running off to his original target.)
  • Where’s the pitch control on this mounted gun? (the behavior of the enemy on a mounted gun remains the same in all cases while the player is in front, even though the player may not be targeted.)
  • Drowning on Land (Npcs stuck in geometry)
  • Are you receiving my bullets? (Allied and enemy NPCs keep shooting each other from a meter away, and keep missing because of a nearby tree. Bullets of one of the NPCs are actually hitting the tree, but the bullets of the other seem to disappear.)
  • Inappropriate behavior (The player fires an arrow in an NPC’s living room. The NPC then accuses the player of stealing from him.)
  • Do the oscillation dance (The pathfinder is run from one position, calculating a path one way. Then as the path is followed, the path is recalculated causing a different route to be taken.)
  • Driver, where are you taking me? (A special wall - force field - does not seem to be taken into account by the vehicle pathfinding. The AI doesn’t realize it needs to move backwards in this case to get out of trouble.)
  • I speak with dead people (Two NPCs are in a scripted dialog with each other. The player takes out one of them using a sniper riffle, and the other NPC keeps on chatting away as if nothing had happened.)
  • Do not open that box! (Although the game seems to spawn NPCs out of sight of the player, the problem is the script that spawns the enemy NPCs doesn’t take into account how often he performs an action.)

Summary and Take Away
Generally speaking, there are a few things you should know about game AI bugs:

  • On their own, most bugs don’t take long to fix technically speaking; most ones in this list would possibly take between an hour and a few days to isolate and fix.
  • Most bugs quickly become a design decision, as fixing bugs may affect other behaviors or the gameplay itself. Towards the end of a project, the AI is often frozen for this reason.
  • AI bugs are rarely ever show stoppers, and the reason they are not fixed is due to scheduling and production reasons.

More on

Building an AI Sensory System: Examining The Design of Thief: The Dark Project



11+ Reasons for Coming to Paris in June: Game AI Conference '09 Line-Up Announced
Don’t hesitate to check the list of topics and confirmed speakers.
I will probably go.

I would like to contribute some links as these type of threads always help me. These are links that I read.

FSM (Finite state machine)
An FSM is a system for handleing AI, very easy to learn.
Explination of what FSMs are.
An example of an FSM in python.

A* pathfinding for beginners. Goes over how A* works and includes some source code (C++)

Explains how to deal with pathfinding in 3D (the above article is tile based)

Wikipedia’s take on A*, impossible to decipher like most Wikipedia garble but there is some pseudo code there that is %2000 helpful.

Great, Andrew. If someone can provide working .blend to contribute to this thread, that would be useful. For example, does anybody have a working a* .blend example, or basic pathfinding (without nodes, and not on a pre-tiled map - there are already available .blend for that). Same for 3d pathfinding (stairs), that would be useful.

As a matter of fact I made (re-made, it was an old example file) an A* tile based pathfinding example yesterday. The code is heavily commented and based off Wikipedia’s pseudo code. You need 2.49 RC1 to use it.

I had a 3D pathfinding example but I deleted it yesterday, I will work on making another using the method in the above article. This method also takes care of stairs.


tile_pathfinding.blend (116 KB)