Skip to content

Releases: ptrefall/fluid-hierarchical-task-network

Version 0.3.1

24 May 09:25
Compare
Choose a tag to compare
Version 0.3.1 Pre-release
Pre-release

Cleaned up import/assembly dependencies that had crept in over time.

Full Changelog: v0.3...v0.3.1

Version 0.3

23 May 08:33
607ba05
Compare
Choose a tag to compare
Version 0.3 Pre-release
Pre-release

What's Changed

  • Improved code complexity of Domain's FindPlan and Planner's Tick. This breaks up the code in improved bite sized functions, specially in the planner. by @ptrefall in #16
  • Stateless Planner. The Context now owns a Planner State instead of Planner holding state. This should make it much easier to multi-thread planning and use Fluid HTN with Unity DOTS. by @ptrefall in #18

Full Changelog: v0.2...v0.3

Version 0.2

21 Jan 15:55
8b58aba
Compare
Choose a tag to compare
Version 0.2 Pre-release
Pre-release
  • Added Aborted function to primitive tasks and operators. The planner calls this function on the current task when a condition or executing condition fail, or when an operator returns failure. This is a breaking change in that all implementations of IPrimitiveTask and IOperator will require an Aborted function now.
  • Added Method Traversal Record to Primitive Task decomposition from a Selector. Tracking MTR for Primitive Tasks on a Sequence is not relevant since they're always included.
  • Misc documentation improvements and unit tests.
  • Unity specific fix -> asmdef file now has a meta file associated with it required by Unity to load the definition.

Version 0.1.1

22 Apr 12:48
8d559a8
Compare
Choose a tag to compare
Version 0.1.1 Pre-release
Pre-release
  • Fixed bug in traversal record, where a traversal of [0,0,1] wouldn't beat a previous record of [0,1,0].

Version 0.1

30 Jul 07:10
Compare
Choose a tag to compare
Version 0.1 Pre-release
Pre-release
  • Total order forward decomposition planner algorithm implemented.
  • Generic domain builder class, that makes it easy to define HTN domains, and to extend them.
  • Early rejection through method traversal record.
  • Partial planning.
  • Splicing of domains at build-time.
  • Splicing of domains at run-time through slots declared at build-time, adding support for smart objects.
  • Planner class that handles all the complexities of managing tasks in plans, when to re-plan a domain, etc.
  • Only re-plan when a plan completes/fails, or when the context state change.
  • Uses a generic factory pattern internally to support custom memory management and pooling.
  • Extensive decomposition logging support, for debugging.
  • Simple Unity support through package modules.
  • Separate extension library and example projects.
  • Unit tests.

This release has some small breaking changes with the introduction of decomposition logging.

Stack<string> DecompositionLog;

is now

Queue<IBaseDecompositionLogEntry> DecompositionLog { get; set; }

Additionally, in your custom conditions, you might want to extend your IsValid() implementation with something like

if (ctx.LogDecomposition) ctx.Log(Name, $"MyCondition.IsValid:{result}", ctx.CurrentDecompositionDepth+1, this, result ? ConsoleColor.DarkGreen : ConsoleColor.DarkRed);

In your custom effects, you might want to extend your Apply() implementation with something like

if (ctx.LogDecomposition) ctx.Log(Name, $"MyEffect.Apply:{Type}", ctx.CurrentDecompositionDepth+1, this);

Please refer to the debug section of the readme file for more details on using the decomposition logger.

This project still needs more usage in real-life applications before it can be declared as something other than pre-release, but it is more or less feature-complete.