planningbehavior-tree

Hierarchical Task Network (HTN) in AI


I cannot get my head around what HTN is. What I believe is that we want to decompose all the small actions of a plan into a higher level plan.

For example:

"Take bus" is an HLA of i.e. "go to bus", "buy ticket", "sit down" etc.

Am I wrong? Would appreciate a simple explanation.


Solution

  • Firstly, a hierarchical task network is a parser for a given plan. In the example, the plan:

    1 takebus
      1.1 gotobus
      1.2 buyticket
      1.3 sitdown
    

    can be tested against the HTN-network and it will answer the request with: “plan is valid” and “it took 30 minutes to execute”. Another plan which is modified a bit, can also be executed against the HTN-network.

    What the planning community around the ICAPS conference is doing, is figuring out, how to build hierarchical task networks. They are often using the Prolog-dialect, PDDL, for creating complex behavior trees. For example, to parse plans about the dock workers robot problem or to parse plans from the blocks world domain.

    Secondly, the term hierarchical task network planning is also used if the aim is to find the optimal plan for a given domain. Here we have already the PDDL description and we're interested in finding the shortest plan. This is useful in control-tasks mostly with the aim of autonomous game-playing.

    Overall, it is correct to say, that hierarchical task networks are a fundamental building block of every cognitive architecture. It combines disciplines like game AI programming, knowledge engineering and heuristic planning.