A game has to be able to think, or at least imitate thought sufficiently to render a convincing representation of some character or phenomenon. This sort of logic requires planning on the part of the programmer: A swordfighter not only has to find his enemy and engage him in combat, but know how to react if the opponent runs away, dies, or summons his buddies. The better the game designer is at endowing characters with behaviors, capabilities, and reactions, the more realistic and exciting his or her games will be. A soldier that can shoot at targets in the distance is okay, but a soldier that can also lay an ambush, shoot around corners, and fight with a knife is a lot more exciting. AI Game Programming Wisdom 2
comprises a series of article from accomplished game programmers about designing games that feature complex and lifelike behavior.
The contributors--there are dozens--share their professional experience in the field of simulating life in software. Some of their examples are crystal-clear--Nick Porcino's block diagrams that explain the behavior of artificial insects are one example. What's more, the compilation is remarkably comprehensive, addressing such issues as how collectives (such as platoons of soldiers) exhibit behavior that takes into account the perceptions of their members (as well as the lack of information--the fog of war). This book is carefully designed to help game architects plan more exciting and realistic environments for their players. --David Wall
Topics covered: How to design a computer game in which computer-managed characters need to behave intelligently. There's coverage of how to encode a character's motivations, how to make a character relate to a group, how to make characters move through and perceive space, and how to make a character learn over time.
Preface Acknowledgments About the Cover Images Author Bios SECTION 1 GENERAL WISDOM 1.1 The Evolution of Game AI 1.2 The Illusion of Intelligence 1.3 Solving the Right Problem 1.4 12 Tips from the Trenches SECTION 2 USEFUL TECHNIQUES AND SPECIALIZED SYSTEMS 2.1 Building an AI Diagnostic Toolset 2.2 A General-Purpose Trigger System 2.3 A Data-Driven Architecture for Animation Selection 2.4 Realistic Character Behavior with Prioritized, Categorized Animation 2.5 Designing a GUI Tool to Aid in the Development of Finite-State Machines 2.6 The Beauty of Response Curves 2.7 Simple and Efficient Line-of-Sight for 3D Landscapes 2.8 An Open-Source Fuzzy Logic Library SECTION 3 PATHFINDING WITH A* 3.1 Basic A* Pathfinding Made Simple 3.2 Generic A* Pathfinding 3.3 Pathfinding Design Architecture 3.4 How to Achieve Lightning-Fast A* 3.5 Practical Optimizations for A* Path Generation SECTION 4 PATHFINDING AND MOVEMENT 4.1 Simple, Cheap Pathfinding 4.2 Preprocessed Solution for Open Terrain Navigation 4.3 Building a Near-Optimal Navigation Mesh 4.4 Realistic Turning between Waypoints 4.5 Navigating Doors, Elevators, Ledges, and Other Obstacles 4.6 Simple Swarms as an Alternative to Flocking SECTION 5 TACTICAL ISSUES AND INTELLIGENT GROUP MOVEMENT 5.1 Strategic and Tactical Reasoning with Waypoints 5.2 Recognizing Strategic Dispositions: Engaging the Enemy 5.3 Squad Tactics: Team AI and Emergent Maneuvers 5.4 Squad Tactics: Planned Maneuvers 5.5 Tactical Team AI Using a Command Hierarchy 5.6 Formations SECTION 6 GENERAL PURPOSE ARCHITECTURES 6.1 Architecting a Game AI 6.2 An Efficient AI Architecture Using Prioritized Task Categories 6.3 An Architecture Based on Load Balancing 6.4 A Simple Inference Engine for a Rule-Based Architecture 6.5 Implementing a State Machine Language 6.6 Enhancing a State Machine Language through Messaging SECTION 7 DECISION-MAKING ARCHITECTURES 7.1 Blackboard Architectures 7.2 Introduction to Bayesian Networks and Reasoning Under Uncertainty 7.3 A Rule-Based Architecture Using the Dempster-Shafer Theory 7.4 An Optimized Fuzzy Logic Architecture for Decision-Making 7.5 A Flexible Goal-Based Planning Architecture SECTION 8 FPS, RTS, AND RPG AI 8.1 First-Person Shooter Al Architecture 8.2 Architecting an RTS AI 8.3 An Economic Approach to Goal-Directed Reasoning in an RTS 8.4 The Basics of Ranged Weapon Combat 8.5 Level-Of-Detail AI for a Large Role-Playing Game 8.6 A Dynamic Reputation System Based on Event Knowledge SECTION 9 RACING AND SPORTS AI 9.1 Representing a Racetrack for the AI 9.2 Racing AI Logic 9.3 Training an AI to Race 9.4 Competitive AI Racing under Open Street Conditions 9.5 Camera AI for Replays 9.6 Simulating Real Animal Behavior 9.7 Agent Cooperation in FSMs for Baseball 9.8 Intercepting a Ball SECTION 10 SCRIPTING 10.1 Scripting: Overview and Code Generation 10.2 Scripting: The Interpreter Engine 10.3 Scripting: System Integration 10.4 Creating Scripting Languages for Nonprogrammers 10.5 Scripting for Undefined Circumstances 10.6 The Perils of Al Scripting 10.7 How Not to Implement a Basic Scripting Language SECTION 11 LEARNING 11.1 Learning and Adaptation 11.2 Varieties of Learning 11.3 GoCap: Game Observation Capture 11.4 Pattern Recognition with Sequential Prediction 11.5 Using N-Gram Statistical Models to Predict Player Behavior 11.6 Practical Natural Language Learning 11.7 Testing Undefined Behavior as a Result of Learning 11.8 Imitating Random Variations in Behavior Using a Neural Network 11.9 Genetic Algorithms: Evolving the Perfect Troll 11.10 The Dark Art of Neural Networks About the CD-ROM Index