Programming Game AI by Example
Publisher: Wordware Publishing, Inc.
Published: November 25, 2004
Language: eng
Format: Paperback
Number of pages: 500
ISBN-13: 9781556220784
Subjects: Artificial intelligence; Computer Programming; Video & Electronic - General; Computers; Computer games; Computers - Games; Programming - General; Computer Books: General; Programming; Artificial Intelligence - General; Computers / Computer Graphics / General; Computer Graphics - General; Computer graphics; Computer software; Design
Table of contents: label: Foreword
pagenum: xiii; label: Acknowledgments
pagenum: xvii; label: Introduction
pagenum: xix; label: Chapter 1
title: A Math and Physics Primer
pagenum: 1; label: Mathematics
pagenum: 1; label: Cartesian Coordinates
pagenum: 1; label: Functions and Equations
pagenum: 3; label: Exponents and Powers
pagenum: 5; label: Roots of Numbers (Radicals)
pagenum: 6; label: Simplifying Equations
pagenum: 7; label: Trigonometry
pagenum: 10; label: Rays and Line Segments
pagenum: 10; label: Angles
pagenum: 11; label: Triangles
pagenum: 12; label: Vectors
pagenum: 18; label: Adding and Subtracting Vectors
pagenum: 19; label: Multiplying Vectors
pagenum: 20; label: Calculating the Magnitude of a Vector
pagenum: 20; label: Normalizing Vectors
pagenum: 21; label: Resolving Vectors
pagenum: 22; label: The Dot Product
pagenum: 23; label: A Practical Example of Vector Mathematics
pagenum: 24; label: The Vector2D Struct
pagenum: 25; label: Local Space and World Space
pagenum: 26; label: Physics
pagenum: 28; label: Time
pagenum: 28; label: Distance
pagenum: 29; label: Mass
pagenum: 29; label: Position
pagenum: 30; label: Velocity
pagenum: 30; label: Acceleration
pagenum: 32; label: Force
pagenum: 38; label: Summing Up
pagenum: 40; label: Chapter 2
title: State-Driven Agent Design
pagenum: 43; label: What Exactly Is a Finite State Machine?
pagenum: 44; label: Implementing a Finite State Machine
pagenum: 45; label: State Transition Tables
pagenum: 47; label: Embedded Rules
pagenum: 48; label: The West World Project
pagenum: 50; label: The BaseGameEntity Class
pagenum: 52; label: The Miner Class
pagenum: 53; label: The Miner States
pagenum: 54; label: The State Design Pattern Revisited
pagenum: 55; label: The EnterMineAndDigForNugget State
pagenum: 60; label: Making the State Base Class Reusable
pagenum: 62; label: Global States and State Blips
pagenum: 63; label: Creating a State Machine Class
pagenum: 64; label: Introducing Elsa
pagenum: 67; label: Adding Messaging Capabilities to Your FSM
pagenum: 69; label: The Telegram Structure
pagenum: 70; label: Miner Bob and Elsa Communicate
pagenum: 71; label: Message Dispatch and Management
pagenum: 71; label: The MessageDispatcher Class
pagenum: 73; label: Message Handling
pagenum: 75; label: Elsa Cooks Dinner
pagenum: 78; label: Step One
pagenum: 78; label: Step Two
pagenum: 79; label: Step Three
pagenum: 80; label: Step Four
pagenum: 80; label: Step Five
pagenum: 81; label: Summing Up
pagenum: 82; label: Chapter 3
title: How to Create Autonomously Moving Game Agents
pagenum: 85; label: What Is an Autonomous Agent?
pagenum: 85; label: The Vehicle Model
pagenum: 87; label: Updating the Vehicle Physics
pagenum: 89; label: The Steering Behaviors
pagenum: 91; label: Seek
pagenum: 91; label: Flee
pagenum: 92; label: Arrive
pagenum: 93; label: Pursuit
pagenum: 94; label: Evade
pagenum: 96; label: Wander
pagenum: 96; label: Obstacle Avoidance
pagenum: 99; label: Finding the Closest Intersection Point
pagenum: 100; label: Calculating the Steering Force
pagenum: 103; label: Wall Avoidance
pagenum: 104; label: Interpose
pagenum: 106; label: Hide
pagenum: 107; label: Path Following
pagenum: 110; label: Offset Pursuit
pagenum: 111; label: Group Behaviors
pagenum: 113; label: Separation
pagenum: 115; label: Alignment
pagenum: 116; label: Cohesion
pagenum: 117; label: Flocking
pagenum: 118; label: Combining Steering Behaviors
pagenum: 119; label: Weighted Truncated Sum
pagenum: 120; label: Weighted Truncated Running Sum with Prioritization
pagenum: 121; label: Prioritized Dithering
pagenum: 123; label: Ensuring Zero Overlap
pagenum: 124; label: Coping with Lots of Vehicles: Spatial Partitioning
pagenum: 126; label: Smoothing
pagenum: 130; label: Chapter 4
title: Sports Simulation — Simple Soccer
pagenum: 133; label: The Simple Soccer Environment and Rules
pagenum: 134; label: The Soccer Pitch
pagenum: 135; label: The Goals
pagenum: 138; label: The Soccer Ball
pagenum: 138; label: SoccerBall::FuturePosition
pagenum: 141; label: SoccerBall::TimeToCoverDistance
pagenum: 142; label: Designing the AI
pagenum: 144; label: The SoccerTeam Class
pagenum: 145; label: The Receiving Player
pagenum: 146; label: The Closest Player to the Ball
pagenum: 146; label: The Controlling Player
pagenum: 146; label: The Supporting Player
pagenum: 146; label: SoccerTeam States
pagenum: 152; label: Field Players
pagenum: 155; label: Field Player Motion
pagenum: 155; label: Field Player States
pagenum: 156; label: Goalkeepers
pagenum: 170; label: Goalkeeper Motion
pagenum: 170; label: Goalkeeper States
pagenum: 171; label: Key Methods Used by the AI
pagenum: 176; label: SoccerTeam::isPassSafeFromAllOpponents
pagenum: 177; label: SoccerTeam::CanShoot
pagenum: 182; label: SoccerTeam::FindPass
pagenum: 184; label: SoccerTeam::GetBestPassToReceiver
pagenum: 185; label: Making Estimates and Assumptions Work for You
pagenum: 189; label: Summing Up
pagenum: 189; label: Chapter 5
title: The Secret Life of Graphs
pagenum: 193; label: Graphs
pagenum: 193; label: A More Formal Description
pagenum: 195; label: Trees
pagenum: 196; label: Graph Density
pagenum: 196; label: Digraphs
pagenum: 196; label: Graphs in Game AI
pagenum: 197; label: Navigation Graphs
pagenum: 198; label: Dependency Graphs
pagenum: 199; label: State Graphs
pagenum: 201; label: Implementing a Graph Class
pagenum: 203; label: The GraphNode Class
pagenum: 204; label: The GraphEdge Class
pagenum: 205; label: The SparseGraph Class
pagenum: 207; label: Graph Search Algorithms
pagenum: 209; label: Uninformed Graph Searches
pagenum: 210; label: Depth First Search
pagenum: 210; label: Breadth First Search
pagenum: 224; label: Cost-Based Graph Searches
pagenum: 231; label: Edge Relaxation
pagenum: 231; label: Shortest Path Trees
pagenum: 233; label: Dijkstra’s Algorithm
pagenum: 233; label: Dijkstra with a Twist: A*
pagenum: 241; label: Summing Up
pagenum: 247; label: Chapter 6
title: To Script, or Not to Script, That Is the Question
pagenum: 249; label: Just What Is a Scripting Language?
pagenum: 249; label: What a Scripting Language Can Do for You
pagenum: 251; label: Dialogue Flow
pagenum: 253; label: Stage Direction
pagenum: 254; label: AI Logic
pagenum: 255; label: Scripting in Lua
pagenum: 255; label: Setting Up Your Compiler to Work with Lua
pagenum: 256; label: Getting Started
pagenum: 256; label: Lua Variables
pagenum: 258; label: Lua Types
pagenum: 260; label: Logical Operators
pagenum: 263; label: Conditional Structures
pagenum: 264; label: Rock-Paper-Scissors in Lua
pagenum: 265; label: Interfacing with C/C++
pagenum: 268; label: Accessing Lua Global Variables from within Your C++ Program
pagenum: 269; label: Accessing a Lua Table from within Your C++ Program
pagenum: 271; label: Accessing a Lua Function from within C++
pagenum: 273; label: Exposing a C/C++ Function to Lua
pagenum: 274; label: Exposing a C/C++ Class to Lua
pagenum: 276; label: Luabind to the Rescue!
pagenum: 276; label: Setting Up Luabind
pagenum: 276; label: Scopes
pagenum: 277; label: Exposing C/C++ Functions Using Luabind
pagenum: 278; label: Exposing C/C++ Classes Using Luabind
pagenum: 279; label: Creating Classes in Lua Using LuaBind
pagenum: 281; label: luabind::object
pagenum: 282; label: Creating a Scripted Finite State Machine
pagenum: 285; label: How It Works
pagenum: 285; label: The States
pagenum: 289; label: GoHome
pagenum: 290; label: Sleep
pagenum: 290; label: GoToMine
pagenum: 291; label: Useful URLS
pagenum: 292; label: It Doesn’t All Smell of Roses
pagenum: 292; label: Summing Up
pagenum: 293; label: Chapter 7
title: Raven: An Overview
pagenum: 295; label: The Game
pagenum: 295; label: Overview of the Game Architecture
pagenum: 296; label: The Raven_Game Class
pagenum: 297; label: The Raven Map
pagenum: 299; label: Raven Weapons
pagenum: 301; label: Projectiles
pagenum: 302; label: Triggers
pagenum: 303; label: TriggerRegion
pagenum: 304; label: Trigger
pagenum: 305; label: Respawning Triggers
pagenum: 307; label: Giver-Triggers
pagenum: 308; label: Limited Lifetime Triggers
pagenum: 309; label: Sound Notification Triggers
pagenum: 310; label: Managing Triggers: The TriggerSystem Class
pagenum: 311; label: AI Design Considerations
pagenum: 313; label: AI Implementation
pagenum: 315; label: Decision Making
pagenum: 315; label: Movement
pagenum: 315; label: Path Planning
pagenum: 315; label: Perception
pagenum: 316; label: Target Selection
pagenum: 321; label: Weapon Handling
pagenum: 323; label: Putting It All Together
pagenum: 327; label: Updating the AI Components
pagenum: 328; label: Summing Up
pagenum: 331; label: Chapter 8
title: Practical Path Planning
pagenum: 333; label: Navigation Graph Construction
pagenum: 333; label: Tile Based
pagenum: 333; label: Points of Visibility
pagenum: 334; label: Expanded Geometry
pagenum: 335; label: NavMesh
pagenum: 335; label: The Raven Navigation Graph
pagenum: 336; label: Coarsely Granulated Graphs
pagenum: 336; label: Finely Grained Graphs
pagenum: 339; label: Adding Items to the Raven Navigation Graph
pagenum: 341; label: Using Spatial Partitioning to Speed Up Proximity Queries
pagenum: 342; label: Creating a Path Planner Class
pagenum: 342; label: Planning a Path to a Position
pagenum: 344; label: Planning a Path to an Item Type
pagenum: 346; label: Paths as Nodes or Paths as Edges?
pagenum: 348; label: An Annotated Edge Class Example
pagenum: 350; label: Modifying the Path Planner Class to Accommodate Annotated Edges
pagenum: 350; label: Path Smoothing
pagenum: 353; label: Path Smoothing Rough but Quick
pagenum: 354; label: Path Smoothing Precise but Slow
pagenum: 358; label: Methods for Reducing CPU Overhead
pagenum: 359; label: Precalculated Paths
pagenum: 359; label: Precalculated Costs
pagenum: 361; label: Time-Sliced Path Planning
pagenum: 363; label: Hierarchical Pathfinding
pagenum: 372; label: Getting Out of Sticky Situations
pagenum: 374; label: Summing Up
pagenum: 376; label: Chapter 9
title: Goal-Driven Agent Behavior
pagenum: 379; label: The Return of Eric the Brave
pagenum: 380; label: Implementation
pagenum: 382; label: Goal_Composite::ProcessSubgoals
pagenum: 385; label: Goal_Composite::RemoveAllSubgoals
pagenum: 386; label: Examples of Goals Used by Raven Bots
pagenum: 387; label: Goal_Wander
pagenum: 387; label: Goal_TraverseEdge
pagenum: 388; label: Goal_FollowPath
pagenum: 391; label: Goal_MoveToPosition
pagenum: 393; label: Goal_AttackTarget
pagenum: 395; label: Goal Arbitration
pagenum: 398; label: Calculating the Desirability of Locating a Health Item
pagenum: 400; label: Calculating the Desirability of Locating a Specific Weapon
pagenum: 401; label: Calculating the Desirability of Attacking the Target
pagenum: 403; label: Calculating the Desirability of Exploring the Map
pagenum: 403; label: Putting It All Together
pagenum: 404; label: Spin-offs
pagenum: 405; label: Personalities
pagenum: 405; label: State Memory
pagenum: 406; label: Example One — Automatic Resuming of Interrupted Activities
pagenum: 407; label: Example Two — Negotiating Special Path Obstacles
pagenum: 408; label: Command Queuing
pagenum: 410; label: Using the Queue to Script Behavior
pagenum: 412; label: Summing Up
pagenum: 414; label: Chapter 10
title: Fuzzy Logic
pagenum: 415; label: Crisp Sets
pagenum: 417; label: Set Operators
pagenum: 418; label: Fuzzy Sets
pagenum: 419; label: Defining Fuzzy Boundaries with Membership Functions
pagenum: 419; label: Fuzzy Set Operators
pagenum: 421; label: Hedges
pagenum: 423; label: Fuzzy Linguistic Variables
pagenum: 423; label: Fuzzy Rules
pagenum: 424; label: Designing FLVs for Weapon Selection
pagenum: 425; label: Designing the Desirability FLV
pagenum: 426; label: Designing the Distance to Target FLV
pagenum: 427; label: Designing the Ammo Status FLV
pagenum: 428; label: Designing the Rule Set for Weapon Selection
pagenum: 428; label: Fuzzy Inference
pagenum: 429; label: Rule One
pagenum: 429; label: Rule Two
pagenum: 430; label: Rule Three
pagenum: 430; label: Defuzzification
pagenum: 433; label: From Theory to Application: Coding a Fuzzy Logic Module
pagenum: 437; label: The FuzzyModule Class
pagenum: 437; label: The FuzzySet Base Class
pagenum: 439; label: The Triangular Fuzzy Set Class
pagenum: 440; label: The Right Shoulder Fuzzy Set Class
pagenum: 441; label: Creating a Fuzzy Linguistic Variable Class
pagenum: 443; label: Designing Classes for Building Fuzzy Rules
pagenum: 445; label: How Raven Uses the Fuzzy Logic Classes
pagenum: 451; label: The Combs Method
pagenum: 452; label: Fuzzy Inference and the Combs Method
pagenum: 454; label: Implementation
pagenum: 455; label: Summing Up
pagenum: 455; label: Last Words
pagenum: 457; label: Appendix A
title: C++ Templates
pagenum: 459; label: Appendix B
title: UML Class Diagrams
pagenum: 465; label: Appendix C
title: Setting Up Your Development Environment
pagenum: 475; label: References
pagenum: 477; label: Bugs and Errata
pagenum: 479; label: Index
pagenum: 481