This article relates to work performed within lectures and lab sessions of an AI module as part of the Games Technology undergraduate course at Coventry University (2016/2017).
The use of AI in video games is a broad and varied one. No matter what their use is, they all pose as a form of intelligence. The Collins English Dictionary defines intelligence as
“The capacity for understanding; ability to perceive and comprehend meaning.”
Therefore, any AI is able to understand and perceive information and attribute this as factors for further thinking. By intelligently comprehending meaning behind statistics, for example a database of figures, the AI can perform whatever operation it sees fit next. How does that relate to video games? If the AI knows where the player is, it can become more of a threat. If the AI is in a position of weakness, it can determine how to react accordingly, such as taking cover. Of course, their knowledge is limited by the amount of possible factors that are given to it. How much world data does the AI take in? How much does the game track overall? What are the gameplay constraints and how does this affect data possibilities? The mechanics of an RTS game are very different to that of an FPS game and as such, require different amounts and types of data to process any possible action.
Below is an assessment of the AI Director in the Left 4 Dead series, an AI aware of the performance of the players in the game that changes how each campaign plays out. If you’re good, the game gets harder. If you’re struggling, you’ll find more medkits, for example.
Video courtesy of the youtube user: AI & Games
However, on the flip side of this, taking a look at the AI of something like Counter Strike – Source and how each character on the two teams deals with finding other members of their team, the enemy team and those that are human players requires different factors, such as if they can shoot due to line or sight, whether they need to reload their weapon or switch, etc.
Video courtesy of the youtube user: Turboloscent.
Each game has it’s upsides, with Left 4 Dead giving potentially limitless possibilities for the same levels to be played out every time you play or even every time you attempt to redo an area if you previously all died there. CS:Source enables practice against enemies in a more controlled environment before going against real people whilst also making their behaviour realistic enough to believe you are against players of all skill. However, it’s harder difficulties for bots make victory incredibly difficult, with the ability to find you correctly and instantly through line of sight (using ray casting) and killing you before you had a chance to react properly. Left 4 Dead causes different problems using the Director AI with the ability to provide the same special enemy to you twice in a row, despite the pool of potential enemies being small already.
It’s clear that AI can do many different things within video games, otherwise they wouldn’t be included in so many of them. While they can be intelligent, they are limited by the amount of possible data they can acquire in their programming.
To compliment our learning material on this week, I presented information on AI in two games of my choice. These were Warframe and Hearthstone. These two games perform in very different ways, exist in different genres and showcase good examples of the intelligent thinking required for an AI to work.
Warframe creates multiple instances of the same AI agent and controls many different types at the same time. Some attack from range, others attack at close or melee range. Controlling all of these means efficiency in AI programming and therefore, they opted for small scope capability AI, they can only perform a small selection of actions. This lightens load data in synchronous updates and frees up for larger hordes in certain modes. However, this becomes a weakness to the game, the AI is too simple and predictable despite enemy variation. The game has been designed around this however, making challenge in the form or numbers and damage types that they need to get around and so, while the AI is simple, is at least good enough for it’s intended implementation.
Hearthstone is on the opposite side of the spectrum in this case. Like that covered in my look at Duel Links, Hearthstone uses a decision tree approach to deciding if cards can be played. The constraints on Hearthstone are fewer in number than with Yu-Gi-Oh; all cards are played using a Mana resource and can only be used after a certain number of turns (mostly). This makes the AI much more streamlined and efficient, giving more reliable AI interaction through extended use. The downside to this method of efficiency however is that the strategies, given the same deck of cards, are likely to be repeatable to some degree more frequently than the likes of the AI in Duel Links. As more cards are released however, this will change but likely make strategies that eventually end up repeatable again.