GithubHelp home page GithubHelp logo

minapecheux / ebook-unity-aiprogramming Goto Github PK

View Code? Open in Web Editor NEW
32.0 4.0 6.0 38.27 MB

Demo Unity/C# project (code + assets) for my ebook: "Boost your Unity/C#: AI Programming"

Home Page: https://minapecheux.com

License: Other

C# 50.09% ShaderLab 42.52% HLSL 7.39%
ai artifical-intelligense artificial-intelligence behavior behavior-tree csharp csharp-code csharp-script finite-state-machine fsm

ebook-unity-aiprogramming's Introduction

[Ebook] Boost your Unity/C#: AI Programming

Mina Pêcheux - April 2023

Do you want to bring your NPCs, mobs and bosses to life? Are you curious to learn the classic tools of the game AI developer? Are you looking for a hands-on approach to AI programming for your next Unity/C# project? Then this book might just be the right one for you!

From finite state machines to behaviour trees, planners and utility-based AI, Boost your Unity/C#: AI Programming takes you through all the must-know of the field. And yes, don’t worry – here, you’ll get the whole shebang: a brief history of the domain, the what and the why for each tool, direct references to papers/conferences/thesis for diving even deeper, plenty of diagrams and nice screenshots, right down to step-by-step implementation examples with clean code snippets and a reference Github repository for all the demos shown in the book!

So if you’re a Unity dev who’s new to AI programming, or if you’re a seasoned AI developer looking for a quick summary of the tooling with direct Unity/C# applications, go ahead and join me on this adventure :)

Table of contents

Part 1: Getting started

  • Chapter 1: AI in games
  • Chapter 2: Designing a single-script robot AI

Part 2: Finite state machines

  • Chapter 3: What are FSMs?
  • Chapter 4: Making a simple guard patrol logic
  • Chapter 5: Upgrading your finite state machines

Part 3: Behaviour trees

  • Chapter 6: Understanding behaviour trees
  • Chapter 7: Creating a behaviour tree toolbox
  • Chapter 8: Implementing a RTS collector AI

Part 4: Planners & utility-based AI

  • Chapter 9: The reverse-thinking of planners
  • Chapter 10: Discovering utility-based AI
  • Chapter 11: Designing a utility-based wizard AI

Part 5: Going further

  • Chapter 12: Expanding your horizons

Demos overview

This book aims at giving you an all-around knowledge of the most common AI techniques, from finite state machines to behaviour trees, planners and utility-based AI. As we progress in our journey, we’ll go through each tool one by one, and we’ll talk both about the why and the how: why use that technique instead of this one? why did game developers come up with this architecture? how do you implement such a model in a Unity/C# project?

By the end of your read, you should have a good grasp of where those famous AI tools come from, what well-known games leverage them today, and how you can use them in your future game projects. And you’ll also have several complete demo scenes to tweak and expand to your liking, so as to deepen your understanding of the topic.

All the code and assets for those demos are included in this Github repository, and here's a quick bird's-eye view of the 4 use cases this book will detail:

  1. The 2D robot's explorer (from Chapter 2: Designing a single-script robot AI): This basic AI allows a little robot to move around on a 2D grid and search for the gem hidden in the room. Its behaviour is very simple and coded in just a single script, to demonstrate that artificial intelligence doesn't have to be complex - sometimes, it's just about doing a few checks and adding a little bit of randomness...

  1. The FSM patrolling guard and his enemies (from Chapter 4: Making a simple guard patrol logic): Thanks to the famous finite state machine architecture, we'll create some brains for a simple guard AI who patrols along a pre-determined path, looks for nearby enemy, chases them, fights and eventually goes back to its default patrol routine.

  1. The behaviour-tree powered RTS collector (from Chapter 8: Implementing a RTS collector AI): All good real-time strategy (RTS) needs to have some units go and collect resources - so we're going to see how to create such an entity logic using behaviour trees, and how this tool allows us to build the AI of our collector incrementally.

  1. The utility-based wizard AI (from Chapter 10: Designing a utility-based wizard AI): Last but not least, this AI acts as a computer-controller opponent for a little magic duel game, all pumped up with magic! By evaluating the utility of each option in his action set, this sorcerer is able to cast fireballs, ice shards and healing spells... and holds its ground quite convincingly against you in this single-player magic fight game!

Assets

The full list of assets with proper credits and license details is available over here: ASSETS.md.

ebook-unity-aiprogramming's People

Contributors

minapecheux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.