Search Unity

AI Utility AI Framework for the asset store

Discussion in 'Tools In Progress' started by Censureret, Mar 1, 2021.

  1. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    I am relatively new to this "Asset store" creator thing, but I have decided to release the Utility AI framework I have created for our upcoming game, Divine Intervention.

    About the algorithm:

    Our Utility framework is heavily inspired by David Mark's IAUS (Infinite Axis Utility System). In short, we use basic math to determine the best action to take at a given time.

    This gives us a responsive and fast way for the AI to decide what he/she is supposed to do.

    In Unity, we use the built-in Animation Curves to make the so-called "Response Curves" these allow for fast edit and exciting ways of forming your AI.

    To get more information on the algorithm, I refer to all of the videos where David Mark explains the theory behind it:

    https://www.gdcvault.com/play/1021848/Building-a-Better-Centaur-AI
    https://www.gdcvault.com/play/1012410/Improving-AI-Decision-Modeling-Through

    Utility AI as a concept is used in many types of games, such as The Sims, Guild Wars, etc.

    Features

    Not just for agents:

    Utility Decision making is not just for agents but can be used in many scenarios such as:
    • Group control
    • Affection systems
    • Card game AI
    Basically, anything that needs a decision can be used with this framework.


    Group AI feature:

    The system is structured to use for Group AI (i.e., multiple agents working to solve tasks together). This way, you can do formations, attack orders, and more. The framework allows you to take the "Utility way" not just for agents but for anything in the world, making any decisions easy for any game object in your scene.


    Intelligence System:

    The asset will feature a generic Intelligence system that allows easy access to any variables connected to the actor. While this will need a video explanation of its own, it is fair to say that this system is both fast and very customizable.


    Sensors:

    The asset will ship with two different "basic" sensors

    • FOV (Field of view)
    • Range Sensor (a general sensor)
    The framework does not require you to use either of them, but they are a good base for creating your own sensors.

    ______________________________________________________________________________________

    State of the asset

    The current version of this asset is 0.0.1. While we are using it in our upcoming game, it needs a bit of fine-tuning before publication to the asset store.

    Final note:

    I will continue to update this post with the progress please post your comments / questions below
     
  2. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    I thought id update this post with a screenshot of one of our decisions.

    upload_2021-3-3_0-9-50.png

    Here you see the curve for the "Ranged Attack Action" we have in our game. As you can see, the agent uses this to decide if he can fire arrows at the target or if he is too close and needs to change weapon.

    Another funny curve we have is our Melee Attack Curve:

    upload_2021-3-3_0-11-48.png

    Here you can see that the close the enemy is, the better this option gets, and then, at a certain point, it starts to decline.

    As you can see from these curves, we can easily edit the behavior of the Agent and what he decides to do :)
     
  3. Censureret

    Censureret

    Joined:
    Jan 3, 2017
    Posts:
    363
    I wanted to share an image that shows some of the power of the AI (ignore the ugliness)

    upload_2021-3-10_0-50-42.png

    Here we have 211 units on the screen with an FPS of 101 in the editor. The meshes are highly detailed and there is a lot of other stuff going on in the scene :)

    For those of you who have worked with AI systems will know that these are kinda high results

    Also please note that the meshes in this scene are fairly high detailed most of the power is used in the rendering so with lower poly meshes you would be able to get A LOT better performance

    Also note that this includes the sensors that follow with the asset this can be tweaked to give even higher performance