Unity 5.x Game AI Programming Cookbook

Build and customize a wide range of powerful Unity AI systems with over 70 hands-on recipes and techniques

Unity 5.x Game AI Programming Cookbook

Jorge Palacios

2 customer reviews
Build and customize a wide range of powerful Unity AI systems with over 70 hands-on recipes and techniques
Mapt Subscription
FREE
$29.99/m after trial
eBook
$25.20
RRP $35.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$25.20
$44.99
$29.99p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781783553570
Paperback278 pages

Book Description

Unity 5 comes fully packaged with a toolbox of powerful features to help game and app developers create and implement powerful game AI. Leveraging these tools via Unity’s API or built-in features allows limitless possibilities when it comes to creating your game’s worlds and characters. This practical Cookbook covers both essential and niche techniques to help you be able to do that and more.

This Cookbook is engineered as your one-stop reference to take your game AI programming to the next level. Get to grips with the essential building blocks of working with an agent, programming movement and navigation in a game environment, and improving your agent's decision making and coordination mechanisms - all through hands-on examples using easily customizable techniques. Discover how to emulate vision and hearing capabilities for your agent, for natural and humanlike AI behaviour, and improve them with the help of graphs. Empower your AI with decision-making functions through programming simple board games such as Tic-Tac-Toe and Checkers, and orchestrate agent coordination to get your AIs working together as one.

Table of Contents

Chapter 1: Behaviors – Intelligent Movement
Introduction
Creating the behavior template
Pursuing and evading
Arriving and leaving
Facing objects
Wandering around
Following a path
Avoiding agents
Avoiding walls
Blending behaviors by weight
Blending behaviors by priority
Combining behaviors using a steering pipeline
Shooting a projectile
Predicting a projectile's landing spot
Targeting a projectile
Creating a jump system
Chapter 2: Navigation
Introduction
Representing the world with grids
Representing the world with Dirichlet domains
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
Chapter 3: Decision Making
Introduction
Choosing through a decision tree
Working a finite-state machine
Improving FSMs: hierarchical finite-state machines
Combining FSMs and decision trees
Implementing behavior trees
Working with fuzzy logic
Representing states with numerical values: Markov system
Making decisions with goal-oriented behaviors
Chapter 4: Coordination and Tactics
Introduction
Handling formations
Extending A* for coordination: A*mbush
Creating good waypoints
Analyzing waypoints by height
Analyzing waypoints by cover and visibility
Exemplifying waypoints for decision making
Influence maps
Improving influence with map flooding
Improving influence with convolution filters
Building a fighting circle
Chapter 5: 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
Chapter 6: Board Games AI
Introduction
Working with the game-tree class
Introducing Minimax
Negamaxing
AB Negamaxing
Negascouting
Implementing a tic-tac-toe rival
Implementing a checkers rival
Chapter 7: Learning Techniques
.Introduction
Predicting actions with an N-Gram predictor
Improving the predictor: Hierarchical N-Gram
Learning to use Naïve Bayes classifiers
Learning to use decision trees
Learning to use reinforcement
Learning to use artificial neural networks
Creating emergent particles using a harmony search
Chapter 8: Miscellaneous
Introduction
Handling random numbers better
Building an air-hockey rival
Devising a table-football competitor
Creating mazes procedurally
Implementing a self-driving car
Managing race difficulty using a rubber-banding system

What You Will Learn

  • Use techniques such as A*and A*mbush to empower your agents with path finding capabilities.
  • Create a representation of the world and make agents navigate it
  • Construct decision-making systems to make the agents take different actions
  • Make different agents coordinate actions and create the illusion of technical behavior
  • Simulate senses and apply them in an awareness system
  • Design and implement AI in board games such as Tic-Tac-Toe and Checkers
  • Implement efficient prediction mechanism in your agents with algorithms such as N-Gram predictor and naïve Bayes classifier
  • Understand and analyze how the influence maps work.

Authors

Table of Contents

Chapter 1: Behaviors – Intelligent Movement
Introduction
Creating the behavior template
Pursuing and evading
Arriving and leaving
Facing objects
Wandering around
Following a path
Avoiding agents
Avoiding walls
Blending behaviors by weight
Blending behaviors by priority
Combining behaviors using a steering pipeline
Shooting a projectile
Predicting a projectile's landing spot
Targeting a projectile
Creating a jump system
Chapter 2: Navigation
Introduction
Representing the world with grids
Representing the world with Dirichlet domains
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
Chapter 3: Decision Making
Introduction
Choosing through a decision tree
Working a finite-state machine
Improving FSMs: hierarchical finite-state machines
Combining FSMs and decision trees
Implementing behavior trees
Working with fuzzy logic
Representing states with numerical values: Markov system
Making decisions with goal-oriented behaviors
Chapter 4: Coordination and Tactics
Introduction
Handling formations
Extending A* for coordination: A*mbush
Creating good waypoints
Analyzing waypoints by height
Analyzing waypoints by cover and visibility
Exemplifying waypoints for decision making
Influence maps
Improving influence with map flooding
Improving influence with convolution filters
Building a fighting circle
Chapter 5: 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
Chapter 6: Board Games AI
Introduction
Working with the game-tree class
Introducing Minimax
Negamaxing
AB Negamaxing
Negascouting
Implementing a tic-tac-toe rival
Implementing a checkers rival
Chapter 7: Learning Techniques
.Introduction
Predicting actions with an N-Gram predictor
Improving the predictor: Hierarchical N-Gram
Learning to use Naïve Bayes classifiers
Learning to use decision trees
Learning to use reinforcement
Learning to use artificial neural networks
Creating emergent particles using a harmony search
Chapter 8: Miscellaneous
Introduction
Handling random numbers better
Building an air-hockey rival
Devising a table-football competitor
Creating mazes procedurally
Implementing a self-driving car
Managing race difficulty using a rubber-banding system

Book Details

ISBN 139781783553570
Paperback278 pages
Read More
From 2 reviews

Read More Reviews

Recommended for You

Procedural Content Generation for Unity Game Development Book Cover
Procedural Content Generation for Unity Game Development
$ 39.99
$ 28.00
Unity 5.x Cookbook Book Cover
Unity 5.x Cookbook
$ 43.99
$ 30.80
Unity Character Animation with Mecanim Book Cover
Unity Character Animation with Mecanim
$ 39.99
$ 28.00
Unity 5.x By Example Book Cover
Unity 5.x By Example
$ 39.99
$ 28.00
Unity3D UI Essentials Book Cover
Unity3D UI Essentials
$ 26.99
$ 18.90
Unity 5 Game Optimization Book Cover
Unity 5 Game Optimization
$ 35.99
$ 25.20