Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

AI Planner: How to use multiple plans?

Discussion in 'AI & Navigation Previews' started by OtoriScorp, Jun 22, 2020.

  1. OtoriScorp

    OtoriScorp

    Joined:
    Mar 9, 2016
    Posts:
    58
    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:
    743
    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:
    101
    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.
     
unityunity