One course that I had during this spring semester was called Game Programming V, where the main focus was on AI theory and programming.
There was a lot of new theory during this course, but it was useful nonetheless. It covered both simpler for of AI like path-finding (using A* and similar techniques) and decision trees as well as more complex forms of AI like neural networks. This is a lot to talk about in just one blog post, but if there is one thing that the course thought me is that AI does not necessarily have to be hard, if you think of what you actually need for AI in your game.
One technique that I have used for some of the games I've made so far is called a finite state machine, which can be described (simplified a bit) as a class that keeps track of what state a the game, a character or whatever is currently in. If certain conditions becomes true, then the state changes. A concrete example of this would be a unit who's first stage is patrolling an area. If an enemy unit walks into a units vision, the state of the unit might change to defend or something else. This is rather simple to code, but can still be interesting AI in a game.
Another example of AI decision making that isn't necessarily boring (in my opinion) is in the Long War mod for XCOM: Enemy Within. At the start of each month, the aliens will make a decision on what kinds of missions that they will send against the player based on two factors; how much they perceive XCOM as a threat and how much resources they have available. Even if their decision is only based on two factors, it can still create interesting scenarios in the long run. Granted this also depends on other factors as well.
Inga kommentarer:
Skicka en kommentar