Planner

Fig 14Task Specification for the Planner agent

 

Fig 15static structure for the Planner agent

 

Classification: internal architecture/single-agent

Intent: this pattern is originated from robotic and artificial intelligence applications. A planner is a complex system able to perform some kind of reasoning in order to build a plan for reaching a goal.

Motivation: this pattern implement a distributed planner architecture based on the decomposition on three or more abstraction levels. A scenario reported as an example is the three-levels-planning developed for an application of  robotic navigation. It is based on a strategic level planning the robot mission in the environment, an intermediate level planning the best path among the rooms of the environment and a reactive level based on a avoid obstacle algorithm.

Pre-conditions: the agent must be registered to the system AMS. Only the participant must be register to the system yellow pages in order to be identifiable for the communication.

Post-conditions: the Planner task is an abstract class that does not perform any action because of the generality of the pattern. A concrete task must be developed in order to implement the desired behaviour.

Solution: The dynamic description of the Planner pattern is reported in Fig 14 where, using a PASSI Task Specification diagram it is possible to observe the general behavioral schema of the agent. The right swim-lane contains the agent’s tasks (UML activities) while the left swim-lane reports tasks of other (interacting) agents belonging to the system. The first task (the Listener) receives a plan from an upper level (similar) Planner agent; the Planner task elaborates a new finer-grained plan (no detail of the specific algorithm is part of this pattern). The Plan_Sender task sends the new plan to the lower level agent. If the planning algorithm fails (e.g. a path is not found), the DeadlockCommunicator task informs the upper level. In turn, when a deadlock message arrives to this agent from a lower level Planner agent, the LowerLevelDeadlockListener task is responsible for activating a Replanner task that elaborates an alternative solution.

Related Patterns: this is an architectural pattern that divides the planning operation among three different agents but it does not give any indication about the specific algorithm to apply in each level. The VFHPlanner and the AStarPlanner are two possible pattern solving the problem for the second and the third levels.