We may earn an affiliate commission when you visit our partners.
Andreas Metz

Learn how to create state of the art AI for video games using Unity.

I believe in a practical approach in learning so this course will be primarily project-based. You won't just learn dry theory and forget everything within a matter of days but instead apply the learned concepts to two actual Unity-Projects:

Read more

Learn how to create state of the art AI for video games using Unity.

I believe in a practical approach in learning so this course will be primarily project-based. You won't just learn dry theory and forget everything within a matter of days but instead apply the learned concepts to two actual Unity-Projects:

  • Catch: A simple digital replica of play every kid's favourite game: catch

  • Colony Simulation: A game like Rimworld or Oxygen Not Included, where you can't control the NPCs directly, but instead they are controlled by the AI and you need to help them survive by making sure they've got enough to eat.

Also this course contains a free exclusive Behavior-Designer Educational-License, which would normally cost ~90$. Behavior Designer is the industry-standard solution for Behaviortrees and generously provided me with an exclusive Educational License, which they specifically built for this course. So you won't get it anywhere else.

Also you will of course get full lifetime access to the course.

We'll start with the simplest AI-System that there is, namely State-Machines.

After that we'll improve State-Machines and make them more extensible with the State-Pattern.

Then we'll hit the main topic which is one of the more advanced techniques that are used in Indie- and AAA-Gameproductions alike: BehaviorTrees.

Lastly we'll have a glimpse at one of the more experimental AI-Approaches, namely Genetic Algorithms, which are more of a niche topic but have the potential for very interesting game-mechanics that stand out of the crowd.

Whereas this course is already rather extensive and covers the most important aspects of AI for modern gamedevelopment, I can't possibly cover everything of this huge field. For example I won't address machine learning because this topic alone would fill a whole bunch of courses and really isn't that practical for most Game-AIs because of the lack of control you have over it.

By the end of the course you'll be confident with the most important AI-Techniques- and Design Patterns for modern Gamedevelopment.

So what are you waiting for, join me now and start creating astonishing AI-Systems yourself.

Enroll now

What's inside

Syllabus

Introduction

This Project and all the Projects of this course were created using Unity Version 2019.3.x, so if you may have trouble when you're using 2020.X. Because of that I highly advise you to install 2019.3.X in UnityHub in order to make sure the Projects work as intended.

Read more
AI - General
State Machines
State Machines Theory

This Project and all the Projects of this course were created using Unity Version 2019.3.7f1, so if you may have trouble when you're using 2020.X. Because of that I highly advise you to install 2019.3.X in UnityHub in order to make sure the Projects work as intended.

State Machine Exercise - Solution
State Pattern
State Pattern Theory
State Pattern Example
Behavior Trees
Theory
Theoretic Examples & Exercise1
Behavior Designer

I've attached the Build of the finished project to the description, so you can play around with it.

Our first Behavior Tree with Behavior Designer
Exercise2 - Hunterbehavior
Exercise 2 - Hunterbehavior - Solution
Custom Actions

In this video I'll show you how I created the IsCarryingItem - Conditional of the Project.

Behavior Designer - Variables
Exercise3 - Custom Condition
Exercise3 - Custom Condition - Solution
Priorities & Conditional Aborts - Theory
Priorities & Conditional Aborts - Example
Exercise4 - Chickenbehavior
Exercise4 - Chickenbehavior - Solution
Genetic Algorithms
Example
Course Outro

Save this course

Save Practical guide to AI in Unity to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Practical guide to AI in Unity with these activities:
Review Unity Fundamentals
Reviewing Unity fundamentals will ensure a solid base for understanding the AI concepts implemented within the Unity environment.
Browse courses on Unity Engine
Show steps
  • Complete a beginner-level Unity tutorial.
  • Practice creating simple game mechanics.
  • Familiarize yourself with the Unity interface.
Review: 'Artificial Intelligence for Games'
Reading this book will provide a broader understanding of AI concepts and techniques used in game development, complementing the practical focus of the course.
Show steps
  • Read the chapters related to state machines and behavior trees.
  • Take notes on key concepts and algorithms.
  • Compare the book's approach to the course's implementation.
Implement a Simple AI Agent
Building a simple AI agent in Unity will reinforce the concepts learned in the course and provide hands-on experience with implementing AI systems.
Show steps
  • Create a new Unity project.
  • Design a simple environment for the agent to navigate.
  • Implement basic movement and decision-making logic.
  • Test and refine the agent's behavior.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Practice Behavior Tree Design
Practicing behavior tree design through various exercises will improve your ability to create complex and effective AI systems.
Show steps
  • Design behavior trees for different game characters.
  • Implement the behavior trees in Unity using Behavior Designer.
  • Test and refine the behavior trees to achieve desired results.
Document Your AI Implementation
Creating documentation for your AI implementation will help solidify your understanding of the concepts and provide a valuable reference for future projects.
Show steps
  • Describe the AI system's architecture and design.
  • Explain the purpose and functionality of each component.
  • Include diagrams and code snippets to illustrate key concepts.
  • Document any challenges encountered and solutions implemented.
Review: 'Programming Game AI by Example'
Studying this book will give you a deeper understanding of AI algorithms and how to implement them in game development, supplementing the course's practical focus.
Show steps
  • Read the chapters relevant to the course topics.
  • Study the code examples and adapt them to Unity.
  • Experiment with different AI techniques and algorithms.
Contribute to a Unity AI Open Source Project
Contributing to an open-source project will provide valuable experience working with real-world AI systems and collaborating with other developers.
Show steps
  • Find an open-source Unity AI project on GitHub.
  • Study the project's codebase and documentation.
  • Identify a bug or feature to work on.
  • Submit a pull request with your changes.

Career center

Learners who complete Practical guide to AI in Unity will develop knowledge and skills that may be useful to these careers:
Artificial Intelligence Programmer
An Artificial Intelligence Programmer develops and implements AI systems in video games. This career involves creating believable behaviors for non-player characters, optimizing AI performance, and integrating AI with game mechanics. This course helps you build a foundation with state machines, state patterns, and behavior trees, which are crucial for designing complex AI systems in games. The course's practical approach, using Unity projects like 'Catch' and 'Colony Simulation,' would provide hands-on experience directly applicable to this role. Furthermore, the Behavior Designer Educational License gives experience with an industry-standard tool for behavior trees.
Game AI Designer
A Game AI Designer specializes in designing and implementing the artificial intelligence within a video game. The role focuses on creating engaging and challenging AI opponents, designing believable character behaviors, and ensuring that the AI complements the overall game design. This course helps those in this career with the knowledge of state machines, behavior trees, and genetic algorithms, which are vital for creating complex AI systems. The Behavior Designer Educational License provides experience with an industry-standard tool. The course's project-based structure, with examples like 'Catch' and 'Colony Simulation,' would allow for applying these AI concepts in practical game scenarios.
AI Integration Specialist
An AI Integration Specialist focuses on incorporating artificial intelligence systems into existing software or game projects. This career requires strong programming skills and understanding of different AI techniques. This course helps you gain practical knowledge of state machines, behavior trees, and genetic algorithms, which are common AI approaches used in game development and simulation. The hands-on experience from the project-based learning can be directly applied to integrating AI into various projects. You should consider this course if you want to become an AI Integration Specialist.
Technical Designer
A Technical Designer bridges the gap between design and programming in game development. They often implement game mechanics, design scripting systems, and work with AI. This course helps those in this career by providing practical knowledge of AI techniques commonly used in games. Understanding state machines, behavior trees, and genetic algorithms helps implement engaging and challenging AI behaviors. The Behavior Designer Educational License provides experience with an industry-standard tool for behavior trees. The course's project-based approach with Unity integrates AI into game design.
Indie Game Developer
An Indie Game Developer works independently or in a small team to create and publish video games. This role requires a broad range of skills, including programming, art, design, and marketing. This course helps with practical knowledge of AI techniques that can be used to enhance the gameplay and replayability of indie games. Learning state machines, behavior trees, and genetic algorithms allows one to create more dynamic and engaging game experiences. The Behavior Designer Educational License provides access to a tool that will help one create better games.
Simulation Engineer
A Simulation Engineer develops and implements computer simulations for various purposes, such as training, research, and development. This role requires a strong understanding of mathematical modeling, programming, and simulation software. This course helps those in this career by providing practical knowledge of AI techniques that can be used to create more realistic and dynamic simulations. The course's coverage of state machines, behavior trees, and genetic algorithms allows one to implement complex behaviors in simulated agents. The 'Colony Simulation' project provides a direct example of how AI can be used to control simulated entities.
Game Designer
A Game Designer conceptualizes and designs the various elements of a video game, including the gameplay, story, characters, and user interface. This course helps this position better understand how AI can be leveraged to create more engaging and dynamic game experiences. Learning about AI techniques such as state machines and behavior trees gives you the knowledge to design compelling AI behaviors for non-player characters and enemies. The course's project-based approach will show you how AI can be integrated into different game mechanics and systems.
AI Consultant
An AI Consultant advises businesses on how to leverage artificial intelligence to solve problems and improve efficiency. This role requires a strong understanding of AI technologies and their applications across various industries. The course helps build a foundation in AI concepts, such as state machines, behavior trees, and genetic algorithms, providing a practical understanding of how AI can be implemented. The course's project-based approach, with examples like 'Catch' and 'Colony Simulation,' would show real-world scenarios.
Gameplay Programmer
A Gameplay Programmer implements game mechanics, character controls, and interactive elements within a game. This role requires a strong understanding of programming principles and game design. This course may be useful as it discusses AI techniques that can be used to enhance gameplay. Working with state machines and behavior trees, as covered in the course, helps create dynamic and responsive game experiences. The course's project-based approach helps practice integrating AI into various gameplay scenarios. Those interested in this career should strongly consider this course.
Virtual Reality Developer
A Virtual Reality Developer creates immersive experiences for virtual reality platforms. This role requires a strong understanding of 3D programming, user interface design, and interaction design. This course may be useful to VR developers by providing AI techniques that can enhance the interactivity and realism of VR environments. State machines and behavior trees, as covered in the course, allows for creating more responsive and believable virtual characters and environments. The practical projects in the course help apply these AI concepts in a hands-on manner.
Software Engineer
A Software Engineer designs, develops, and tests software applications. While this role is broad, a software engineer with an interest in game development can leverage their skills in AI. This course may be useful as it provides practical knowledge of AI techniques. By learning about state machines, behavior trees, and genetic algorithms, one builds a foundation for implementing AI solutions in various software projects, not just games. The project-based approach of the course allows to practice applying these concepts in a real-world context.
AI Research Scientist
An AI Research Scientist conducts research and development in the field of artificial intelligence, often requiring a masters degree or doctorate. While this role is primarily research-focused, understanding practical AI implementations is valuable. This course may be useful as it offers a practical introduction to AI techniques used in game development. Gaining hands-on experience with state machines, behavior trees, and genetic algorithms can complement theoretical knowledge and provide insights into real-world applications of AI. The course's project-based approach may add value to research endeavors.
Robotics Engineer
A Robotics Engineer designs, builds, and programs robots for various applications. This role requires a strong understanding of mechanical engineering, electrical engineering, and computer science. This course may be useful as it provides practical knowledge of AI techniques that can be used to control robot behavior. By learning about state machines, behavior trees, and genetic algorithms, one can implement complex decision-making processes in robots. The course's project-based approach may provide valuable insights into applying AI concepts in a physical context.
Quality Assurance Tester
A Quality Assurance Tester identifies and documents bugs and issues in video games. While primarily focused on testing, understanding AI implementation can be beneficial. This course may be useful as it provides insights into the AI systems being tested. Familiarity with state machines, behavior trees, and genetic algorithms can help testers identify potential issues and provide more informed feedback to developers. The course's practical examples can help testers understand how AI is intended to function.
Data Scientist
A Data Scientist analyzes large datasets to extract insights and inform decision-making. While seemingly unrelated to game AI, the underlying principles of AI and machine learning can be applicable. This course may be useful as it offers a practical introduction to AI techniques, such as genetic algorithms, which are relevant to data analysis and optimization. This course may help you with hands-on experience, for instance, which can complement theoretical knowledge.

Featured in The Course Notes

This course is mentioned in our blog, The Course Notes. Read one article that features Practical guide to AI in Unity:

Reading list

We've selected two books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Practical guide to AI in Unity.
Provides a comprehensive overview of AI techniques used in game development. It covers topics such as pathfinding, decision-making, and learning, which are all relevant to the course. While the course focuses on practical implementation in Unity, this book offers a deeper theoretical understanding and alternative approaches. It valuable reference for expanding your knowledge beyond the course material.
Offers a practical, example-driven approach to game AI programming. It covers a wide range of AI techniques, including pathfinding, decision-making, and character control. While some examples may not be directly in Unity, the underlying principles are transferable. This book is particularly useful for understanding the implementation details of various AI algorithms and adapting them to your own projects. It serves as a valuable resource for deepening your understanding of game AI beyond the course material.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser