This lightweight Hierarchical Task Network engine was first used in production in an iPhone strategy game called Exospecies. Visit the Exospecies Blog for more details. It is designed to be small, memory constrained, and used as an implementation detail of an app. It used the classic SHOP Planner as inspiration and largely followed that model.
It can be used natively in C++ and it has bindings that support Python 3.x as well (using CTypes). It has been built and tested on Windows, Mac, and Ubuntu Linux.
Use and enjoy!
indhtn is designed to be built with CMake like this:
mkdir build
md build
cd build
cmake -help
to get a list of generators on your system:
cmake -help
-G
option to choose it. Here are the ones that have been tested:
cmake -G "Unix Makefiles" ../src
cmake -G "Unix Makefiles" ../src
cmake -G "Xcode" ../src
cmake -G "Visual Studio 16 2019" ../src
cmake --build ./ --config Release
cmake --build ./ --config Debug
make
If you’re using a command line generator of some sort, just change to the directory where things got built and run runtests
on the commandline in your operating system of choice.
To run the Python tests:
In Xcode, after you build you should change the scheme to runtests
and then choose Product/Run. The output of the test will appear in the Output window.
Set the default project to runtests and hit F5. You’ll get a console window with the results
99.99% of the code for the Htn is platform agnostic (or at least should be). It has been built and tested on Windows, Mac and iOS. The platform specific code is located in the iOS and Win directorys and is currently only a single function for debug logging.
Read GettingStarted.md for a tutorial on how to use InductorHTN in C++ and Python.
Do what you like, with no warranties! Read License.md.