• ISBN13: 9781556220784
  • Condition: NEW
  • Notes: Brand New from Publisher. No Remainder Mark.

Product Description
Programming Game AI by Example provides a comprehensive and practical introduction to the bread and butter AI techniques used by the game development industry, leading the reader through the process of designing, programming, and implementing intelligent agents for action games using the C++ programming language. Techniques covered include state- and goal-based behavior, inter-agent communication, individual and group steering behaviors, team AI, graph theory, searc… More >>

Programming Game AI by Example

5 thoughts on “Programming Game AI by Example”

  1. This book is simply one of the best AI texts that I have ever seen. The author has the ability (as those others who have visited his website will attest – http://www.ai-junkie.com/ai-junkie.html ) to take complex topics and break them down into simple, logical steps that make sense even to novice programmers such as myself.

    Throughout this book, he does that time and time again. He gives thorough examples and describes them very well. These are not “baby” examples that serve only to highlight this or that point – he delivers real, working examples that you could plug right into your own game or simulation. Take Chapter 4, for example. It is an elegant sports simulation of a Soccer match. This single chapter is worth the price of the entire book, in my opinion.

    The examples are cool. The code is modern and efficient. The techniques are those in use today.

    For years, I would buy a book on AI Programming, only to find that techniques were only hinted at and not fully explained. It was like, with those authors, they were keeping some mysterious trade-secrets all to themselves.

    This author doesn’t do that. He is confident enough to give you everything you need to know to program your own AI. Be it a Finite State Machine, an intricate sports simulation, or fuzzy logic – just to name a few of the topics you will find in this book. If you have his other book, you know that he is also adept at Neural Nets and GA.

    So, my advice is biased because I have read this book and I love it. I think you will, too. Buy this book. You won’t regret it.
    Rating: 5 / 5

  2. This book has a very high signal to noise ratio. No patsy italicization and explanations of simple concepts like inheritance and polymorphism, and no wasted space towards their explanation. And none of the tired dogma about how important design and washing hands after picking nose is. A book that doesn’t try to address everybody on planet Earth…what a concept. Don’t know what a singleton object is? The book politely refers to the internet, and moves on to provide game application for a multitude of the concepts typically learned during undergraduate CS work. Concepts like FSMs (agents!), Graph Theory (paths, obstacles), Fuzzy Logic, and more with the perfect mix of theory and reality (mostly reality, thankfully. I got a game to write). If you are comfortable with your C++ coding this book will throw light sometimes on even old, familiar concepts spun in a new gaming application that will have you going like `whoa…how cool and what a piece of cake!’. Its one of those cornerstone books, and I wouldn’t be surprised if it became a classic in the game community some day. Maybe. Who knows. A million stars but alas, Amazon limits me to five. p.s. I hope you dont get the impression from me that you need a CS degree to understand this book. No way! All you need are your excellent coding skills.
    Rating: 5 / 5

  3. I have read many game development books, and this is definitely one of the best ones out there. Just by flipping through the pages, you can see right away how much care Mr. Buckland has taken in writing this book. There are a plethora of diagrams and code examples, and the layout and organization is excellent. The balance between theory and implementation is just right. The writing style is concise and the book covers a lot of material, yet it is enjoyable and painless to read. Personally I also like the fact that the book is physically compact so it fits easily on my desk 🙂

    By far though, my favorite aspect of the book is the “real-life” examples he gives. It’s easy to skim over all the theory without really “absorbing” the material, but when you see the concrete examples, it jogs your brain and gets you thinking about how to actually apply it. For example, when discussing the basic idea of “states”, he doesn’t just make up a contrived example and leave it at that; he gives several examples from actual types of games. For example, a Quake style bot might implement FindArmor, FindHealth, SeekCover, and RunAway. Even the weapons may implement mini state machines like Move, TouchObject, and Die.

    Digging deeper into the actual content of the book, it covers all of the practical topics an AI programmer should know, such as FSMs, pathing, group behavior, scripting, fuzzy logic, etc. All topics are explained in enough detail that you can incorporate them comfortably in your game, and if you want to learn more, you have a solid foundation to build on. As it says in the book, being an AI programmer isn’t just about memorizing a handful of techniques, but also about how to apply them in combination. So, the book covers two concrete examples: a soccer game and a simple shooter game called Raven. To further your understanding, each section also contains some suggested practice exercises, like “Write code to update their sensory system so that a bot is able to sense when it is being shot at.” Finally, as a bonus, this book also talks about UML class diagrams in the appendix, which is very useful to know if you don’t already.

    It doesn’t talk about genetic algorithms or neural networks, but that seems like a good decision because those topics rarely come up in practical AI. If you want to learn more about those, Mr. Buckland has written another book called “AI Techniques for Game Programming”.

    Incidentally, notice that my review, plus all the reviews before mine, all contain the word “best”. This is no accident- this book is a gem, and should be required reading for anyone looking to get into game AI.
    Rating: 5 / 5

  4. Misleading Title

    This book has a misleading title. I think this book should be called “Fundamentals of Game Development” instead of Programming Game AI by Example. Sure the book delivers on what it promises, as so many reviewers have already mentioned, but I believe that his book teaches you something that no other book that at least I am aware of teaches – good software practices coupled with actual game development.

    There are dozens of books available in the market today claiming to teach you Game Architecture. I will not name the exact titles of such books but you know what I am talking about. I have read so many such books only to find myself becoming a graphics programmer. Not that I didn’t want to become a graphics programmer, but even after learning all that stuff, there was “something” missing. That something turns out to be design patterns related to game development. In other words, how to combine various game components together into a working game. The last place I expected to learn it in such an elegant and easy to understand manner was in an AI book.

    It’s my sincere belief that this is the best book on game development available in the market. Read that again, not just AI but Game Development. Thats right, no matter which of the numerous disciplines of game development you wish to specialize in, no matter which platform or technologies you want to develop for, you need this book. Period.

    The book starts off with the most relevant mathematics chapter that I have found in any game development book. Maybe I’m stupid, but this was the only book that explained to me what a radian was! The lesson on vectors presented many useful examples that are bread and butter of game development but for some reasons are ignored by mainstream game development books. For example, finding out whether a game agent is in front of the player of behind him.

    Next, it teaches you the “state design pattern”. To me this chapter alone is the entire cost of the book itself. I had never seen this discussed in any game development books. I believe this should be in the appendix of each book that claims to teach game development. Instead, almost all entry level game development books have a C++ primer, but never a primer on topics like the state design pattern or UML. In one appendix this book with teach you all the UML you need to get started. Did I mention the “telegram” pattern? Again, so many “beautiful” books claiming to teach you game architecture only end up teaching you graphics programming and using some API in general. This is the first book I have come across that taught this design pattern. Strange, given the fact that you cannot make a game without a robust HSM and some way of sending messages.

    Then it goes on to teach you how to create autonomous game agents. Whether you are into AI or not, this is something you need to know. But what I appreciated most about this chapter was the application of state machines and how physics is implemented in a game at an architectural level. Most books uses procedural approach when to comes to actual implementation. This book uses good object oriented techniques to show you how forces on an agent are accumulated and how it gets translated to the agent’s movement.

    While I was still amazed how much money I wasted trying to learn how things are put together, this book surprised me with a complete mini soccer game! Now, I learned more about game development from this single chapter than I had from reading complete so called game programming books.

    Each and every chapter in this book is a gem. If you are new to game development, then this book will provide you with the right direction to begin your career. If you already have read so many game programming books in the hope of making an actual game but were never able to do so then this book will seal the deal.

    To cut a long story short, the book also delves into graph theory, scripting and other material topics such as fuzzy logic that you can easily read from the index of the author’s website.

    Chapter 7 of this book teaches you how to create the AI of a FPS. Rest assured, you will end up learning more from this chapter than you initially sighed for. And you wont be disappointed. One way to think of this chapter is not an AI simulation, but the framework of an entire FPS game! Thats right, it contains everything except the graphics engine, sound engine etc. You can plug a 3D engine with it, along with other missing libraries and get a 3D game! Other books take a complete opposite approach. They go into great details as to how to create various game libraries and in the end slap you with a pathetic design to hang them on to. After reading this book, all the other game programming books will make sense.

    The only qualm I have with this book is that the author has not upgraded the scripting code on his web site. This book teaches you how to integrate Lua into your game engine. Since the publication of this book, Lua has been changed dramatically. Getting Lua, Luabind and Boost to work together was a nightmare, which I am still not able to do successfully. So now I am integrating python into my game. This is when you try to integrate their latest versions. They will work if you stick to the older ones though. But this does not render this chapter useless as you will still learn a lot from it.

    If you are beginning game programming, or have given it up in frustration, this book will get you back in the game! If I am asked to name one game development book that I want to suggest to a newbie (who knows C++), this is it. Pick it up with your eyes closed. You wont regret it.
    Rating: 5 / 5


    – How the author only deals with AI game programming and doesn’t put in a lot of fluff

    – The broad range of topics the book covers

    – The use of actual 2D examples and an actual game “Raven”


    – Use of “helper” files that have no explanation in the book (some are explained in previous chapters but the author should have included an appendix to list and explain all the files in the common directory)

    – The code explanation is shallow when you consider the fact that the author neglects to tell you about the, many and crucial, other files that are needed to run the program.

    – The actual code that can be downloaded from the web site needs a lot of tweaking before it even works (you should just be able to unzip it and run it).

    – Chapter 3 and how the author only includes the source code for a final all encompassing program instead of smaller easier to understand projects.

    – If you don’t know Win32GDI then learn because the book uses it extensively to output to the screen, and that can interfere with understanding the actual meat of the program.


    If you are going to buy this book make sure you have a lot of time on your hands to look through the source code, tweak it, and pull it apart. The book itself just doesn’t give enough explanation to allow a person to create their own version of the concepts without digging through the source code. Overall I would recommend the book to people with an intermediate knowledge of C++ and have very good 2D math skills. This book is a fine overview of major topics in game AI but is sorely lacking (add another 100 pgs of quality explanation on topics). It would probably be necessary to buy other books that are more specific in their focus.

    Rating: 3 / 5

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.