Preface
Part 1: Basic AI
Chapter 1: Introduction to AI
Understanding AI
AI in video games
AI techniques for video games
Finite state machines
Randomness and probability in AI
The sensor system
Flocking, swarming, and herding
Path following and steering
A* pathfinding
Navigation meshes
Behavior trees
Locomotion
Summary
Chapter 2: Finite State Machines
Technical requirements
Implementing the player's tank
Initializing the Tank object
,Shooting the bullet
Controlling the tank
Implementing a Bullet class
Setting up waypoints
Creating the abstract FSM class
Using a simple FSM for the enemy tank AI
The Patrol state
The Chase state
The Attack state
The Dead state
Taking damage
Using an FSM framework
The AdvancedFSM class
The FSMState class
The state classes
The NPCTankController class
Summary
Chapter 3: Randomness and Probability
Technical requirements
Introducing randomness in Unity
Randomness in computer science
The Unity Random class
, A simple random dice game
Learning the basics of probability
Independent and correlated events
Conditional probability
Loaded dice
Exploring more examples of probability in games
Character personalities
Perceived randomness
FSM with probability
Dynamically adapting AI skills
Creating a slot machine
A random slot machine
Weighted probability
A near miss
Summary
Further reading
Chapter 4: Implementing Sensors
Technical requirements
Basic sensory systems
Setting up our scene
The player's tank and the aspect class
The player's tank