A Focussed Dynamic Path Finding Algorithm with Constraints Louise Leenen Cyber Defence Research Group Council for Industrial and Scientific Research PO Box 395, Pretoria 001 Email: lleenen@csir.co.za Alex Terlunen Smart Systems Research Group Council for Industrial and Scientific Research PO Box 395, Pretoria 001 Email: aterlunen@csir.co.za Abstract—The Military Unit Path Finding Problem (MUPFP) is the problem of finding a path from a starting point to a destination where a military unit has to move, or be moved, safely whilst avoiding threats and obstacles and minimising path cost in some digital representation of the actual terrain [1]. The MUPFP has to be solved in an environment where information can change whilst the optimal path is being calculated, i.e. obstacles and threats can move or appear and path costs can change. In previous work, the authors formulated the MUPFP as a constraint satisfaction problem (CSP) where path costs are minimised whilst threat and obstacle avoidance constraints are satisfied in a dynamic environment [2]. In this paper the previous algorithm is improved by adding a heuristic to focus the search for an optimal path. Existing approaches to solving path planning problems tend to combine path costs with various other criteria such as obstacle avoidance in the objective function which is being optimised. The authors’ approach is to optimise only path costs while ensuring that other criteria such as safety requirements, are met through the satisfaction of added constraints. Both the authors’ previous algorithm and the improved version presented in this paper are based on dynamic path planning algorithms presented by Stenz [3], [4]. Stenz’s original D* algorithm solves dynamic path finding problems (by optimising path costs without satisfying additional constraints) and his Focussed D* algorithm employs a heuristic function to focus the search. Stenz’s algo- rithms only optimises path costs; no additional factors such as threat and obstacle avoidance are addressed. Keywords —optimisation, path finding, constraint program- ming, dynamic A* search I. I NTRODUCTION Path planning algorithms calculate an optimal path for an object from a start point to a destination point, whilst avoiding obstacles and minimising costs. It has many applications such as computer games, transportation, robotics, networks, and others. In a static algorithm, the environment is known and an optimal path is calculated before the object is moved. In a dynamic algorithm, the environment may not be completely known before the object starts moving, or it may change whilst the object is moving. In this case, the path plan has to be updated while it is being executed. An overview of methods to solve the path finding problem is given by Leenen et al. [2]. The modelling of problems in terms of constraints has the advantage of a natural, declarative formulation. A CSP formulation of a problem states what must be satisfied, without specifying how it should be satisfied. It consists of a set of variables, a set of domains for the variables, and a set of constraints. Each constraint is defined over a subset of the set of variables. A constraint is a logical relation involving one or more variables, where each variable has a domain of possible values. A constraint thus restricts the possible values that variables can have. Constraints can specify partial information about variables, are declarative and may be non- linear. A solution to a CSP specifies values for all the variables such that all the constraints are satisfied. In the military unit path finding problem, a military unit aims to avoid obstacles and threats, or to pass threats with at least a minimum distance between them and the threat, while moving to their destination as quickly as possible. In the MUPFP a balance has to be maintained between the two main criteria, route speed and safety [1]. Although there are various methods to solve the MUPFP, the existing approaches combine various criteria in a weighted objective function which is optimised. Our CSP approach, on the other hand, is to optimise only path costs while ensuring that certain other criteria, such as safety requirements, are met. Our objective function is a pure cost function. We adopt a constraint-based approach with a clear distinction between the goal of obtaining an optimal path cost and satisfying safety measures. A constraint programming (CP) approach allows for flexibility in terms of modeling different constraints. If a new requirement has to be met, the addition of a suitable constraint or the modification of existing constraints will suffice to model the new problem. In previous work [5] we formulated the MUPFP as a CSP and modified the D* algorithm (dynamic A* search) [3] by adding threat and obstacle avoidance constraints. The D* algorithm builds an optimal path by repairing potential optimal paths in every step as new information becomes available. The Focussed D* algorithm [4] focusses the search for an optimal path with an heuristic function to reduce the graph expansion and thus the total calculation time required. In this paper we extend our previous algrorithm by adding a heuristic similar to that used in the Focussed D* algorithm. There are many general techniques that can be used to solve CSPs such as integer programming, local search, and neural networks, but tree search in conjunction with backtracking and consistency checking is widely used. CP refers to the computa- tional systems used to solve CSPs. It emerged from a number of disciplines such as Artificial Intelligence, Computational Logic, Programming Languages, and Operations Research. CP has proven to be effective at solving combinatorial and over-