Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] InstinctAI - Behaviour tree and Utility curve editor

Discussion in 'Assets and Asset Store' started by kupio, Dec 7, 2017.

  1. kupio

    kupio

    Joined:
    May 4, 2015
    Posts:
    24

    Node-based, Visual Behaviour tree editor

    Instinct AI is a fully-featured, code-oriented behaviour tree and utility curve editor. It features a code generator that produces efficient, minimal code.



    This means:

    No runtime code
    No blackboard (If you are familiar with the blackboard idea from other libraries - the blackboard simply becomes the properties on your GameObject's components)

    Interact directly with the properties and methods in your code from the behaviour tree.

    What makes InstinctAI different?

    InstinctAI is a code-oriented approach to defining behaviour trees. It ships with a bunch of useful nodes and common actions and behaviours, but it expects you to also create custom nodes of your own that are specific to the problem you are trying to solve for your game.

    In addition to this, it uses a code generator approach to generate minimal, efficient code. When you are editing a tree, you are therefore also editing an underlying MonoBehaviour which can be attached to your GameObjects in the normal way.

    Large set of behaviour nodes, or easily make your own

    InstinctAI ships with a bunch of nodes to begin with, and more will be released in future updates.

    • Selectors and sequencers
    • Utility selectors
    • Random selectors with weightings
    • Parallel nodes
    • Animation
    • Navigation
    • Physics
    • Materials and shaders
    • Events
    • Audio
    • Particles
    ... and more.

    It's also incredibly easy to your own custom actions.

    Use Utility curves to intelligently make behaviour decisions

    It also has a full utility graph editor which can take a set of inputs and, based on weighting curves that you control, select the best action to take. This node also runs without supporting runtime code.



    Live editor updates to view state information at runtime

    Select a game object at runtime and see the live tree state in the editor to help debug your behaviours.

    Thanks for reading!

    For more information, the documentation is freely available from the asset store page. Feel free to contact me with any questions, or reply here :)
     
    Last edited: Feb 5, 2018
    MintTree117 and akuno like this.
  2. montyfi

    montyfi

    Joined:
    Aug 3, 2012
    Posts:
    548
    Interesting, may I ask why should I choose it over, let's say Behavior Designer?
    Does it include behaviors like attack on sight, attack multiple targets.
    Can multiple agents communicate with each other, e.g. if one is attacked - all attack.
    Does it include any predefined behaviors like wander, patrol? If yes, could you publish the full list?
     
  3. kupio

    kupio

    Joined:
    May 4, 2015
    Posts:
    24
    Thanks for the interest :)

    I think the main difference between InstinctAI and something like Behaviour Designer is that InstinctAI is more oriented towards the code. With most behaviour tree editors, there is an editor and a tree that is stored as data somewhere, be it XML or a ScriptableObject or whatever. This is then evaluated at runtime.

    With these sorts of systems, you are restrained by the library of functions, no matter how rich the library is. At some point, you're going to want to do something in your game that will require you to spend a lot of time trying to figure out how to bend the tool to do something against its will.

    In InstinctAI, every behaviour tree is a MonoBehaviour that gets added to your GameObject just like any other component (Hey, it's called MonoBehaviour for a reason, right?). You are reminded at every turn that what you are constructing a behaviour in your script itself.

    I wanted to make a tool for developers who are very comfortable with scripting, and who don't necessarily want to buy into the idea of visual scripting, but who also see value in being able to diagrammatically lay out a behaviour tree of variable complexity and be able to easily edit or tweak it.

    One change that is on the product roadmap is the idea that you can add to the library custom nodes that are easily placeable into trees from the tree editor. By this I mean that a developer could create a new node that is peculiar to the game being developed, and then someone else could come along and do the work of constructing the tree without leaving the tree editor.

    I hope that makes sense - the difference is mainly in the approach to thinking about how behaviour trees are integrated into your project. I've made an effort to make the whole experience feel as "Unity" as possible, and as non-"My own cool interface" as possible.

    All that said, I'm still keen to develop a richer library of behaviours in future iterations of the asset. This is intended to take two forms - Firstly more nodes with more specialised purposes, like the soldier patrol nodes you mentioned. Secondly in the form of an ever growing 'Recipe book' of tree patterns that will accompany the documentation.

    For the specific examples you give, I can explain some of the features that may help show how some of these things might be built.

    Since a behaviour tree is just a component, then you can have multiple trees on an object. Also, you might have trees attached to objects that might represent group of soldiers, whilst simultaneously having trees running on the soldiers themselves.

    There is a UnityEvent node which might be useful in broadcasting signals to group members.

    The asset also comes with an example scene where a dumper truck patrols a scene by driving between random predefined patrol targets.

    You might also like to flick through the documentation to see the nodes that are available. This is freely available, and linked from the asset store page.

    And as a final word, I'm very keen to hear feedback. Any new features or fixes that are required by customers will always have priority in future iterations.
     
    cwmanley and AGregori like this.
  4. MaliceA4Thought

    MaliceA4Thought

    Joined:
    Feb 25, 2011
    Posts:
    406
    hmmmmmm I think I have to get this and try it :)

    I have used Behaviour Designer and Node Canvas and usually spend as much time writing new, specific nodes in code as it would be to simply access the code directly which this seems to do.

    As I understand it, this implementation basically just builds the flow and then allows you to access any script, any variable just in the code of the node.

    If so, this seems to be an intermediate step between coding and a tree editor that supports the best of both worlds.

    Sorry, I haven't read through the docs yet, but will do so to confirm, but it's looking like this will be on the list:)

    Regards

    M
     
  5. kupio

    kupio

    Joined:
    May 4, 2015
    Posts:
    24
    Good to hear that it has appeal :)

    You can access any property in the component itself, and also other components on the GameObject, so long as you make the tree aware of the other components that it needs access to. Instructions for this are in section 7.6 in the docs.
     
  6. witcher101

    witcher101

    Joined:
    Sep 9, 2015
    Posts:
    516
    Do you have any tutorial on how easy it is to use this??
     
  7. kupio

    kupio

    Joined:
    May 4, 2015
    Posts:
    24
    Not as such. There is a video, but I wasn't happy with it (Turned out far, far too unnecessarily long). Plan is to remake the video as a bunch of shorter, simpler ones.
     
  8. Gildar76

    Gildar76

    Joined:
    Oct 6, 2015
    Posts:
    20
    Since everything seems to be using monobehaviors, I guess I won't be able to run stuff on separate threads?

    Otherwise this looks very good.
     
  9. kupio

    kupio

    Joined:
    May 4, 2015
    Posts:
    24
    That's an interesting point. It's also something that could be changed though. I'll add it to the future updates list
     
    Gildar76 likes this.
  10. ikemen_blueD

    ikemen_blueD

    Joined:
    Jan 19, 2013
    Posts:
    341
    @kupio I watch your tutorial video. The system seems quite easy to use. I have a question before deciding to purchase it or not. Your Instinct AI is a DLL close-source. And, it's quite worrisome to me since AI is such an important system. And, without source, it's very hard to fix if problems occurs. Since, Unity new updates often break things up. So, I wonder if you guys provide source version with higher price? or provide source if you guys no longer support the system? Thanks.
     
  11. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    Any roadmap for ML?
     
  12. kupio

    kupio

    Joined:
    May 4, 2015
    Posts:
    24
    I haven't yet published any roadmap, but what do you mean 'ML'?
     
  13. kupio

    kupio

    Joined:
    May 4, 2015
    Posts:
    24
    You watched the tutorial video? I commend your extraordinary dedication and persistence ;). I need to make that thing much, much, much shorter.

    A cheaper DLL version with a more expensive source-available version was something that was considered up until release. At the moment though, there is no plan to make the source available.

    I'm certainly not ruling it out, but it really does depend on how sales go and what customers request over time.

    I'm happy to release unsupported software for free or very low cost, but this asset is currently far from becoming unsupported, and this is obviously not something that has currently been planned.
     
    ikemen_blueD likes this.
  14. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
  15. kupio

    kupio

    Joined:
    May 4, 2015
    Posts:
    24
    TechnicalArtist likes this.
  16. Cartoon-Mania

    Cartoon-Mania

    Joined:
    Mar 23, 2015
    Posts:
    320
    Your utility AI is the most revolutionary. But I want you to explain it in more detail. In fact I do not know UTILITY AI. But I can tell you how well you did for utility AI. I hope that your wonderful product will be known to many people. Please give a detailed explanation about utility AI Theory
     
    kupio likes this.
  17. kupio

    kupio

    Joined:
    May 4, 2015
    Posts:
    24
    Put simply, the utility node is a selector node which decides which action to take.

    To make this decision, it evaluates a bunch of inputs (As defined by you as MonoBehaviour properties, or method calls on your components, wired up in an inspector) and maps each through its own curve that you draw using the editor (Identical to animation curve).

    The decision becomes whichever input yields the highest value, or 'utiltity'.

    For example, you might have a character's hunger level range from 0 to 100. You could then draw a curve that starts off low, but then rises up sharply as hunger gets to higher levels, As the character gets more hungry, it will suddenly start to become more important, and eventually the most important thing driving the character's decisions.

    You can then tweak the curves until you're happy with the character's response to its environment.



    You can also specify dynamic influence values for each curve. These might map to an idea of a 'personality' which is unique to each instance of a character. So in this example, you might have an influence that makes hunger more important to one instance of a character than to another. This manifests as a distortion in the curve that you can see visually on the editor. At runtime, simply set the influence property to some value from 0 to 1.
     
  18. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Hi, does this integrate easily with 3rd party solutions such as Third Person Controller from Invector? Can it pickup functions such as damage states for the player and AI so they can be used in attack sequences?
     
  19. kupio

    kupio

    Joined:
    May 4, 2015
    Posts:
    24
    I'm afraid I can't comment on the Invector product since I'm not familiar with it, and I'm not sure of the intended use case.

    It can pick up on any value which can be read from a property or function on a component attached to the gameobject, so it's very likely that you will be able to read information such as damage. If for some reason it isn't immediately possible, then it should be trivial to create a method which makes the information available to the behaviour tree.
     
  20. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Thanks for your quick reply. The fact that it can pick up any value is good enough for me.
     
  21. witcher101

    witcher101

    Joined:
    Sep 9, 2015
    Posts:
    516
    Any video tutorials you have on how easy it is to work with??
     
  22. kupio

    kupio

    Joined:
    May 4, 2015
    Posts:
    24
    I really really (really) need to make a better, shorter video but for what it's worth...

     
  23. Filhanteraren

    Filhanteraren

    Joined:
    May 14, 2014
    Posts:
    47
    Hi, This looks interesting. Do you know how it is compared to Apex Utility AI ( have used that one for a couple of years )
    Does it work with Unity 2018.2?

    Also is there any roadmap or planned features that are coming?
     
  24. kupio

    kupio

    Joined:
    May 4, 2015
    Posts:
    24
    I'm not familiar with apex AI beyond watching the tutorial videos for the product, so I can't give much of a detailed comparison.

    It seems to have a very different interface approach, and I don't think it uses generated code. I think the best advice would be to watch the video for each product and make a choice based on which seems to you to be the most natural to use.

    The InstinctAI utility node editor can be seen at about 27:30 in the above linked video.

    As for a roadmap - v1.1 is very delayed but still actively under development. After that, the plan is to release frequent, smaller updates on a regular schedule. There is no visible roadmap, but after 1.1 I'd be happy to draft a priority list of changes and feature requests and make it public.
     
    julianr likes this.
  25. Occuros

    Occuros

    Joined:
    Sep 4, 2018
    Posts:
    300
    Greetings Kupio,

    Is Instinct AI still under active development? I have seen that the last update was around a year ago. Will version 1.1 still come out this year?
     
  26. kupio

    kupio

    Joined:
    May 4, 2015
    Posts:
    24
    It is an ongoing project, but development has been much slower than I'd hoped due to other work taking priority and personal circumstances. It's unlikely to be updated in January, but February is probable. Aiming to simply do a whole new relaunch at that point.
     
  27. Gildar76

    Gildar76

    Joined:
    Oct 6, 2015
    Posts:
    20
    Any news or updates on this?
     
  28. kupio

    kupio

    Joined:
    May 4, 2015
    Posts:
    24
    Not currently I'm afraid. A combination of very little interest and a busy day-job has meant that progress has been far slower than I'd have liked. It is still a dot on my radar, and I do have plans to significantly drop the price on the next update, but I just can't seem to scramble a couple of days together to do the work of pulling together a release. Kinda frustrating, but there just weren't enough people interested in the product early on, and that's a tough place to be for a new unity editor tool.
     
  29. Gildar76

    Gildar76

    Joined:
    Oct 6, 2015
    Posts:
    20
    Sad to hear it, it's a nice tool to work with. And the combination of Utility AI and behaviour tree is very interesting.