AI GAME ENGINES : Start Point

Game Development

Development of AI in Games

When developers were working on a new game in the past, they waited until the very last development stages before AI was implemented into the game. For many of the published games it cannot even be said they had an AI engine, because in some games AI code was so simple, that it blended in with the rest of the code. So there was a common practice that AI code was just part of game’s engine or in some cases even part of graphic engine.

Nowadays games have gained a lot of complexity. So a game has to be split in 6 different modules, with each module having its own characteristics that can be represented by a model. But games come in many different genres and even two games inside the same genre can be very distinct one from another. That’s what makes the modeling characteristics of a module very difficult. Once having a model of a module, that module can usually be used for all sorts of games, with only small modifications. E.g. a sound module –3D sound of a firing gun can be used in many first person shooters, real-time strategy games, roleplaying games etc.

AI is the most difficult part of a game engine to model. Because each game has its own environment, it has different characters with different behaviour, their own story telling and different player expectations of how an AI should behave. So, there is no easy way of implementing an AI for a new game, where the correct model would be chosen, used in conjunction with other modules of a game engine and the end result would be balanced, fun, and a worthy AI opponent.

Simplifying AI Development with Unified Structure of the AI Engine

Developing a new AI engine is hard, but not impossible. A simplified parallel can be made between all the games, since all the games use at least one of the following tehniques: moving, decision making and strategy – Figure 1. (Millington & Funge, 2009)

getfile

The structure of an AI engine can be used as a basic foundation for building AI’s for every game there is. There is no need to use all three tehniques for each game, since some games are very simple and they only use moving parts of the AI engine, with no need for decision making or strategy (like the game Tetris). Whilst games such as Pac-man use movement with simple decision making, games such as Chess use only strategic level, and recent state-of-the-art games such as Crysis use all three tehniques.

Detailed Structure of the AI Engine

Movement: using the concept of movement different movement algorithms are refferded to where the reaction of a move is triggered based on a decision or on a request that the character needs to be moved, movement algorithm ensures that when a request for movement is given, a computer-guided character is moved according to the character’s properties and whilst obiding with the rules of a virtual world.

Decision making: is a process where knowledge of a virtual world is used when performing action’s (if the need arises), which would have an impact on that virtual world. Decision making is hidden from the outside observer (opposite to the movement, where the move can be clearly seen), because the observer does not necessarily know that an action has taken place, nor does it have full information as to why the action was carried out. Nevertheless decision making is a very important part of AI if we want to give the game a deeper meaning.

Strategy: is the direction that a general (which can be NPC or a human player) takes through actions that influence the environment, in order to achieve her/his vision, over a longer period of time. If reffering to movement and decision making as lower level AI tehniques, then the strategy is on a higher level (usually using movement and decision making as tools to achieve its vision). For some games (or genres) strategy can be easier to implement than with others. e. g. strategy for sports games can be developed and implemented a lot faster because inspiration can be drawn from real teams and based on real actors, whilst RTS games do not have direct counterparts in the real world.