https://github.com/PacktPublishing/Unity-2018-Artificial-Intelligence-Cookbook-Second-Edition
1 Behaviors - Intelligent Movement
Behaviors – Intelligent Movement, explores some of the most interesting movement algorithms based on the steering behavior principles developed by Craig Reynolds and work from Ian Millington.
They act as a foundation for most of the AI used in advanced games and other algorithms that rely on movement, such as the family of path-finding algorithms.
Navigation, covers path-finding algorithms for navigating complex scenarios.
It will include some ways of representing the world using different kinds of graph structure, and several algorithms for finding a path, each aimed to different situations.
3 Decision Making (已看)
Decision Making, explains different decision-making techniques that are flexible enough to adapt to different types of games, and robust enough to let us build modular decision-making systems.
The New NavMesh API, shows the inner workings of the NavMesh API introduced in Unity 5.6, and explains how it enables us to grasp the power of the NavMesh engine and tune it in real time.
Coordination and Tactics, deals with a number of different recipes for coordinating different agents as a whole organism, such as formations and techniques that allow us make tactical decisions based on graphs, such as waypoints and influence maps.
Agent Awareness, explores different ways to simulate sense stimuli on an agent.
We will learn how to use tools we already know to create these simulations: colliders and graphs.
7 Board Games and Applied Search AI
Board Games and Applied Search AI, covers a family of algorithms for developing board games, as well as turn-based-game techniques for creating AI.
Learning Techniques, explores the field of machine learning. It will give us a great head-start in our endeavor to learn and apply machine learning techniques into our games.
9 Procedural Content Generation
Procedural Content Generation, explores different techniques for enabling replayability in our games by creating content procedurally.
It will give us some pointers in the right direction for different types of content.
Miscellaneous, introduces new techniques and uses algorithms that we will have learned in previous chapters to create new behaviors that don't quite fit in a definite category.
1 Behaviors - Intelligent Movement
In this chapter, we will develop AI algorithms for movement by covering the following recipes:
- Creating the behaviors template
- Pursuing and evading
- Adjusting the agent for physics
- Arriving and leaving
- Facing objects
- Wandering around
- Following a path
- Avoiding agents
- Avoiding walls
- Blending behaviors by weight
- Blending behaviors by priority
- Shooting a projectile
- Predicting a projectile's landing spot
- Targeting a projectile
- Creating a jump system
Introduction
Creating the behaviors template
Steering serves as custom data type for storing the movement and rotation of the agent:
using UnityEngine; public class MySteering { // 角加速度 public float angular; // 加速度 public Vector3 linear; public MySteering() { angular = 0.0f; linear = new Vector3(); } }