ENGLISH

Unity Artificial Intelligence Programming: Add powerful, believable, and fun AI entities in your game with the power of Unity, 5th Edition

Book information

Publisher
Packt Publishing
Year
2022
ISBN
1803238534, 9781803238531
Language
english
Format
PDF
Filesize
6 MB (5957330 bytes)
Edition
5
Pages
252\309
Time added
2022-04-03 04:52:36

Description

Learn and implement game AI in Unity to build smart environments and enemies with A* pathfinding, finite state machines, behavior trees, and the NavMesh Key FeaturesExplore the latest Unity features to make AI implementation in your game easierBuild richer and more dynamic games using AI concepts such as behavior trees and navigation meshesImplement character behaviors and simulations using the Unity Machine Learning toolkitBook Description Developing artificial intelligence (AI) for game characters in Unity has never been easier. Unity provides game and app developers with a variety of tools to implement AI, from basic techniques to cutting-edge machine learning-powered agents. Leveraging these tools via Unity's API or built-in features allows limitless possibilities when it comes to creating game worlds and characters. The updated fifth edition of Unity Artificial Intelligence Programming starts by breaking down AI into simple concepts. Using a variety of examples, the book then takes those concepts and walks you through actual implementations designed to highlight key concepts and features related to game AI in Unity. As you progress, you'll learn how to implement a finite state machine (FSM) to determine how your AI behaves, apply probability and randomness to make games less predictable, and implement a basic sensory system. Later, you'll understand how to set up a game map with a navigation mesh, incorporate movement through techniques such as A* pathfinding, and provide characters with decision-making abilities using behavior trees. By the end of this Unity book, you'll have the skills you need to bring together all the concepts and practical lessons you've learned to build an impressive vehicle battle game. What you will learnUnderstand the basics of AI in game designCreate smarter game worlds and characters with C# programmingApply automated character movement using pathfinding algorithm behaviorsImplement character decision-making algorithms using behavior treesBuild believable and highly efficient artificial flocks and crowdsCreate sensory systems for your AI worldBecome well-versed with the basics of procedural content generationExplore the application of machine learning in UnityWho this book is for This Unity artificial intelligence book is for Unity developers with a basic understanding of C# and the Unity Editor who want to expand their knowledge of AI Unity game development. Table of ContentsIntroduction to AIFinite State MachinesRandomness and ProbabilityImplementing SensorsFlockingPath Following and Steering BehaviorsA* PathfindingNavigation MeshBehavior TreesProcedural Content GenerationMachine Learning in UnityPutting It All Together Cover Title Copyright and Credits Table of Contents 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 Scene setup The player's tank and the aspect class The player's tank Aspect AI characters Sense Sight Touch Testing Summary Part 2:Movement and Navigation Chapter 5: Flocking Technical requirements Basic flocking behavior Individual behavior Controller Alternative implementation FlockController Summary Chapter 6: Path Following and Steering Behaviors Chapter 7: A* Pathfinding Technical requirements Revisiting the A* algorithm Implementing the A* algorithm Node PriorityQueue The GridManager class The AStar class The TestCode class Setting up the scene Testing the pathfinder Summary Chapter 8: Navigation Mesh Technical requirements Setting up the map Navigation static Baking the NavMesh NavMesh agent Updating an agent's destinations Setting up a scene with slopes Baking navigation areas with different costs Using Off Mesh Links to connect gaps between areas Generated Off Mesh Links Manual Off Mesh Links Summary Part 3:Advanced AI Chapter 9: Behavior Trees Technical requirements Introduction to BTs A simple example – a patrolling robot Implementing a BT in Unity with Behavior Bricks Set up the scene Implement a day/night cycle Design the enemy behavior Implementing the nodes Building the tree Attach the BT to the enemy Summary Further reading Chapter 10: Procedural Content Generation Technical requirements Understanding Procedural Content Generation in games Kinds of Procedural Content Generation Implementing a simple goblin name generator Generating goblin names Completing the goblin description Learning how to use Perlin noise Built-in Unity Perlin noise Generating random maps and caves Cellular automata Implementing a cave generator Rendering the generated cave Summary Further reading Chapter 11: Machine Learning in Unity Technical requirements The Unity Machine Learning Agents Toolkit Installing the ML-Agents Toolkit Installing Python and PyTorch on Windows Installing Python and PyTorch on macOS and Unix-like systems Using the ML-Agents Toolkit – a basic example Creating the scene Implementing the code Adding the final touches Testing the learning environment Training an agent Summary Further reading Chapter 12: Putting It All Together Technical requirements Developing the basic game structure Adding automated navigation Creating the NavMesh Setting up the agent Fixing the GameManager script Creating decision-making AI with FSM Summary Index

Similar books

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

2010 · PDF

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

1858 · PDF

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

2022 · PDF