Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Unity 2022.2 is now available as the latest Tech release.
    Dismiss Notice
  3. We are making some changes to the DOTS forums.
    Dismiss Notice
  4. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

AI Planner: How to use multiple plans?

Discussion in 'AI & Navigation Previews' started by Twin-Stick, Jun 22, 2020.

  1. Twin-Stick

    Twin-Stick

    Joined:
    Mar 9, 2016
    Posts:
    111
    I'm very keen on using AI Planner for a new project I'm working on. I'm curious how you would go about an agent changing goals at runtime.

    For example, an AI character has a core goal of interacting with their favourite toys. It will decide which to play with, move to it, play with it, get bored and repeat the process.

    What if I want to introduce an external trigger like a knock at the door, which changes the plan to answer the door and collect a parcel?

    Would you have multiple decision controllers configured and enable/disable them based on the current goal?
     
  2. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    From what I can tell you only have one plan with the main goal and then you can have (let's say distractions) where the AI can go off the main goal then switch back based on the main goals' priority. Or that's how it seems from the example created in this video.

    It's not promoted enough but this video is gold with helping to understand the tool, at least for me.
    Also, the title doesn't help much. It makes it seem like it's all about ML-Agents.


     
    amirebrahimi_unity likes this.
  3. TrevorUnity

    TrevorUnity

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    114
    We're currently considering the necessary changes needed to more flexibly change---at runtime---aspects of planning, such as the goal, costs, and available actions. With the most recent released version, a separate decision controller per "objective" is the best solution.