07 January 2024

"Artificial Intelligence in Games" by Paul Roberts

The best book I've read so far on how to develop game AI is AI for Games by Ian Millington. The problem is that there aren't many books on the market that cover the game AI branch in a practical way. The ones that exist are either too theoretical or they only cover a couple of topics, such as pathfinding and state machines. That's why I read Game AI Programming with Unity by Paul Roberts with eagerness.

Fortunately, it has a practical and introductory approach. I would recommend that anyone who wants to get started in the world of game AI read this book before Millington's, since Roberts's book doesn't go as deep, but it's written in a more plain language. It's ideal for a first contact with the different branches of AI used in games, to then go deeper with Millington.

The topics it covers are varied and interesting: steering behaviors, terrain analysis with influence maps, pathfinding, decision structures, fuzzy logic, minimax, genetic algorithms, and neural networks. Unlike Millington's, you won't end up with enough knowledge to implement your own version with Roberts's book, but you will have a good understanding of the main concepts, which will make things much easier when you start reading more detailed texts.

The Kindle digital version has some defects that have made it difficult to progress at times, mainly that the formulas are not well formatted and have lost most of the operators in the digital conversion. So it's very difficult to get an idea of the formula just from what's in it. Fortunately, the formulas are not abundant or complex, so in the end you end up figuring out what they mean, even though you have to think about it for a while. I really don't understand why he didn't do the same with the diagrams, which are hand-drawn and digitized, but at least they are understandable. If he had done the same with the formulas, there would have been no problem.

But more than the theory, whose depth I have already said is quite scarce, where the book really shines is with the practical part. The author has developed a series of mini-games in Unity to test the concepts of the book. So, after the theoretical part of each chapter, there is another part in which he guides you, step by step, in a tutorial format, to implement those concepts to create an AI that will face you in the mini-game. It must be recognized that the author has made an effort to create complex, well-presented mini-games that are very well suited as a platform for testing theoretical concepts. I think this is the main value of the book. There are others that explain the different concepts better and more in depth, but they stay in theory. Having the opportunity to tinker with and test these concepts directly in a game is something that only this book has offered me so far.

So, it's a book that I recommend. Recognizing its limitations and defects, I think it's a book that adds value to the limited ecosystem of books on game AI.