Skip to content

Intelligence Editor¶

Editor Mode¶

There are three ways to open the Utility Intelligence Editor for a Utility Intelligence Asset at editor time (Editor Mode):

  1. Double-click the Utility Intelligence Asset in the Project Window.
  2. Select the Utility Agent with the assigned Utility Intelligence Asset in the Hierarchy Window, and then click the Open Editor button in the Inspector Window.
    center|400
  3. Select Tools -> Carlos Lab -> Utility Intelligence -> Utility Intelligence Editor, and then select the Utility Intelligence Asset in the Project Window.
    center|500

Here’s how the Utility Intelligence Editor looks in Editor Mode:

Attachments/UtilityIntelligence/Documentation/UtilityIntelligence/EditorWindow/intelligence-editor_editor-mode.png

Toolbar¶

Currently, Unity only supports toolbar in Editor Mode, so you won’t see it if you open it in Runtime Mode.

File Menu¶

  • Import Data: Import the Intelligence Data from a JSON file.
  • Export Data: Export the Intelligence Data to a JSON file.
  • Show Data: Show the Intelligence Data in JSON format.
  • Clear Data: Clear all the Intelligence Data.

With the File Menu Toolbar, you can edit the Intelligence Data directly in JSON format using your Text Editor, then import it into the Intelligence Asset:

Runtime Mode¶

One robust feature Utility Intelligence offers is that the Utility Intelligence Editor can function both during 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.

To open the Utility Intelligence Editor for a Utility Agent at runtime in builds (Runtime Mode):

  1. Create a Utility Intelligence Runtime Editor by right-clicking in the Hierarchy Window, then select CarlosLab/Utility Intelligence Runtime Editor. Alternatively, you can create it manually by creating a new Game Object and adding these components to it.
    center|400
  2. Add a Utility Intelligence Runtime Editor Presenter to the Utility Agent, assign the Utility Intelligence Runtime Editor to the Editor field, and set the Show Key to show the editor when the key is pressed.
    center|500

Here’s how the Utility Intelligence Editor looks in Runtime Mode:

Attachments/UtilityIntelligence/Documentation/UtilityIntelligence/EditorWindow/intelligence-editor_runtime-mode.png

Lock the Editor¶

We have received feedback that the ability to lock the Intelligence Editor is important for testing purposes. It allows users to modify variables from other Game Objects through the Inspector Window and see how they affect the decision scores in the Intelligence Editor. After considering, we decided to add this feature in v2.2.0. We believe you will like this feature.

Tabs¶

Intelligence Tab¶

In Intelligence Tab, you can create new decision makers and add Decisions created in Decision Tab to your decision makers.

Attachments/UtilityIntelligence/Documentation/UtilityIntelligence/EditorWindow/intelligence-tab.png

Status Preview¶

Besides that, you can preview the status of multiple components for any changes, such as inputs, and response curves, right in the Editor without having to play your game. For example:

  • The score and status of each consideration, indicating which considerations are executed and discarded.
  • The score and status of each decision, indicating which decision is chosen based on the current inputs, input normalizations, and response curves.

I believe this feature will save a lot of your time while designing AIs for your games.

Runtime Status¶

Additionally, you can 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¶

Furthermore, you can tweak your AI behaviors during runtime for testing purposes without having to replay your game.

Decision Tab¶

In Decision Tab, you can create new Decisions and add target filters, action tasks, Considerations to your decisions.

Attachments/UtilityIntelligence/Documentation/UtilityIntelligence/EditorWindow/decision-tab.png

Target Filter Tab¶

In Target Filter Tab, you can create new target filters to filter targets for each decision:

Attachments/UtilityIntelligence/Documentation/UtilityIntelligence/EditorWindow/target-filter-tab.png

Consideration Tab¶

In Consideration Tab, you can create new considerations and select input normalizations and response curves for your considerations. Besides that, you can adjust the input values and response curves to observe how they affect the consideration scores:

Input Normalization Tab¶

In Input Normalization Tab, you can create new input normalizations and select inputs for your input normalizations.

Attachments/UtilityIntelligence/Documentation/UtilityIntelligence/EditorWindow/input-normalization-tab.png

Input Tab¶

In Input Tab, you can add new inputs to the intelligence assets.

Attachments/UtilityIntelligence/Documentation/UtilityIntelligence/EditorWindow/input-tab.png

Tip

You can adjust the input values in the editor to observe how these changes affect the statuses of considerations and decisions. For further details, read Status Preview

For example, if you set the input values in the intelligence asset: MeleeAttackWithoutForce (in our examples) as follows:

Attachments/UtilityIntelligence/Documentation/UtilityIntelligence/EditorWindow/input-tab_modify-inputs.png

Then you will notice that the decision: MoveToEnemy is selected in the Intelligence Tab. This means you can determine which decision will be chosen based on the current input values without needing to play your game. Therefore, you will have more time to design your AIs.

Attachments/UtilityIntelligence/Documentation/UtilityIntelligence/EditorWindow/intelligence-tab_modify-inputs.png

Blackboard Tab¶

In Blackboard Tab, you can add variables to share information between multiple components within the agent, such as inputs, input normalizations target filters, and action tasks.

Tip

If some of your blackboard variables are used by one of the inputs or input normalizations, then changing the values of those variables will also affect the statuses of considerations and decisions, just like input values.

Continuing with the example from Input Tab, if you change the sight radius to 15 (the original value is 40):

center|500

Then in the Intelligence Tab, the selected decision will change from MoveToEnemy to Idle because the enemy is out of the agent’s sight:

Attachments/UtilityIntelligence/Documentation/UtilityIntelligence/EditorWindow/intelligence-tab_sight-radius.png


If you like Utility Intelligence, please consider supporting it by leaving a 5-star review on the Asset Store. Your positive feedback motivates me to keep improving and delivering more updates for this framework.
Thank you so much for your support. I love you all! 🥰


Last update : February 15, 2025
Created : September 1, 2024