Skip to content

Releases: JarkkoPar/Utility_AI

Signals, bug fixes and performance improvements

23 Jan 21:23
Compare
Choose a tag to compare

This release focuses on adding signals to Agent Behaviours and State Trees, fixing a number of bugs, and a couple of performance improvements:

Agent Behaviours

  • The UtilityAIAgent has now the following new signals added: "behaviour_group_changed", "behaviour_group_exited", "behaviour_exited", "action_exited".
  • The UtilityAIBehaviourGroup has now the signals: "behaviour_group_entered", "physics_frame_tick", "idle_frame_tick" and "behaviour_group_exited
  • The UtilityAIBehaviour has now the signals: "behaviour_entered", "physics_frame_tick", "idle_frame_tick" and "behaviour_exited
  • The UtilityAIAction has now the signals: "action_entered", "physics_frame_tick", "idle_frame_tick" and "action_exited
  • Thank you to @Franz-Inc and @madeleineostoja for valuable feedback about the need for these signals.

State Tree

  • The State Tree nodes gain the following signals: "state_check_enter_condition", "state_entered", "state_ticked" and "state_exited". These can be used instead extending the node with a script and defining the methods with similar names.

Behaviour Tree

  • The CoolDownMSEC & USEC nodes were missing an initialization that caused a slight extra cooldown if the cooldown as triggered immediately at application start. That is now fixed.

Node Query System

  • The Custom criterion had a bug where the defaults for is_filtered and score were not set, now that is corrected and they default to score=1.0 and is_filtered=false.
  • After the time budgeting updates of the previous releases, the criterion score calculation had a bug that did not multiply the score correctly between criteria. That has now been fixed.
  • Thanks to @Franz-Inc for pointing out these bugs!

General performance improvement

  • In various places godot::Object::cast_to's have been replaced with cached pointers, which results in a performance boost.

Utility Enabled State Trees, performance enchancements to the NQS, PointGridSearchSpace and more

05 Jan 15:34
Compare
Choose a tag to compare

Version 1.5 of Utility AI GDExtension contains the following additions and improvements:

Utility enabled State Trees

  • Two powerful new nodes to the AI toolbox for defining hierarchical states to the AI entities.
  • A State Tree nodes support Utility-based child node selection in addition to rule-based selection.
  • The State Tree nodes can also be used for "classical" Godot Node based State Machines (State-machine node, state-node).

Node Query System enhancements

  • The UtilityAIPointGrid2DSearchSpace and UtilityAIPointGrid3DSearchSpace have been added. These bring grid-based point generation for spatial queries. The point grids can place the points in the 2D/3D space directly or use a NavMesh for the placement, adding awareness of obstacles to the grid.
  • The NQS singleton is now more powerful and posting queries got a significant performance boost, using very little time when called.

New tutorials

  • Beginner "Getting started" tutorials have been added for Agent Behaviours, Behaviour Trees, State Trees and the Node Query System.
  • Tutorials for installation and using the performance metrics have also been added.

Agent Behaviours

  • The UtilityAIBehaviour property Can be interrupted default setting has been changed to true.
  • The behaviour_id property has been added to make it easier to use the Behaviours without actions. The behaviour node still can easily be used for this, but the ID gives more implementation options.
  • The Consideration nodes now evaluate their scores only if their input value has changed.
  • Resource based Considerations have been added. These are still experimental. Creating considerations as a resource allows you to add them in the inspector, making the node tree less cluttered.

Other improvements and changes

  • The AIPerformanceMonitor singleton has been tweaked and more metrics have been added.
  • A cache-based check has been added to the Visibility-sensors to validate the existence of the Area2D/3D nodes.
  • Many NodePath based references to other nodes have been changed to use direct node references. Thank you for @kus04e4ek for pointing out that this is possible and doing the change! This change improves and simplifies assigning the references especially in code. It does have the side-effect that you will need to re-assign the sensor references to considerations when going from 1.4 to 1.5.

Behaviour Tree nodes, Time Budgeting for Node Query System

14 Dec 20:26
Compare
Choose a tag to compare

This release adds the Utility enabled Behaviour Tree nodes and the NodeQuerySystem-singleton that enables Time Budgeting for the NQS queries.

Utility Enabled Behaviour Tree

  • This behaviour tree supports Utility-based behaviour node picking. There is a special Behaviour Tree node ScoreBasedPicker which uses UtilityAIConsideration-nodes to score the childs of this node and picks the best scoring one.
  • RunNQSQuery-node allows running NQS queries directly from the behaviour tree.
  • NodeReference-node allows splitting the behaviour trees to subtrees that can be within other scenes, and to connect them to the tree at run-time. This allows objects to be "smart objects" for the AI, containing their usage instructions in the form of sub-behaviour trees.
  • Other nodes included: Root, Sequence, Selector, Parallel, RandomSequence, RandomSelector, Repeat, RepeatUntil, Limiter, Inverter, FixedResult, CooldownMsec/Usec/Ticks, PassThrough, PassBy, Leaf.

NodeQuerySystem-singleton with Time Budgeting

  • A NodeQuerySystem-singleton has been added that allows for NQS-query time budgeting. You can set a maximum time the queries are allowed to run per frame. If a query doesn't complete during that time, it gets spread out to multiple frames until it finishes.
  • Performance Counters have been added to see the query run time statistic and how much time posting a query takes.
  • The bug reported by engimaxp should now be fixed, too. Thanks for reporting!

The Node Query System and some enhancements

25 Nov 21:03
Compare
Choose a tag to compare

Version 1.3 brings a major new component to Utility AI GDExtension: The Node Query System.

Summary of this release:

  • Added the UtilityAIBooleanConsideration for simpler boolean-handling
  • Added the has_failed property to the UtilityAIAction and UtilityAIActionGroup nodes
  • Added the Node Query System, which is a generalized utility system that can be used with any type of node. See the docs for more details.
  • Added the Hide and Seek example to the example project. This is a 3D example with a basic cover system to show how the Node Query System can be used for such use cases.

Release with more sensors and custom evaluators

01 Nov 22:29
Compare
Choose a tag to compare

Version 1.2 adds the following features:

  • The Consideration and ActionGroup nodes have now both the possibility of adding a custom eval method to do your own custom logic for calculating score (Consideration) or choosing an action (ActionGroup).
  • The following specialized sensor nodes have been added: UtilityAIBooleanSensor, UtilityAIIntRangeSensor, UtilityAIFloatRangeSensor, UtilityAIDistanceVector2Sensor, UtilityAIDistanceVector3Sensor, UtilityAIAngleVector2Sensor, UtilityAIAngleVector3Sensor, UtilityAIArea2DVisibilitySensor and UtilityAIArea3DVisibilitySensor.

There was also a bug in the ActionGroup action stepping function that sometimes caused the Sequence choice to get stuck with one of the actions. This has now been fixed.

Version 1.1 release

17 Oct 17:27
Compare
Choose a tag to compare

Changes from version 1.0:

  • Fixed a bug related to adding the UtilityAIBehaviourGroups that caused a crash when no behaviour was selected.
  • Added the custom eval-method option to UtilityAIConsideration nodes. You can now extend the consideration evaluation to be as easy or complex as you need. The eval-method also exposes the has_vetoed property for use. Vetoing allows for an immediate stop for evaluating considerations for a behaviour when that is needed and forces the score to 0.0.
  • Related to exposing vetoing, the AI Agent now doesn't include any behaviours with a score of 0.0 to the top scoring behaviours list.
  • For UtilityAISensorGroup and UtilityAIConsiderationGroup nodes the Evaluation Method option "OneMinusScore"/"OneMinusValue" is now moved to a boolean option (a checkbox in the inspector) outside of the Evaluation Method list, so that it can be applied to all Evaluation Method options.

Marking the v1.0 in the source code repo

15 Oct 20:07
Compare
Choose a tag to compare

Marking the v1.0 version release also for this source code repo, accompanying the binary repo 1.0 release.
This release has the addition of the UtilityAIBehaviourGroup node.

Cleaned up example, added possibility to abort a behaviour

11 Oct 21:19
Compare
Choose a tag to compare

The AI Agent now gained the ability to abort the behaviour it is executing. Also the signal for an action change has been added.
The example project has been cleaned up and now two examples are provided. The example project along with the extension binaries can be found in a separate repository here: Utility AI GDExtension.

Minor updates

09 Oct 18:25
Compare
Choose a tag to compare

Minor updates to fix or_greater/or_less mistakes in the code. Added the cooldown_turns option to the Behaviour nodes. Fixed an error (wrong lib name) in the SConstruct file.

First release

08 Oct 21:45
Compare
Choose a tag to compare

This is the first release. Contains the UtilityAIAgent, UtilityAIBehaviour, UtilityAISensor, UtilityAISensorGroup, UtilityAIConsideration, UtilityAIConsiderationGroup, UtilityAIAction and UtilityAIActionGroup nodes with place holder icons. There is one example project included in this first release.

Please give feedback and comments for improvement.