How AI is Actually Used in the Video Games Industry
An Overview of the State of the Industry in 2024
AI and Games is a YouTube series made possible thanks to crowdfunding on Patreon as well as right here with paid subscriptions on Substack.
Support the show to have your name in video credits, contribute to future episode topics, watch content in early access and receive exclusive supporters-only content
If you’re interested in dowloading a copy of our taxonomy diagram used in this episode, you can find PNG and PDF copies via this link.
Artificial Intelligence and Video Games: it's a hot topic right now with the rise of generative AI, and it's something that every major tech investor and games publisher has an opinion on. Whether it's venture capitalists highlighting the potential for generative models, to publishers like Square Enix, Microsoft, Ubisoft, Sony, EA and more highlighting their plans for AI adoption across their development pipelines.
But in what ways is AI actually being used in games? From intelligent characters, to procedural generation, player modelling, texture upscaling, cheat detection, natural language processing and more, today we will answer this question as succinctly and clearly as I can: how is artificial intelligence adopted in video games?
Artificial Intelligence: An Overview
What follows is undoubtedly not going to be exhaustive. It's hard to condense everything into a single concise write-up. But it should cover the fundamentals for anyone interested to expand from there. In addition, this overview will focus on techniques employed within actual video game productions. The reality is much more nuanced when we explore academic research in this space, but it's important to highlight specifically how AI is adopted in actual commercial projects.
To begin our exploration of AI for video games, we need to start by explaining what we mean by 'artificial intelligence'.
The term Artificial Intelligence was established in 1956, and is designed to represent a collection of various algorithms, philosophies and techniques for enabling computers to make intelligent decisions. What those decisions are, and how they are relevant to the creation of video games, we'll come back to later.
Since its inception, the notion of AI has gradually delineated into particular schools of thought. The first is to embed knowledge of the problem as a series of states comprised of facts and how these facts can be changed courtesy of actions. This creates a representation of the problem known as a state, and this allows for a system to search within this representation to find sequences of actions to solve a specific problem. This approach is commonly referred to as Symbolic AI, and - given its prominence in the early days of the field compared to now - is sometimes referred to as 'classical AI'.
Meanwhile the other major category is called Machine Learning. While this is the dominant field of AI, it is far from a new concept, with the term 'machine learning' first devised in 1959 and the first application that adheres to this concept emerging not long after the term Artificial Intelligence itself was first devised.
Machine Learning refers to a collection of algorithms that learn a solution by looking at existing data about a given problem. It can do this in a variety of ways, either without supervision of the designer, by learning to replicate existing phenomena or by improving the solution through trial and error. In each instance, the system 'learns' by iteratively improving the solution it presents, by reducing the perceived error of its outputs. The system doesn't learn the way humans typically do, it simply becomes 'less bad' at the problem it tries to solve. This is often useful when the problem space is very complicated and multi-faceted, given a machine learning system can generalise to handle a myriad of unique situations better than a symbolic system can.
Algorithms from both symbolic AI and machine learning fields adhere to the principle of agent theory - in that they make intelligent actions based on the information provided, such that they will provide as close as optimal solutions that fit a desired goal. Since the inception of the field, what we - both as developers and the general public - consider to be 'intelligent' has changed drastically as the state of the art has improved. But fundamentally, simple search algorithms have just as much right to be considered AI as the biggest breakthroughs in machine learning.
Speaking of, more recent developments in machine learning have led to the emergence of two specific sub-disciplines. The first is Deep Learning, a term that first arose in 1986 but its current adoption is largely courtesy of a number of significant breakthroughs in the late 2000s and early 2010s, after which it has since dominated the AI landscape. Deep learning refers specifically to the technique of training large-scale artificial neural networks - non-linear data structures that adopt principles from neurology - albeit in a very naïve way. These artificial 'brains' if you will were originally conceived in 1957 but recent developments have led to deep neural nets, which use layers of processing to extract important information about a problem. This has led to significant gains in a variety of fields such as image recognition and real-time control systems, and in games they were largely popularised courtesy of work by the likes of Google DeepMind, as they trained deep neural nets to learn to play classic Atari games, as well as Blizzard's StarCraft II. A topic I have explored previously.
The second recent development, is what is collectively known as Generative AI. Typically, we think of machine learning as a mechanism to make intelligent decisions or predictions based on data. But what if we used the trained system to create new data inspired by what it has seen before? Generative AI, is in fact a sub-discipline of deep learning, and adopts the same principles of training deep neural networks, only this time as generative models rather than intelligent inference models.
This has largely been popularised by the likes of Open AI's ChatGPT. The term GPT itself an acroynm for the type of AI system it is built upon: a generative pre-trained transformer model. Now we are seeing generative models being created for a myriad of purposes, ranging from story generation to character dialogue, audio assets and art assets in a myriad of forms.
So that is AI at a very high level, and in each sub discipline, be it symbolic AI or machine learning, there are a myriad of different approaches that are designed to suit specific types of problems, and even specific permutations of those problems.
But now let's talk about how they are utilised in games, and the other sub-discipline that this subsequently created.
How AI Intersects with Games
Now it's important to delineate the types of ways in which artificial intelligence is employed in video games, both in terms of the features it helps achieve, and the ways it is used in production.
AI typically had three applications in games:
AI that 'Plays' as part of regular gameplay.
AI that Creates content for a game.
AI that Models properties of the game.
On top of how it is used, there are two distinct ways in which it is adopted in the project:
AI for Player Experience: AI that the player will actually interact with.
AI for Game Production: AI that is used to help improve quality in production, or resolve problems more effectively or efficiently than developers doing it manually.
Now it's worth stressing that when the video games industry talks about AI, it is for the most part talking about one specific subset: AI that plays, as part of the players experience - which I'll unpack in a second. Using AI as part of the development process is a more recent development, largely within the past 5 years, and it is right now in 2024 an area that generative AI seeks to invest in. But as I say, for the bulk of developers, when we talk about AI in games, we're talking about player facing systems.
So let's dig into that some more: AI that is player facing and part of the experience. What that means, the approaches adopted, and what specific use cases exist for it.
AI for Game Experience
It's important to start with a discussion of AI for game experience, given it leads to another important distinction. Thus far, my argument of what constitutes as AI is that it makes intelligent decisions based on the problem it is trying to solve. It has a specific goal it is trying to achieve. Or in the case of a lot of machine learning it is creating content that is reflective of what it has been trained against. AI that is part of a games experience is often built with the intent to be fun. Fun is a highly subjective concept, and as such what we consider intelligent or optimal in a game is seldom what is considered as such in real world contexts. Given it's more important that an AI do something that is interesting to facilitate the player's experience, rather than be perfect in its execution.
AI That Plays for the Game Experience
Plus, there are specific problems that AI is required to solve. This includes not just making decisions in the interests of players entertainment, but knowing how to move characters around the world (be it in 2D or 3D), reacting to the players behaviour in ways that are contextually relevant and consistent, and facilitating the fiction of the games narrative in ways that support the players enjoyment. All the while ensuring it is computationally efficient and tractable such that it can execute on the hardware it is running on, and will not negatively impact performance of the game itself.
This has led to a sub-discipline referred to as Game AI - this is a specific subset of symbolic AI methods that have been adapted to suit specific game design problems. This has almost exclusively focussed on our first application category - AI that 'Plays' as part of regular gameplay. This creates the behaviour of non-player characters or NPCs. I have covered many of these over the years in my videos, but let's just list some examples:
Search Algorithms that are adopted for navigation, with specific techniques for steering vehicles and similar objects.
Navigation Meshes are data structures built to delineate what areas a character may move across, and how to calculate paths across it.
Finite State Machines seen in DOOM, Half-Life and even The Last of Us encapsulate relevant behaviours a character may execute, and the conditions which necessitate which behaviour remains active.
Behaviour Trees like in Halo and Alien: Isolation provide mechanisms to identify sequences of actions relevant to current context, while also ensuring behaviours can quickly shift based on in-game events.
Goal Oriented Action Planning in F.E.A.R. compute sequences of actions to solve a particular goal, and then how it should translate into execution within a finite state machine.
Utility AI is used to help identify the best actions to execute in a give situation, or the best goal to solve in the current context.
Bark systems that run simple rule based conditions for playing audio to communicate information to the player.
Plus on top of this, there's a lot of other symbolic AI techniques adopted for Game AI purposes. Strategy games like Total War use tree search algorithms for decision making, or influence maps for spatial analysis, while games like The Sims use constraint satisfaction techniques so that characters can execute actions concurrently or in ways that appear more human like.
Meanwhile, by comparison, machine learning techniques are not as heavily adopted in this category. As discussed in my article Machine Learning for Games, Machine Learning is still not that pervasive in this category. This isn't to say that machine learning is not adopted in games experiences. Far from it. There are examples of machine learning techniques being used for the likes of NPCs in games like Creatures and Black and White in 1996 and 2001 respectively. But it has largely seen more success in recent years, most notably in the likes of opponent racers in the MotoGP series, the Sophy AI of Gran Turismo 7, in enemy factions in Age of Empires 4, or for decision making in the video game adaptation of the card game Race for the Galaxy. Plus Forza's Drivatars which is special instance, given that it models the behaviour of players and then reproduce it in front of other players.
AI That Creates for Player Experience
So having discussed AI that plays, there is arguably the second most well known application of AI in games, and that's AI that creates. Content creation for the player experience falls under many categories, be it levels, characters, weapons, narratives or more. We typically refer to this as procedural content generation. PCG is a topic that is often considered not to be AI, but this is a philosophy that denies a fundamental concept of the approach.
All PCG algorithms intelligently apply rules and processes that craft content with respect to a pre-determined notion of quality. This heuristic of what is considered a 'good' decision or not during generation, is often laced within the design of the algorithm. While pseudo-randomness is a fundamental requirement of procedural generation to achieve variation, regardless of how rich or complex the process is, it is making decisions to craft content that respects implicit design rules and is therefore, at its most fundamental level, an intelligent system. This argument has only been made stronger by the recent rise of generative AI techniques. Given generative AI is essentially procedural content generation but rather than building an algorithm to craft content, it is model trained from existing examples.
At the time of writing, generative AI for games is a big talking point, with a variety of examples emerging, be it the use of synthesised voices in The Finals, to applications of generated album art in Foamstars, and the use of GPT-like models for text and narrative generation by the likes of Convai, Inworld and Hidden Door. This is, without a doubt, the least defined area within the space of AI for games experiences. While there is a lot of experimentation in the space, there is little by way of consensus or industry standards emerge. The production challenges, limitations and legal requirements are not currently established, and the number of AAA games that have adopted this in a released product is still in the single digits. As such, this is the area of this taxonomy that will no doubt see significant change when I update it in the future.
But in the meantime, let's look two other major developments that have reached consensus: the first is in real-time rendering, whereby AI helps to draw graphics on the screen as you play the game. First up there is DLSS, or Deep Learning Super Sampling, this process is improving the overall graphical quality of a game in real-time by running AI upscaling on your GPU. Check out my dedicated episodes on the topic to find out more. In addition to this, more recent developments in neural rendering are allowing for upscaling that works in bespoke areas of the game. For example, 2023's God of War: Ragnarok uses a neural rendering feature so that the textures put in the final build of the game are a lower resolution, and thus saving disk space on the player's Playstation 5.
AI That Models for Player Experience
The final aspect of AI for player experience, is how machine learning is used to model player behaviour. We already discussed player modelling in the context of AI opponents like in Forza, but performance for matchmaking purposes. Xbox's TrueSkill and TrueMatch algorithms learn how to model the skill of a player over time such that they can create the most engaging matches possible. Meanwhile Valve have employed machine learning as part of their skill based match making approach for Dota 2.
AI for Game Production
As we move into AI for Game Production, it's important to highlight that this is - by game development standards - a relatively new field. AI used as part of a games production is a concept that only existed in a handful of examples even 10 years ago. The innovations in deep learning over the past 10-12 years have enabled for a variety of new ideas to be explored in this space, and yielding returns that make it actually worthwhile to use these systems as part of a game production pipeline.
AI That Plays for Production
The one major application of AI that plays as part of production is in quality assurance and testing. Testing is an increasingly popular area of application for AI given it can help speed up, and ultimately improve one of the most demanding aspects of a games production. Given the very nature of the field, bugs and issues can emerge in a game in a myriad of ways, be it broken feature, erroneous functionality, art assets loading incorrectly and much more. But identifying where these bugs occur, and the often complex series of actions that need to be taken to trigger them, can be incredibly demanding.
Typically this is the realm of human testers, who spend significant time trying out specific configurations and actions in different scenarios. But now this is an area where AI can not only help automated that repetetive activity, but also run curiosity-driven algorithms to ensure they explore the game and try out different behaviours to see if specific bugs occur. We've seen this already on the channel as I dug into the bots in Ubisoft's Division franchise. Meanwhile, the likes of Electronic Arts have shared their work on a myriad of titles recently at the Game Developers Conference, plus smaller companies like modl.ai are also providing these tools such that they are more accessible for indie developers.
AI That Creates For Production
Moving into AI that creates, this is where we're seeing a lot of opportunities emerge. Naturally, you may think that the bulk of this is courtesy of generative AI, with use of AI to create art assets such as textures or models, voice lines and more. But this is already an area that has seen significant gains courtesy in the past 10 years, so let's walk through what is - to my mind at least - the most prominent examples:
First up there is animation, with motion matching techniques being an example where AI is used to resolve a production issue. This technology has appeared in my detailed breakdowns of games such as Hitman and The Last of Us Part Two, where AI is trained to learn the best points to blend between animations.
But it's not the only part of the visual aspects of games that's seen AI driven innovation. Texture upscaling, which is a process whereby AI can take art assets and reproduce them at higher quality, is one that first emerged courtesy of modding communities, but has made its way into game production pipelines. With the Mass Effect: Legendary Edition being arguably the most high profile example in recent years. Unlike AI for real-time rendering, this process is computed during development, with the upscaled assets used in the game build. To find out more about how it works, check out the dedicated episode on the topic.
The last thing to mention in this space, is an area that many players don't think about, and that's the use of AI for accessibility. In many respects this is part of the players experience, given you can have AI generate subtitles from dialogue and event voice chat, or the use of text-to-speech systems for reading aloud menu items. But I denote this as part of production, given the adoption of the technology may help offsets costs and production time in creating these assets otherwise.
AI That Models for Production
Moving into AI that models, while there is some experimentation in areas such as physics, there are two main areas in which this is employed. The first is in player modelling for analytics, this is more or less the practice of data sciences in extrapolating information about a player base, with some AI adoption in there at times to help developers understand how their audience is playing their game and what issues or otherwise they're experiencing. A simple yet still relevant example of this, is the analytics research in Tomb Raider: Underworld, a topic I explored in a video many years ago.
The final area that has been applied in production, is the use of machine learning as part of efforts to combat cheating and toxicity. Like many online spaces, online games sadly have to deal with bad actors who seek to ruin the fun for everyone else. Be it by harassing others via text or voice chat, or through their actions within the game space. Similarly, some go one step further and utilise cheats and other mechanisms to circumvent regular play is an increasing problem. It's in the best interests of games studios to ensure their online community is as healthy as possible, especially when so many games seek to monetise their players.
Naturally, the internal mechanisms of many of these systems is relatively unknown. However, developers such as Valve have openly discussed their efforts of using deep learning to catch cheaters in their popular shooter Counterstrike.
Closing
Thanks for getting this far and surviving this fairly heavy breakdown. I hope you find this useful. If it helps give a clearer picture of the state of the industry, provides guidance on your own interests in the subject, identifies areas to dig into further or just settles an argument you had with a friend, then I consider my job done. I doubt this answers everyone's questions, given there's so much ground to cover, and I really hope I didn't miss anything. But then there are over 100 videos on my YouTube channel on the subject if you want to dig into this some more.
In the meantime, you’re welcome to download PNG or PDF copies of this breakdown via this link.
As noted in the title, this is acknowledged as the 2024 edition of this breakdown. My plan is to update this information periodically as the state of the art evolves and standards begin to converge. While Game AI is long established, and not going to change too drastically, this will be particularly relevant when we discuss generative AI. We've yet to see how this becomes established industry practice, and this will take time. It took a few years for deep learning to cement itself into games the way it has now, and we are still finding ways to use it as part of game development. As such, it's important to be patient and wait and see how generative AI becomes a part of game development processes.
While there are a myriad of examples emerging of generative AI being used in games, relying on such speculative experimentation to dictate industry practice would be naiive. When I mention deep learning in games, as you've seen throughout this video I have pointed to a myriad of games with different genres, budgets, applications and more. By comparison, generative AI has yet to move beyond experimentation to reach not just healty iteration but an informed consensus. That will take a couple more years to manifest. So yes, expect updates in the future, as this diagram evolves.