how is artificial intelligence used in the video game industry I see a lot of takes on the internet on this topic that range from optimistic speculative ignorant and flat out wrong so it's time to set the record straight from intelligent characters to procedural generation player modeling texture upscaling cheat detection natural language processing and more this episode of AI 101 will seek to answer this question as succinctly and as clearly as I can how is artificial intell Ence adopted in video games what follows is undoubtedly not going to be exhaustive it's hard to condense everything into
a single concise video 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 we will save looking AI research in games for another time to begin our exploration of AI for video games we need to start by explaining what we mean by artificial intellig Ence the term artificial intelligence has existed since 1956 and was designed to represent a collection of various algorithms philosophies and techniques for enabling computers to make Intelligent Decisions since its Inception the notion of AI has
gradually delineated into particular schools of thought the first is to embed knowledge of a problem as a series of States comprised of facts and how those 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 searching through this representation 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 at this time it is far from A New Concept with the term machine learning first devised in 1959 and the first application that aderes 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 any 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 output the system does 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 multifaceted given a machine Learning System can generalize to handle a myriad of unique situations typically better than a symbolic system can now regardless of opinion any argument of what constitutes as AI in this diagram is not open
to debate 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-ofthe-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 subdisciplines the first is deep learning deep learning refers specifically to the technique of training large-scale artificial neural networks a nonlinear data structure that adopts principles from neurology albe it in a very naive
way and in games they were largely popularized courtesy of the works by Google Deep Mind as they trained deep neural Nets to learn to play classic Atari games as well as blizzard Starcraft 2 the second recent development is what is collectively known as generative AI a subdiscipline of deep learning and adopts the same principles of training deep neural networks only this time as generative models rather than intelligent influence models this has largely been popularized by the likes of open AI chat GPT now we are seeing generative models being created for a myriad of purposes ranging
from story generation to character dialogue audio and art Assets in a myriad of forms so that is AI at a very high level and in each subdiscipline 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 for now let's talk about how they are utilized in games and the other subdiscipline that this field has subsequently created 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 has three application areas in games AI that plays as part of regular gameplay AI that creates in which it typically creates content for a game and AI that models properties of the game on top of how it is used there are two distinct ways in which it can be adopted in the project itself first there is AI that is part of the player experience the AI that the player will actually interact with secondly AI that is part of the game's
development and production the AI that is used to help improve quality 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 a specific subset AI that plays as part of the player experience using AI as part of the development process is a more recent development 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 are 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 approach is adopted and what specific use cases exist for it 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 game's 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 plus there are specific problems that AI is required to solve this
includes not just making decisions in the interests of a player's entertainment but knowing how to move characters around the world be it in 2D or 3D reacting to the player's behavior in ways that are contextually relevant and consistent and facilitating the fiction of the game's narrative in ways that support the players's enjoyment Al 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 perance of the game itself please refer to my recent video on what makes AI difficult for
video games to find out more this has led to a subdiscipline 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 focused on our first application category AI that plays as part of regular gameplay this creates the behavior of non-player characters or NPCs I have covered many of these over the years in my videos on this channel 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 optimal paths finite State machines seen in Doom halflife and even contemporary games like The Last of Us encapsulate relevant behaviors a character May execute and the conditions which necessitate which behavior remains active Behavior trees popularized by by Halo provide mechanisms to identify sequences of actions relevant to current context while also ensuring behaviors can quickly shift based on iname events goal oriented action planning in fear computes sequences of actions to solve a particular goal and then translates that
into a series of transitions within a finite State machine utility AI is used to help identify the best actions to execute in a given situation or the best goal to solve in the current contexts 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 treesearch 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 humanlike as discussed in my dedicated AI 101 episode on machine learning for games it's not that pervasive in this category that isn't to say that ml is not adopted in games experience there are examples of ml being used for the likes of NPCs and games as far back as creatures in black and white in 1996 and 2001 respectively but it has largely seen more success in recent years notably in the likes of opponent racers in Moto GP the Sophie AI of gr Turismo 7 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 the dyars in Forza which are a special instance given that they model the behavior of players a topic I'll discuss later and then reproduce it in front of other players so having 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 BCG is a topic that is often considered not to be AI but this is a philosophy that denies a fundamental aspect of the approach PCG algorithms intelligently apply rules and processes that craft content with respect to a predetermined notion of quality this heuristic of what is considered a good decision or not during generation is often then 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 respect 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 a model trained from existing examples at the time of writing generative AI for games is a big talking point the production challenges limitations and legal requirements are not currently established and the number of games that have adopted this in a released product is still markedly small as such this is the
area of this taxonomy that will will no doubt see significant change when I update it in the future but in the meantime let's look at two other major developments the first is in realtime 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 that upscales images 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 is 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 dis space on the players PlayStation 5 the final aspect of AI for player experience is how machine learning is used to model player Behavior we already discussed player modeling in the context of AI opponents like Forza but there's also performance for matchmaking purposes Xbox's true skill and true match
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 matchmaking approach for their ever popular MOA Dota 2 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 game's production is a concept that only existed in a handful of examples even 15 years ago the Innovations and deep learning over the past 10 to 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 approaches as part of a game production pipeline once again we break this down into three applications AI that plays that creates and models so let's dig into it some more 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 game's production given the very nature of the field bugs and issues can emerge in a game in a myriad of ways be it broken features 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 help automate that repetitive activity but also run curiosity-driven
algorithms to ensure they explore the game and try out different behaviors to see what new bugs could occur we've seen this already in the channel as I dug into the Bots and ubisoft's division franchise me mother likes of Electronic Arts have shared their work on a myriad of titles recently at the game developers conference plus smaller companies like model AI are also providing these tools such that they are more accessible to Indie developers 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 but this is already an area that has seen significant gains 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 where AI is being used to resolve the production challenge of finding blend points between animations this technology has appeared in my detailed breakdowns of games such as Hitman and the last of his part two but it's not the only part of the visual aspects of games that have seen Aid driven Innovation texture upscaling which is
a process whereby AI can take our assets and reproduce them at higher quality in an offline fashion is one that first emerged courtesy of moding communities who sought to give games that were 10 and 20 years old a bit of a facelift it has now made its way into game Productions 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 compiled into the game build to find out more about how it works check out my dedicated
episode on the topic two final things to mention in this space are the use of AI for accessibility and for code generation AI that can generate subtitles from dialogue and voice chat in real time plus the use of text to speeech systems for reading alloud menu items I consider this as part of production rather than player experience given the adoption of the technology may help offset costs and production time in creating these assets otherwise similarly code generation using generative tools like GitHub co-pilot can help developers more rapidly iterate on Initial Ideas before refining them into
production ready assets moving into AI that models while there is some experimentation in areas such as physics there are two main areas in which this is currently employed the first is employer modeling for analytics this is more or less the practice of data sciences and extrapolating information about a player base with some AI adoption in there at times to help developers understand how Their audience 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 fund for everyone else be it by harassing others via text or voice chat or through their actions within the gamespace similarly some go one step further and utilize cheats and other mechanisms to circumvent regular play and this is an increasing problem with a lot of persistent online games it's in
the best interests of Studios to ensure their online community is as healthy as possible especially when so many games seek to monetize their players naturally the internal mechanisms of many of these systems is relatively unknown however developers such as valve have openly discuss their efforts of using deep learning to catch cheaters and their popular shooter Counter Strike thanks for getting this far and surviving this fairly heavy breakdown I hope you found this useful but it helps give a clearer picture of the state of the industry or provides guidance on your own interests in the subject
identifies areas to dig into further or it just settles an argument you had with a friend then consider my job done I doubt this answers everyone's questions given there is so much ground to cover and I really hope I didn't miss anything but there are over 100 videos on this channel on the subject if you want to dig into this some more 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 and to make
things easier for everyone this big shiny graphic that you see right here that I spent far too much time developing is available as an infographic that you can download and share with your friends and colleagues the next time someone tells you that you don't understand how AI can be used in video games which I'm sure happens all the time down the pub or at least it does in mine you can proudly display this diagram but because after all the most reliable sources of information out there are shouty self-indulgent old white guys on the internet who
share their perspectives on video platforms speaking of don't forget to subscribe on YouTube both this Channel and my second Channel Ai and games plus as well as twitch Tik Tok and oh yeah the branching Factor podcast on Spotify or apple podcasts you know this started out as a joke and no longer I write it the more horrified with myself I become Ai and games is a crowdfunded series and it's thanks to my viewers that new videos can continue to drop to find out how to support the show please visit the links on screen or check
out the video description to find out how you can support Ai and games on patreon YouTube and substack take care of yourselves and I'll be [Music] back n