Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Behavior Planner

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

  1. SubPixelPerfect

    SubPixelPerfect

    Joined:
    Oct 14, 2015
    Posts:
    166
    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

    Unity Technologies

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

    SubPixelPerfect

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

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    415
    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:
    415
    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:
    211
    You need unity 19.1b to update to preview29
     
  8. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    415
    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:
    211
    oh my bad.
    Not if they want allow 18.3 users to test this package
     
  10. Djayp

    Djayp

    Joined:
    Feb 16, 2015
    Posts:
    49
    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

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    196
    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

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    196
    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

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    196
    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

    Unity Technologies

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

    Djayp

    Joined:
    Feb 16, 2015
    Posts:
    49
    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:
    49
    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
  17. amirebrahimi_unity

    amirebrahimi_unity

    Unity Technologies

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

    Kender

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

    amirebrahimi_unity

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    196
    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. Kender

    Kender

    Joined:
    Nov 16, 2012
    Posts:
    141
    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

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    196
    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 Kender like this.
  22. Kender

    Kender

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

    amirebrahimi_unity

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    196
    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, Kender and Djayp like this.
  24. amirebrahimi_unity

    amirebrahimi_unity

    Unity Technologies

    Joined:
    Aug 12, 2015
    Posts:
    196
    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.