¡ 6 min read
How AI Could Change The Way We Build Video And Mobile Games
Chay Hunter
EVP, Marketing at GameAnalytics
“Iâm sorry Dave. Iâm afraid I canât do that.”
If youâre a sci-fi film fan or (ahem) of a certain age, that quote from HAL 9000, the sentient computer and antagonist of â2001: A Space Odysseyâ, will likely have sent a small shiver down your spine. Artificial intelligence, or AI, has long been a go-to Hollywood villain â think Skynet, Ultron and, arguably the most evil of them all, Proteus IV from âDemon Seedâ.
Luckily, though, science fact hasnât mirrored fiction (not yet, at least) and âfriendly AIâ is now in almost all our homes in the form of Siri, Cortana, Alexa and the like. Itâs also used in more mundane processes like search engines, email filtering, and chatbots.
However, AI in game design needs to catch up.
Chances are youâve heard lots about AI playing games â famous examples include AlphaGo, the computer program that plays the board game Go, and Deep Blue, the chess-playing computer that beat world champion Garry Kasparov in 1997.
But thereâs a huge difference between this and the AI used in actual games. In fact, game design is one area where AI is actually a bit behind the times. One of the reasons for this is because researchers are using these game-playing computers to understand how to train machines to perform complicated tasks in other, more lucrative, areas (which weâll go over in more detail later). So this type of research is accelerating at a much faster rate than in-game AI.
There are other reasons why game design has fallen behind in this field. But before we get into those, letâs look at some AI basics.
A brief definition of AI
To simply put it, AI is the simulation of human intelligence by machines. By finding patterns in large amounts of data, we can train them to learn from experience and perform human-like tasks.
AI in games at the moment
If youâve ever played a video game, then youâve interacted with AI in some form or another. At the moment, there are two core components to game AI.
- Pathfinding: this is used in all games and is where AI plots the shortest route between two points. A good example is the ghosts in âPac-Macâ, which use pathfinding to decide which direction to go in.
- Finite state machines: this lets designers define complex behaviors. It powers NPCs (non-playable characters) in games, especially in open-world RPGs like âRed Dead Redemption 2â or âZelda: Breath of the Wildâ.
These two techniques have been around since the 1980s and 90s, and the way games developers use them hasnât really changed much since then. Obviously, as processing power has improved they made them look more sophisticated â but the underlying principles and fundamental concepts have hardly changed.
In practice, this means that while bosses in tricky games like âDark Soulsâ are using a form of AI to anticipate what players are going to do next, theyâre still following set patterns which most of us can overcome without too much difficulty. And even games like âNo Manâs Skyâ which uses a technique called procedural generation to build an almost infinite number of planets (18 quintillion if youâre counting), are still using long-established programming techniques to do that. So why arenât game developers taking advantage of developments in this area?
The ghost in the machine
Precisely because it learns, AI is inherently unpredictable â which makes it a disadvantage in gaming. Developers ultimately want to know what a player will experience. So if you put in something thatâs constantly adapting and learning from the player, thereâs a good chance unexpected things will happen. At worst, this could make your game unplayable.
Imagine if all the NPCs in âSkyrimâ remembered every âbadâ thing youâve ever done in Tamriel. Itâd be carnage. So game developers have largely stuck with the type of AI that powers those Pac-Man villains â which nowadays isnât actually considered all that intelligent.
To put it bluntly, they need to get over this. Why? Because used properly, AI could fundamentally change the way games are designed and played.
3 things AI could bring to the gaming table
1. It could make it quicker to create games
First up, AI could speed up the time it takes developers to build levels and craft open-world environments. In time, it could even build entire games from scratch. This would mean bigger and better games with more sophisticated and complex environments in much less time. This could particularly benefit small, indie game designers with less resources.
2. It could make your games more personal
Developers could also use AI to make the rules of a game changeable â so the experience I have playing it could be completely different to yours. Games could even learn what individual players like and dislike, and adapt things to suit them as theyâre playing, creating a completely personalized experience. Automated game design like this could mean that every time you sit down to play a game will be like the first time â because the game is constantly redesigning itself, no two play-throughs will ever be the same.
3. It could bring self-learning characters into the mix
And lastly, while itâs not likely to happen any time soon, one day we could get a self-learning character in a game. One that can change and grow in the same way that we humans do.
So what are we waiting for? AI is the future of game design, and one we can and should embrace.
AI tools that are already about
Feeling inspired? There are lots of AI tools out there which you can use to add new features to your games and apps. Hereâs a small snapshot of five of them weâve found online.
- Caffe2 â developed by Facebook, Caffe2 aims to be an easy way to experiment with deep learning (where artificial neural networks learn from large amounts of data). It works across various platforms and integrates with Android Studio, Visual Studio and Xcode for mobile development.
- Core ML â you can use this to integrate trained machine learning models into iOS apps. Itâs been designed for on-device performance, which uses less memory and power.
- ML Kit â made by Google, ML Kit offers the technologies the search engine uses to power its own experiences on mobile, and comes in both out-of-the-box solutions and custom models.
- TensorFlow â an open-source software library for building machine learning models. It has flexible architecture which makes it easy to use on desktop, mobile and edge devices.
- Cognitive Services â marketed as a way to use AI to solve business problems, Microsoftâs Cognitive Services lets you add intelligent algorithms to see, hear, speak, understand and interpret your userâs needs.