Unity 2018 Artificial Intelligence Cookbook - Second Edition [2 ed.] 1788626176, 9781788626170

Interactive and engaging games come with intelligent enemies, and this intellectual behavior is combined with a variety

576 9 2MB

English Pages 334 Year 2018

Report DMCA / Copyright

DOWNLOAD EPUB FILE

Table of contents :
1: Behaviors - Intelligent Movement
Introduction
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

2: Navigation
Introduction
Representing the world with grids
Representing the world with points of visibility
Representing the world with a self-made navigation mesh
Finding your way out of a maze with DFS
Finding the shortest path in a grid with BFS
Finding the shortest path with Dijkstra
Finding the best-promising path with A*
Improving A* for memory – IDA*
Planning navigation in several frames – time-sliced search
Smoothing a path

3: Decision Making
Introduction
Choosing through a decision tree
Implementing a finite-state machine
Improving FSMs: hierarchical finite-state machines
Implementing behavior trees
Working with fuzzy logic
Making decisions with goal-oriented behaviors
Implementing a blackboard architecture
Experimenting with Unity's animation state machine

4: The New NavMesh API
Introduction
Setting up the NavMesh building components
Creating and managing NavMesh for multiple types of agents
Creating and updating NavMesh data at runtime
Controlling the lifetime of the NavMesh instance
Connecting multiple instances of NavMesh
Creating dynamic NavMeshes with obstacles
Implementing some behaviors using the NavMesh API

5: Coordination and Tactics
Introduction
Handling formations
Extending A* for coordination – A*mbush
Analyzing waypoints by height
Analyzing waypoints by cover and visibility
Creating waypoints automatically
Exemplifying waypoints for decision making
Implementing influence maps
Improving influence with map flooding
Improving influence with convolution filters
Building a fighting circle

6: Agent Awareness
Introduction
The seeing function using a collider-based system
The hearing function using a collider-based system
The smelling function using a collider-based system
The seeing function using a graph-based system
The hearing function using a graph-based system
The smelling function using a graph-based system
Creating awareness in a stealth game

7: Board Games and Applied Search AI
Introduction
Working with the game-tree class
Implementing Minimax
Implementing Negamax
Implementing AB Negamax
Implementing NegaScout
Implementing a Tic-Tac-Toe rival
Implementing a Checkers rival
Implementing Rock-Paper-Scissors AI with UCB1
Implementing regret matching

8: Learning Techniques
Introduction
Predicting actions with an N-Gram predictor
Improving the predictor – Hierarchical N-Gram
Learning to use Naïve Bayes classifier
Implementing reinforcement learning
Implementing artificial neural networks

9: Procedural Content Generation
Introduction
Creating mazes with Depth-First Search
Implementing the constructive algorithm for dungeons and islands
Generating landscapes
Using N-Grams for content generation
Generating enemies with the evolutionary algorithm

10: Miscellaneous
Introduction
Creating and managing Scriptable Objects
Handling random numbers better
Building an air-hockey rival
Implementing an architecture for racing games
Managing race difficulty using a rubber-band system

Unity 2018 Artificial Intelligence Cookbook - Second Edition [2 ed.]
 1788626176, 9781788626170

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
Recommend Papers