I’m about halfway through Unity 4.x Game AI Programming by Packt Publishing and I’m enjoying it quite a bit. Unity has been my engine of choice for about 4 years now, so I’m very familiar with it, but I haven’t done a lot of AI since the days of Quake and Unreal Tournament bots.

I should state right off the bat that this isn’t really a book for beginners. They explain the concepts well and have good code and good examples to back them up (nothing fancy, but they demonstrate the concepts nicely) but some programming knowledge and knowledge of Unity is assumed. All of the code is in C#, which isn’t a bad thing at all in my opinion, but may turn off some people who are new to the platform. It shouldn’t — C# really isn’t all that different from javascript, but I know some people have a mental block towards it. That said, if you just follow along and use the code provided, you should be in good shape.

I think the book does a great job of introducing someone both to a variety of AI concepts as well as practical implications and implementations of them. So first they show a random number generator (after explaining why they’re never really random) and then show how to use weighted averages in a simple dice game or a slot machine example. Another chapter demonstrates a couple of different examples of flocking type techniques (useful for simulating fish, birds, etc) and yet another breaks finite state machines (FSMs) into simple terms and how it’s useful in the context of game development.

If you have a little bit of experience with Unity and want to learn some of the basics of AI in the context of game development, this is a great book to do so. They don’t necessarily go into great detail on any of the subjects, but they do recommend other books on the subject if you want to dig further. That said, if you’ve done much AI in the past, most of this is probably going to be too simplistic and if you haven’t used Unity a lot or are still getting your footing with programming, it may be a little too advanced. I think for most people who have been using Unity for any amount of time will probably find it a good fit for them, though. I don’t think the authors could have really made it more advanced or more simple, as it’s not an easy topic to tackle in a book, but I think they did a great job of doing so. I’d give it 4.5/5 stars. And if you pick up the book or eBook today, you can take advantage of PacktPub’s 50% off sale.