Skip to content

Decisions

In Utility Intelligence, we separate decisions from actions. We score decisions, not actions. A decision contains a list of actions, and when an agent makes a decision, it executes those actions either sequentially or simultaneously. Note that only decisions are evaluated, not the actions within them.

How Decisions work

Since a decision is scored per target, and any utility entity (all GameObjects with UtilityEntityController or UtilityAgentController attached) in the utility world could be a target of the decision, we need a way to filter targets to ensure that only appropriate targets are considered. This is the job of target filters.

After finding appropriate targets, all considerations of the decision will be evaluated for each target to calculate the score of each decision-target pair. Then the score of each pair is multiplied with the decision weight to get the final score.

Finally, the best decision-target pair with the highest score will be chosen and the agent will execute all action tasks attached to the decision, either in Sequence or in Parallel.

In Utility Intelligence, a decision contains:

  • A list of target filters: Used to filter targets for the decision.
  • A list of considerations: Used to compute the score of the decision.
  • A list of action tasks: Executed by the agent if the decision is chosen.

Before evaluating a decision, its target filters are run to determine the targets for that decision. Once the appropriate targets are found, all considerations of the decision are evaluated for each target to compute the score of each decision-target pair. These scores are then multiplied by the decision weight to determine the final score of those pairs.

Finally, the decision-target pair with the highest score is selected, and the agent executes all action tasks attached to the decision.

Decisions are scored per target

A decision may or may not have targets. However:

  1. If it has targets, it will be scored per target. Afterward, Utility Intelligence will compare the scores of all the decision-target pairs with each other and select the pair with the highest score.
  2. If it does not have targets, it will be scored only once, and that score is the final score of the decision.

center|600

Oscillation between decision-target pairs

When using Utility AI, there may be a scenario where decision-target pairs with similar scores oscillate back and forth as their scores rise and fall. This leads to the agent constantly changing its decision and target. Currently, there are four ways to address this issue:

  1. Enable the Momentum Bonus option to add a bonus to the last chosen decision-target pair in the next decision-making round.
    • This will prioritize the last decision-target pair over the others, thereby eliminating the oscillation.
  2. Increase the weight of the decision that you want to prioritize. For example, let’s say 2 or 3 instead of just 1.
    • This will prioritize one decision over the others, reducing the oscillation.
  3. Enable Keep Running Until Finished option to prevent the agent from making a new decision while an important decision is running.
    • When the agent is running an important decision, such as AttackPlayer, ChargeHealth, ReloadAmmunition, and you don’t want it to be interrupted, you can enable this option to prevent the agent from switching to another decision while it is running.
  4. Add more considerations to each decision.
    • This will introduce more variation to the score-calculation process, increasing the chances that one decision will consistently outperform the other, thereby reducing oscillation.

Has No Target

A decision may or may not have targets. You can specify whether it has targets or not by checking/unchecking the HasNoTarget toggle in the Decision Tab:
center|600

  • If the HasNoTarget toggle is checked:
    • The target filter list will be hidden because it is no longer necessary.
    • The decision will be considered as having no target, and will be scored only once without targets.
  • If the HasNoTarget toggle is unchecked:
    • If the target filter list is empty:
      • All utility entities in the same utility world will be considered as targets for the decision, and the decision will be scored per target.
    • If the target filter list is not empty:
      • If the filtered targets > 0, the decision will be scored per target.
      • If the filtered targets = 0, the decision score will be 0

Decision Weight

In Utility Intelligence, you can control the prioritization of each decision by adjusting its Decision Weight.

For example, you can organize your decisions into multiple layers like the following:

  • Normal Layer’s Weight: 1.0
  • Combat Layer’s Weight: 2.0
  • Urgent Layer’s Weight: 3.0

The decision weight will then be multiplied by the decision score to get the final decision score:

center|550

You can change the weight of a decision in the Decision Tab:

Attachments/UtilityIntelligence/Documentation/UtilityAgent/Decisions/adjust-decision-weight.png|center|650

Info

  • The default value of Decision Weight is 1.0.
  • You can adjust the weight of a decision to a value lower than 1.0 to decrease the priority of that decision.

Tip

Momentum Bonus

In Utility Intelligence, you can prioritize the last chosen decision-target pair in the next decision-making round by increasing the Momentum Bonus:

center|300

In the next decision-making round, the last chosen decision-target pair will be prioritized by multiplying its score by the Momentum Bonus, increasing its chances of winning and thereby reducing oscillation between decision-target pairs with nearly equal scores.

Info

  • The default value of Momentum Bonus is 1.1.
  • You can adjust the Momentum Bonus to a value lower than 1.0 to decrease the priority of the last chosen decision-target pair.

Creating Decisions

To create a new decision, go to the Decision Tab, enter a name in the Name field, then click the Create button. After creating the decision, you can add considerations, target filters, and action tasks to it.
Attachments/UtilityIntelligence/Documentation/UtilityIntelligence/EditorWindow/decision-tab.png

Decision Statuses

At runtime, decisions have 4 statuses:

 : Running


 : Success


 : Failed


 : Inactive

At editor time, decision only have 2 statuses:

 : Selected


 : Unselected


If you haven’t already, please consider leaving a review on the Asset Store. Whether good or bad, your feedback helps shape the future of this framework, and lets others determine whether it’s a good fit for their games. Thank you so much!💘 I love you all!🥰


Last update : October 5, 2025
Created : September 1, 2024