AI in gaming is all about creating more responsive, adaptive, and challenging games through the use of artificial intelligence. Even though academics argue that game AI is not true AI, the hype around the technology has been continuously growing for quite a while.
How is AI used in games?
NPCs or non-player characters are where Game AI is used the most. These are characters in the game who act intelligently as if they were controlled by human players. These characters’ behavior is determined by artificial intelligence algorithms and engines. Quite often, decision trees are used to guide the behavior of these NPCs.
If you want a good idea of AI in NPCs, just look at Monster Hunter: World. There’s essentially a living ecosystem with AI-powered monsters that are essentially doing their own thing. Yuya Tokuda, the director of the game even talks about NPCs randomly attacking each other in the game. He remembers a time when his character was fighting a monster in the game and another monster just barged in, hit the first monster with a rock, and ran off. There was yet another situation when while the player was fighting one monster, another monster flew in and both the monsters started fighting each other.
According to Tokuda, this creates novel experiences for the game’s players as well as the developers.
“There's constant surprises - not just for players, but also for us. We've set up the rules for how they should behave, but in that sense we didn't script monster behaviour - we just gave them rules to behave by, and we still get surprised by how they respond to those rules.”
- Yuya Tokuda, Director of Monster Hunter: World
Earlier versions of the Monster Hunter games featured the monsters performing a limited amount of moves, but in the new versions, the monsters can perform a wide range of actions and can decide which moves they should make based on the position that the player’s character is in the moves that that character is in. This allows the NPC to perform moves that would be harder to dodge, block, or counter in that situation.
Pathfinding involves getting from one point to another. The whole gaming landscape is the most important part of pathfinding. The game AI can generate the game landscape or the game world as you go through the game world. The AI can get feedback from your moves, your playing style, in-game decisions, appearance, and techniques, and create the landscape according to that.
AI will let the decisions that you make have a bigger impact on the gameplay. For example, in Red Dead Redemption 2, the behavior of NPCs and their interaction with you depend on variables like blood stains on your clothes or the type of hat that you are wearing. Since there is an enormous matrix of possibilities, the whole game world could be manipulated by your decisions. There could be extremely complicated cause-and-effect relationships.
Artificial intelligence allows game designers and studios to perform data mining on player behavior to help them get an understanding of how people end up playing the game, the parts that people play the most, and what causes users to stop playing the game. This allows game developers to improve game play or identify monetization opportunities.
Artificial intelligence can be used in games to create new content, interactive stories, environmental conditions, levels, and even music automatically.
Game AI can figure out the ability and emotional state of the player, and then tailor the game according to that. This could even involve dynamic game difficulty balancing in which the difficulty of the game is adjusted in real-time, depending on the player's ability. Game AI could even aid in figuring out the player’s intent.
The most common type of cheating used by NPCs is when the NPCs make use of information that is not available to the players in that situation. As an example, in a combat game, an NPC might be given human-like senses like seeing and hearing, but they might just cheat by checking the player’s position on the game engine. Other types of cheating include the AI system granting NPCs greater speeds to catch up with players in racing games or allowing them to respawn in beneficial positions (eg. giving them the higher ground) in first-person games.
Cheating is useful in certain games because without cheating, it would be much easier for the human player to beat the system after a few attempts.
What are the kinds of AI in games?
The most common types of game AI techniques are:
Deterministic AI techiques are the most widely used game AI techniques. Deterministic behavior or performance is specified and is very predictable. There just isn’t any element of uncertainty involved in these techniques. They are rather quick and easy to implement, understand, test, and debug. The issue is that deterministic methods force developers to anticipate all the possible scenarios and code all the behavior themselves. These methods don’t even allow for learning or evolving, which makes the game’s behaviors predictable after a little gameplay and even has a limiting effect on the game’s play-life.
This is basically the opposite of deterministic behavior. Nondeterministic behavior has some level of uncertainty (which depends on the AI method that is used and how well that AI method is understood). If you want to get a better idea of what this is all about, just look at an NPC that learns the moves and tactics of a player and adapts to counter them. For such learning, a neural network, Bayesian technique, or genetic algorithm could be used.
The game developers won’t even need to anticipate all the possible scenarios and code behaviors according to them. These methods can even learn and extrapolate on their own and promote emergent behavior - behavior that emerges without there being explicit instructions.
The benefits of AI in games
AI brings an enormous amount of benefits to the gaming industry. Some of these are:
Using techniques like pattern learning and reinforcement learning, the NPCs in the games evolve by self-learning from their actions. The games also become rather realistic because they interpret and respond to the player’s actions as well. There also are a lot of programs that do not need human interfaces and are able to create virtual worlds automatically.
Normally, developing a game requires a lot of time and money to be invested into it. And you aren’t even sure how well the market will accept the game. AI can help dramatically reduce the time taken to build a game and save a lot of resources that would be spent on developing the game.
AI helps make the game more intuitive. In addition to this, the game can use AI to figure out the user’s ability and expertise with the game, and adjust the difficulty level of the game in real-time to match that.
The game becomes unpredictable when nondeterministic behavior is used. This means that what happens in the game can’t even be predicted by the developer of the game. This creates a novel, refreshing experience and increases the game’s play-life since the game does not become predictable and boring after playing it a few times.
What is the future of AI in gaming?
Artificial intelligence in game design and development has evolved substantially, but it's showing no signs of slowing down. Let's see what the future seems to hold.
Top 5 AI Innovations in the Gaming Industry.
1. Cloud-Based Gaming with AI
Cloud gaming is a technology that streams games across the Internet rather than requiring the user to download and install the game. This technology has been in the works for years, but it's still not mainstream.
2. Blockchain-Based Gaming
Blockchain-based gaming is still not a famous phenomenon. It indicates that both, gamers and developers need to get together on the blockchain platform to play these games. At the same time, they need to buy or owe digital properties to be a part of this gaming fraternity.
Voice or Audio Recognition-Based Games
Using audio recognition in gaming is going to change the way we perceive gaming. With voice recognition in gaming, the user can control the gaming gestures, monitor the controls, and even side-line the role of a controller.
Wearable Support Gaming and VR Gaming
Evolution in the field of AR, VR, and MR, has elevated the standards of experiential games based on virtual reality and mixed reality, making them more realistic and progressive towards entertainment. Oculus Quest is an all-in-one PC-quality virtual reality device is the best example of a wearable device used for wearable gaming.
Improved Mobile Gaming Experience
Mobile gaming is an emerging trend that facilitates a player to access an unlimited number of games with the convenience of their location. Phone companies have been focusing on and developing devices compatible with high resolution and heavy graphics.
Top 10 games that demonstrate the evolution of AI
AI in video games has definitely come a long way. Here are 10 games that use artificial intelligence with utmost finesse and show you how the progress that has been made in AI in game development.
1. Red Dead Redemption 2
3. Bioshock Infinite
4. Grand Theft Auto 5
5. Alien: Isolation
8. S.T.A.L.K.E.R.: Shadow Of Chernobyl
9. Halo: Combat Evolved
10. Middle Earth: Shadow Of Mordor
Can AI make games?
Yep, it can. AI has played a huge role in developing video games and tuning them to the preferences of the players. The most commonly used technique for this is machine learning. Basically, you could have the AI system learn from a lot of games, create approximate representations of the games, and then proceed to recombine the knowledge from these representations and use conceptual expansion to create new games.
AI has been bringing some major changes to the world of gaming, and its role is growing at a rapid pace. It wouldn’t be surprising to see AI being used even more in the gaming industry in the near future, seeing how it helps create more challenging and engaging game experiences.