Utility Intelligence: A Robust And Powerful Utility AI Framework

Homepage | Asset Store | Join Us On Discord

Utility Intelligence is a robust and powerful Utility-Based AI Framework. It seamlessly integrates Utility AI, Behavior Tree, and Finite State Machine into a unified and coherent framework. Each method is used where it performs optimally, leveraging their strengths while eliminating their weaknesses.

  • Utility AI is used for decision-making. It allows agents to make the best decisions based on the current situation.
  • Behavior Tree is used to create and execute decision tasks. It allows agents to execute the tasks of their chosen decision sequentially or simultaneously.
  • Finite State Machine is used to manage the decision states and transitions between decisions. It allows agents to manage their decisions effectively and switch smoothly from the current decision to the chosen decision once it’s been made.

Utility Intelligence allows agents to make decisions based on scores. Therefore, designers can adjust the decision-making process by tweaking the decision scores, without needing support from developers to change the behavioral structure, as required in Behavior Trees and Finite State Machines.
Designers and developers can work independently without affecting each other.

  • Designers: Focus on adjusting the decision scores to ensure the best decision is chosen in any situation.
  • Developers: Focus on creating and executing new decisions based on the game design document.

Utility Intelligence is designed with modularity in mind, making it easy to manage and customize your AI Behaviors, as well as adapt to constant changes from game design, thereby keeping your AI System manageable and scalable as its complexity increases.

Utility Intelligence offers an intuitive and powerful Editor with many robust features that allow you to create complex AI Behaviors and Logic with ease.

:question: WHAT IS UTILITY INTELLIGENCE?

:bulb: WHY USE UTILITY INTELLIGENCE?

:gem: HIGHLIGHT FEATURES

:hammer_and_wrench: An intuitive and powerful Editor
We offer an intuitive and powerful Editor with many robust features that allow you to create complex AI Behaviors and Logic with ease:

  • Status Preview: Preview the score of each decision and which decision is chosen based on the input values and response curves directly in the Editor, without having to play the game.
  • Consideration Editor: See how the input and the response curve will affect the consideration score without having to visualize it in your head.
  • JSON Editing: Manually edit the Intelligence Data in JSON format using your Text Editor then import it to the Intelligence Asset
  • Runtime Status: View the current status of multiple components during runtime. It is similar to Status Preview but includes additional runtime information, such as the best target for each decision, and the current status of considerations and action tasks.
  • Runtime Editing: Tweak your AI Behaviors during runtime for testing purposes without having to replay the game.
  • Runtime Editor: The Utility Intelligence Editor can function both at editor time and at runtime in builds. This feature enables users to adjust variables in the Utility Intelligence Editor to observe how they affect the agent’s decisions for testing purposes in builds.
  • Undo & Redo: Undo & Redo every user actions (Ctrl + Z & Ctrl + Y)
  • Dark & Light themes: The Utility Intelligence Editor supports both Dark and Light themes and will automatically match the theme of the Unity Editor.

:jigsaw: Modular System Design

  • Considerations: Our modular consideration system allows you to adjust the score of each decision by adding, removing, or changing considerations, ensuring that the best decision is chosen in any situation.
  • Target Filters: Our modular target filter system allows you to filter the targets for each decision by adding, removing, or changing target filters, ensuring that the decision is scored and executed with the appropriate targets.
  • Action Tasks: Our modular task system, created using Behavior Tree, allows you to easily customize and adjust each decision’s behavior by adding, removing, or changing action tasks, making it easy to adapt to constant changes from game design.
  • Blackboard Variables: Share information between multiple components such as inputs, input normalization, and action tasks using Blackboard Variables.

:gift: Many example scenes

We offer many example scenes to show you how to use Utility Intelligence to create AIs for your games:

  • StraightArrowOnly
  • StraightArrow vs CurvedArrow
  • Chaser vs Evader
  • Chaser & Patrol vs Evader & FindEnemy
  • Swordsman vs Swordsman
  • Axeman vs Axeman
  • Archer vs Swordsman
  • Crossbowman vs Swordsman
  • Team vs Team
  • Runtime Editor

:dart: Many built-in components
We offer many built-in components to help you create game AIs more easily and quickly, saving you a significant amount of time:

:rocket: High performance

  • Zero GC.Alloc after Init
  • We offer many optimization tricks to help you discard unnecessary calculations and improve your AI’s performance:
    • Discard considerations if the decision cannot possibly beat the other ones.
    • Discard decisions and decision makers if they cannot possibly beat the other ones.
    • Cache the calculated results from inputs, input normalization, considerations, decisions and reuse them in other places.
    • Adjust the decision-making interval, such as 0.1s or 0.5s, depending on your game’s needs.
    • Distribute the decision-making task across multiple frames to balance the workload, reduce computational burden per frame, and avoid performance spikes.

:zap: Many oscillation reduction tricks
We offer many oscillation reduction tricks to minimize the oscillation between decisions:

  • Momentum Bonus
  • Decision Weight
  • Keep running the decision tasks until they are finished

:tada: What’s more:

1 Like

Hi everyone,
I have submitted this plugin and the Unity Asset Store team has informed me that it will take 21-33 business days for it to be published. In the meantime, I will write docs for it. So, please stay tuned! :wink:

Hello everybody,

It’s been a while since my last post here. I’ve been focusing on work to ensure that Utility Intelligence reaches a high level of quality. A lot of work has been done since then, including optimization, bug fixes, documentation, and more.

I’m glad to say that it will be coming soon. Unity said that there are only a few business days left until the review process is completed. Therefore, if nothing unexpected happens, it will be published next week. However, it depends on Unity, and I’m not sure about that.

For more information about this plugin, you guys can watch the introduction video or read the documentation in the first post. I hope that you guys will like it.

1 Like

Hi everyone,
I’m thrilled to announce that Utility Intelligence has been released! And currently, it has a 50% New Release Discount. If you’re interested in Utility AI, please give it a try!

2 Likes

Hi everyone,

It’s been almost two weeks since the release and just a reminder: there are only 3 days left until the new release discount ends. So if you’re interested in Utility Intelligence, now’s the time to get it! :wink:

Hi everyone,

Just a heads up, there is only one day left before the 50% New Release Discount ends. So if you’re interested in Utility Intelligence, this is the last chance to get it at this reduced price.

Hi everyone,

The new release discount has ended.
Thanks for all the purchases.

Hi everyone,
I’m thrilled to share with you guys that Utility Intelligence is currently one of the top new assets on Unity’s Asset Store.

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 demo here: Utility Intelligence - Demo

1 Like

Just picked it up! Glad to see there is a forum for the plugin.

1 Like

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.

1 Like

Hi everyone, I’m making new examples to test v1.1.0 and here’s the first example.

Example 1: StraightArrow vs CurvedArrow
In this example, 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.

Justice vs Evil
Who wins?

Example 2: Patrol
In this example, when the player enters the chasing radius of the enemy, it will continuously chases the player. And when the player exits the chasing radius, the enemy will return to patrolling its territory.

1 Like

In v1.1.0, you can adjust the momentum bonus as you want; it’s not fixed at 25% anymore.

New Example: Chaser vs Evader
Whether the enemy can capture the player? AI AI-Navigation AI-Behavioral

Example: Archer vs Swordsman

It’s an enhanced version of the example: Chaser vs Evader.
It adds the ability for the archer and the swordsman to attack.

1 Like

In v1.1.0, you can categorize the action tasks, inputs, input normalizations using CategoryAttribute:

[Category("Comparison")]
public class IsGreaterThanOrEqualToValueNormalizationFloat : IsGreaterThanOrEqualToValueNormalization<float>

[Category("Animator")]
public class SetBool : SetParam


Finished Example: StraightArrowOnly

In this example, the crossbowman will shoot arrows straight if he can see the target. If his view is blocked by a wall, he will do nothing.

Finished Example: Straight Arrow & Curved Arrow

In this example, 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.

1 Like