Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Behavior Planner

Discussion in 'AI & Navigation Previews' started by SubPixelPerfect, Dec 4, 2018.

  1. SubPixelPerfect

    SubPixelPerfect

    Joined:
    Oct 14, 2015
    Posts:
    224
    Saw today unite talk about new AI-system
    this is really impressive



    And I wonder is it ECS based?
     
  2. mEndlessLoop

    mEndlessLoop

    Joined:
    Jun 12, 2018
    Posts:
    7
    I was thinking the same question while watching the video, in my mind.... if Unity could make Ecs/Jobify…., Behavior planner, the new navmesh system and ML-Agents, so they can works all together with seamless integration.. well boy.... 2019 gonna be a good year for AI :D …. what else we can dream for... a ultra optimized native influence map? :D, wonder what qualifications do u need to be a "early adopter" for the behavior planner beta?
     
  3. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    Lahcene and Djayp like this.
  4. SubPixelPerfect

    SubPixelPerfect

    Joined:
    Oct 14, 2015
    Posts:
    224
    beta is available via the package manager, hooray!
    and it is DOTS! insane
     
  5. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    987
    I installed the AI Planner package but its required Entities version is still preview.24. I already upgraded Entities to preview.29. Is there ETA on when would this be updated?
     
  6. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    987
    I also see that it uses an interface to implement the actions. I don't get this part. How do we access data from ECS then if it's implemented like this? Are we going to use EntityManager inside such action classes? I don't think that's advisable as it is slow.

    The link for Otto is also broken: For a complete sample project, see: Otto.
     
  7. Sylmerria

    Sylmerria

    Joined:
    Jul 2, 2012
    Posts:
    369
    You need unity 19.1b to update to preview29
     
  8. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    987
    I'm already on Unity 2019 and my Entities is preview.29. What I meant was that AI Planner has specific dependency to Entities preview.24. Shouldn't the AI Planner update as well to match the latest of Entities?
     
  9. Sylmerria

    Sylmerria

    Joined:
    Jul 2, 2012
    Posts:
    369
    oh my bad.
    Not if they want allow 18.3 users to test this package
     
  10. Djayp

    Djayp

    Joined:
    Feb 16, 2015
    Posts:
    114
    How does it works for you ? I have troubles accessing to the traits' fields from Preconditions. Generating AI Domain Definition Classes throws errors (2019.1.0b8).
     
    Last edited: Mar 22, 2019
  11. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    That did not make the cut before GDC, but is what our small team is working on next.
     
    hippocoder likes this.
  12. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    Apologies for not having the sample project up. This is incoming and will hopefully explain the usage of the planner.
     
  13. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    Hmm... This is odd as the generated code should have implemented those. Did you get any errors when generating the code for the domain?
     
  14. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    davenirline and Djayp like this.
  15. Djayp

    Djayp

    Joined:
    Feb 16, 2015
    Posts:
    114
    The code is generated. Only the errors I mentionned :
    I managed to make the Otto sample work, so CS0122 shouldn't be a problem... already rebooted, reloaded Unity, tried to put HashCode in public, ...

    Thank you for the sample, I'm now sure it does all I need ! I saw BaseAgent inherits from MonoBehaviour : is there a plan for a pure ECS implementation ?
     
  16. Djayp

    Djayp

    Joined:
    Feb 16, 2015
    Posts:
    114
    Found it !

    Switched the API Compatibility to 4.x before generating classes (my bad...). Let's play with this wornderful tool ! Thanks again !
     
    Last edited: Mar 23, 2019
    sordidlist likes this.
  17. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    That's something we'd like to support. However, it is lower on our priority list right now.
     
    Djayp likes this.
  18. Orimay

    Orimay

    Joined:
    Nov 16, 2012
    Posts:
    304
    That's way sad. Gonna wait for the DOTS implementation. Thank you for the progress, though!
     
  19. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    Can you share a bit more about what you'd be looking for? I think you're wanting to have the equivalent of operational actions for ECS entitites?
     
  20. Orimay

    Orimay

    Joined:
    Nov 16, 2012
    Posts:
    304
    Well, I just wanna utilize the planning system within my Pure-ECS solution. I was hoping to find some way to make my environmental changes based on different conditions. I have rooms where there may be a wall, and there may also be a painting on this wall. And this wall might get replaced by an arch, but it has to hide the painting first. Or some other objects might need to switch their places while no one looks at those. In combination with some tame logic, I feel the planner would fit my needs. Besides, I want my NPCs to perform actions on following goals to make bots
     
  21. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    Well, the planner is built on ECS. You can use the whole system via Controller and not have any MonoBehaviours. You'd need to create your own BaseAgent substitute because you need to initialize the Controller. The main thing is specifying the initial state.
     
    createtheimaginable, Djayp and Orimay like this.
  22. Orimay

    Orimay

    Joined:
    Nov 16, 2012
    Posts:
    304
    Very cool, thank you! That's a topic to research. There are no such samples so far, are there?
     
  23. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    Not yet. That was just me thinking off the top of my head how to enable this. The main issue we will need to solve is how operational actions work. I think even with Entities they'll have to happen on the main thread simply because of the callback nature until we figure out a way to have those operate at a systems level. We are co-creators, so definitely want to support your use case.

    And by priorities I meant that the immediate need is to get up-to-date with latest com.unity.entities and get our systems into jobs as what we already released is using APIs that have now been deprecated in entities.
     
    createtheimaginable, Orimay and Djayp like this.
  24. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    FYI @davenirline - there's an updated version on the latest Entities preview for the sample project and package: https://github.com/Unity-Technologies/otto
     
    SubPixelPerfect and davenirline like this.
  25. sordidlist

    sordidlist

    Joined:
    Sep 2, 2012
    Posts:
    86
    Would love to play with the otto demo but it doesn't seen to load in 2019.1.8 or later, it says because it has been serialized by a higher version of unity. It seems like it wants me to open it in 2019.1.0b10, but I wasn't able to figure out how to download older version of beta.

    No doubt you guys have enough to do to last awhile, but I'd love to play with the otto demo if it's possible to update it! Thanks!

    EDIT: I was able to find the beta archive, the earliest available option was 2019.2.0b, which gives the same error. I am able to work with AI Planner in the latest version with a new project, and I think I'm making some progress. Without asking for an explicit timeframe, is there anything Unity can tell us about what to expect with AI Planner (and possibly ML agent) tools?
     
    Last edited: Jul 15, 2019
  26. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    Looks like you've already seen the updated post. The project was updated to 2019.1.8.
     
    sordidlist likes this.