#[RELEASED] Utility Intelligence: A user-friendly Utility AI Framework

1 messages · Page 1 of 1 (latest)

tribal sierra
#

[RELEASED] Utility Intelligence: A user-friendly Utility AI Framework1

#

[RELEASED] Utility Intelligence: A user-friendly Utility AI Framework

tribal sierra
#

Hi everyone,

I just created a demo using a new feature: Runtime Editor. It hasn't been released yet because there are some issues that need to be resolved before release.

This feature allows you to access the **UtilityIntelligenceEditor **not only in Editor mode but also in Play mode.

You can play the new demo here: https://play.unity.com/mg/other/utility-intelligence-demo

tribal sierra
#

Hi everyone,

I'm currently working on v1.1.0. It's a major update that includes many bug fixes and optimizations. Additionally, we will add two new tabs for decisions and input normalizations. These changes allow us to reuse input, input normalizations, considerations and decisions.

These changes will help increase performance because we will only need to calculate the score of a decision once across multiple decision-makers. Similarly, we will only need to calculate inputs, normalized inputs, and consideration scores once.

tribal sierra
#

Hi,
In addition to the 2 new tabs, the new feature: **Runtime Editor **will also be released in v1.1.0. So you can open the editor both in Runtime Mode and Editor Mode:

#

The estimated time of v 1.1.0 is in early July. 🥳

tribal sierra
#

In v1.1.0, I've added a cache per target for each decision-making component (decision, consideration, input normalization, input) to ensure they are only calculated once per target and reuse the result for the same target in other components.

To test its efficiency, I've enabled this option for MyDistanceToTargetInput and added some code to make it a heavy input.

public class MyDistanceToTargetInput : Input<float>
{
    protected override float OnGetRawInput(in InputContext context)
    {
        var myPosition = AgentFacade.Position;
        var targetPosition = context.TargetFacade.Position;
        myPosition.Y = 0;
        targetPosition.Y = 0;

        float result = 0;
        for (int i = 1; i < 100; i++)
        {
            result += Mathf.Sqrt(i) * Mathf.Sin(i) * Mathf.Cos(i);
        }
        
        return Vector3.Distance(myPosition, targetPosition);
    }
}
#

And here are the results:

#

The processing time is reduced from 22ms to 13ms for the same 30 agents in the scene.

However, it comes with a cost to find and retrieve the result from the cache per target, so it is only effective for heavy computations.

tribal sierra
#

The archer will shoot arrows straight if he can see the target.
If his view is blocked by a wall, he will shoot arrows in a curve to bypass the obstacle.