ML for Games Course documentation

AI 101 by AI and Games (Dr. Tommy Thompson)

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

AI 101 by AI and Games (Dr. Tommy Thompson)

To better understand the theory behind classical AI in Games, the best resources to watch are the excellent series of videos by Dr. Tommy Thompson on AI in Games called AI 101.

Dr Tommy Thompson works as an AI developer, researcher and consultant in the video game industry. In his YouTube channel, AI and Games, he studies what AI algorithms are used in games and how.

We would like to thank Dr. Tommy Thompson for providing detailed introductions for each video in this section.

Chapter 1: How AI is Actually Used in the Video Games Industry (2024) 🤖

When we talk about ‘AI in video games’ nowadays, what do we really mean? Game AI? Deep Learning? Generative AI? All of these are valid, but understanding how and where they’re adopted is super important. In this episode we provide a high-level overview of how artificial intelligence is adopted across the industry.

Chapter 2: Why is It Difficult to Make Good AI for Games? 🤔

If you’ve build AI for your games (or simply played a lot of them too), you’ll notice how difficult it is to make AI really shine in your game. In this episode we dig into some of the fundamental challenges faced by developers.

Chapter 3: Navigation Meshes 🗺️

As games moved into 3D, one of the biggest challenges was how to ensure a non-player character (NPC) could successfully move from one place to another. The solution is what is typically referred to as a ‘navigation mesh’: a data structure that tessellates a surface with a collection of polygons indicate of navigable space. This concept, popularised by Quake III Arena in 1999 has since become a standard tool in all 3D commercial game engines. Despite this, successful navigation is still a challenge for modern games to this day given the myriad of design challenges it presents.

📚 Additional Readings:

Chapter 4: Behavior Trees 🌳

While there are a myriad of approaches for controlling NPCs in games - many of which earn their own episodes in this series - the standard is Behaviour Trees. These relatively straightforward data structures were originally popularised by the Halo franchise and have since become the norm for many large-scale big budget productions and are the default AI tool in Unreal Engine.

📚 Additional Readings:

Chapter 5: Finite State Machines 🤖

Finite State Machines (FSMs) have existed since the very beginning not just of AI for video games, but the field of artificial intelligence as a whole.

A simple system of connected ‘states’ that allows for designers to encapsulate how a character should operate in specific contexts. Many of your favourite games from the 1980s and 1990s adopted FSMs, from the arcade days of Pac-Man to the birth of first-person shooters with DOOM.

While they’re still used today in popular franchises like Marvel’s Spider-Man and The Last of Us, this is largely thanks to the implementation in Valve’s Half-Life which set a new standard for their adoption in games.

📚 Additional Readings:

Chapter 6: Goal Oriented Action Planning 📝

Goal Oriented Action Planning was one of the most important innovations in AI for games in the mid 2000s and is arguably what led to Monolith’s first-person shooter F.E.A.R. still being considered to have the best AI in video games. But it’s really quite simple: the combination of finite state machines with AI planning technology that dates back as far as the 1970s.

📚 Additional Readings:

Chapter 7: Director AI for Balancing In-Game Experiences 📣

So far the topics have focused on AI that is built to control non-player characters, but what if we want to use AI not just for individual behaviours but also designing the player experience.

This has led to a collection of approaches collectively known as Director AI, with the term adopted for this design philosophy derived from its use in Valve’s Left 4 Dead.

Chapter 8: Utility AI Helps NPCs Decide What To Do Next 📈

Sometimes an AI system could have a collection of valid options to select from, but it can’t tell which is the best for this context.

While we could now train a model using deep learning to determine contextual validity, we have long since used utility AI as a means to embed designer knowledge to determine the validity of an action or goal.

📚 Additional Readings:

Chapter 9: How Barks Make Videogame NPCs Look Smarter 🗣️

While building AI for games is difficult, communicating the inner workings of these systems to players is just as demanding. One of the simplest solutions to this problem is the use of barks: pre-built text and/or audio that helps communicate the state of an AI agent in ways that make sense in the context of play.

That might sound pretty simple, but you’d be surprised how effective it is in practice.

📚 Additional Readings:

Now that we studed the theory behind these classical AI in Games algorithms. Let’s learn how to implement some of them in Unity and Unreal.

Chapter 10: How Machine Learning is Transforming the Video Games Industry 🤖

As you will have gathered watching these videos, machine learning has not been as prominent in the adoption of AI for non-player characters when compared to symbolic methods.

In this episode we dig into not just how it has been used in player facing systems, but also the interesting problem spaces it has been applied to in video games production.

< > Update on GitHub