Craft

Good books for a gamedev AI programmer

Nov 18, 20248 min
Good books for a gamedev AI programmer

After the article about books for a gamedev programmer's self-development, people asked me to write more about the AI side and what's worth reading on the topic. For a game-AI programmer the situation with books is similar, but with a few interesting quirks. What matters here is not so much the depth of knowledge as your hands-on familiarity with the tools, libraries and technologies in general — and given that new approaches develop at a striking pace (striking for gamedev, of course). It feels like behavior trees (BT) only started being used some 10 years ago, yet they're already at revision 4.x (behaviortree.dev). But it's important not to fixate on dragging fashionable gadgets into the project: the fundamentals remain the most important thing you can get. It's like the parable of the fishing rod — give a man a fish and he eats for a day; give him a rod and he feeds himself for life. The rod here is knowing how a thing works, not how it can be used.

AI still stands apart in gamedev, because there are still no standards for building game logic: each studio solves its own unique technical and engineering problems and has to find a balance between something new and the overall stability of the game. This path is littered with trial and error, even if you've already walked it before, and few people can help you spot the mistakes in advance — simply because they walked a different path, with their own rakes and crutches. It's even worse when a famous developer joins the team and starts selling their solutions and experience, which often don't mesh with what the team has built. But this article isn't about that — it's about useful books.

Unfortunately, there aren't that many good books, and internal talks and presentations from GDC and game-adjacent conferences — not to mention a company's own developments and source code — are guarded and shared very rarely, read: almost never.

Books on game AI

AI for Game Developers

AI for Game Developers

This is probably the best book if you want to start learning the concepts of building AI for games. Think of it as "Game AI for Dummies in 21 Days" — there used to be a series of books about various programming languages with a similar name. Overall this book is the starting point for everyone, and you'll most likely be offered it to read at the studio — it'll be in the local library. As always, it's better to read it in the original, because our translators don't always render the phrasing correctly.

The authors explain a fairly wide range of techniques, solutions and strategies used in game development in simple, clear language — with one small caveat: simple if you've already managed to read other dev books, clear if you've already tried doing something yourself. The information is presented in accessible language for people with different levels of experience and a general background in game development. The book is well structured, with a balance of theory and practical examples. Bourg's approach helps you understand some AI concepts like BT, activities, interruptions, monitors, and so on. It does a decent job covering game-AI concepts such as decision-making, learning and perception (EOS, environment obstacle system) — I touched on a similar system in this article.

What else you'll learn from the book:

Game AI Pro

Game AI Pro

A book series devoted to artificial intelligence in computer games. Each book is a collection of articles and the experience of real developers who share their knowledge and practical approaches. Each book is organized into chapters devoted to topics developers often run into. It's better to read it in parallel with the first book on the list — the chapters that overlap in topic. That way there's more material to chew on and a chance to see more examples on the topic.

Game Engine Gems

Game Engine Gems

This series offers stories about the making of already-released games — something like a printed podcast with valuable tips, techniques and best practices from experienced developers. The format consists of short stories and articles from the masters, which makes it an engaging retrospective overview of mistakes and recommendations about what you should (and, more importantly, shouldn't) do in game development. Don't let the title fool you — it's not only about game engines; over time the volumes came to cover practically every aspect of development. On one hand, this way of presenting the material makes it easy to read — I got through all the books in just a month of evenings; on the other hand, if you've already done something yourself or shipped a game, you'll see that the topics are covered superficially. To be fair, all the chapters are written to a good literary standard (again, these are tales from the masters about making a game and the greener grass). The first one is better read separately, since it's mostly about engines, while the second and third already speak more closely about AI or topics around it.

! Better to read in the original — our translators use the context clumsily and often cut out whole paragraphs!

To be clear: these books won't give you a full understanding of how to build a game engine or write good, interesting enemy AI, no. The book barely discusses the technical side; instead, the focus is on some narrow, specific topics that came up during development and on describing mistakes post-mortem. As a supplement to the more technical books you can find on game-engine architecture and game AI, the book is worthy and definitely deserves a place on this list.

Highlights:

The Pyramid of Game Design

The Pyramid of Game Design

The book describes a model for designing AI in computer games. This model is meant to help game developers connect the various aspects of game design. It's a theory of how to build the links in a game: between quests, between items, between NPCs, between the player and the environment. Over years of development I've never come across practical examples of applying it in full, the way it's described in the book. As a theory it looks quite good and coherent, but as a practical approach I've never seen it anywhere. Individual parts, yes, are used fairly widely — more on that below — but "emotional programming of players" even sounds sketchy, although recent games like Inscryption or Buckshot Roulette seem to have tried to apply certain chapters of this book in practice.

Topics that may interest AI programmers and designers:

Behavioral Mathematics for Game AI

Behavioral Mathematics for Game AI

This is a valuable handbook for game developers and AI programmers, but very boring. I got through the book after three attempts. Still, if you want to understand the mathematical foundations of NPC behavior models in games and to appeal to them in arguments with a designer, this book will definitely be useful. It's written in a fairly confusing way — there may have been translation difficulties here too — and it happened that concepts from the previous chapter would be forgotten by the start of the next one. It's more like a reference for those who want to see how certain game concepts are perceived by designers in theory. Keep in mind the author conveys knowledge from the late 90s or early 2000s, and some approaches are seriously outdated and hardly used now. Don't read it cover to cover — it's a reference: if a chapter doesn't grab you after five pages, move to the next. Because the chapters are poorly organized, IMO, you should read them not in the order they're laid out but in the order of the questions that arise in your head. Well, it is what it is, can't be fixed now. The book hooked me with its author, who took part in creating the AI for the first Majesty — if anyone remembers that game, I think many will recognize the solutions of those years in these descriptions.

Behavioral Mathematics for Game AI — inside

AI Game Programming Wisdom

AI Game Programming Wisdom

A book series devoted to techniques in artificial intelligence applied to game development. These are stories about solutions that existed in early-2000s games. The series emphasizes practical approaches and solving real AI problems.

Why I can recommend this series:

Why I can't recommend this series:

Conclusion

Thanks for reading. Throw interesting books and your opinions about them in the comments — I'll add them too.

← All articles