4.1.3. DM-Based Subgoal Graph

In order to introduce the concept of maximal clearance provided by DMs into the precomputing algorithms of subgoal graphs, we extend the formal definitions of the traditional subgoal graph as follows:

**Definition 1.** *For two cells s and s', let dx and dy be the respective distances between s and s' along the x and y axes. The shortest trajectory between s and s' is a permutation of exactly min(dx,dy) diagonal and* |*dx-dx*| *cardinal moves, for a total of max(dx,dy) moves.*

**Definition 2.** *Given a safety radius R, a collision-free path between two cells s and s' is the shortest trajectory in which each cell sˆ is collision-free, i.e., C(R,sˆ )*=*0.*

**Definition 3.** *Given a safety radius R, an unblocked cell s is a collision-free subgoal if there are two perpendicular cardinal directions c1 and c2 such that C(R,s*+*c1*+*c2)*=*1, C(R,s*+*c1)*=*0 and C(R,s*+*c2)*=*0.*

**Definition 4.** *Given a safety radius R, two cells s and s' are h-reachable if there is a collision-free path of octile length h(s,s') between them. Two h-reachable cells are safe-h-reachable if all shortest trajectories between them are also paths. Two safe-h-reachable cell s and s' are direct-h-reachable if none of the shortest paths between them contains a subgoal s"* -*{s,s'}.*

**Definition 5.** *Given a safety radius R, an DM-based subgoal graph, Gs* =*(R,Vs,Es), on its corresponded grids, is a high-level, undirected graph, where Vs is the set of collision-free subgoals and Es is the set of edges connecting direct-h-reachable subgoals, and the length of the edges is the octile distances between the subgoals they connect*.

The process of constructing an DM-based subgoal graph can be intuitively divided into two steps: (1) placing collision-free subgoals at the corners of the expanded obstacle boundary to circumnavigate

the collision regions (e.g., the orange circles shown in Figure 7a); (2) adding edges between those subgoals which are mutually direct-h-reachable (e.g., the green edges shown in Figure 7b). Given a start and a goal cell (e.g., the blue and red discs shown in Figure 7b), we first connect them to their respective direct-h-reachable subgoals and then plan a high-level shortest path by executing A\* on the updated subgoal graph (e.g., the white trajectory shown in Figure 7b). We can refine each segment of the high-level path by arbitrarily selecting an h-reachable path between two connecting subgoals, and then orderly appending these refined paths together. Moreover, as shown in Figure 7c,d, for agents with different safety radius, their corresponding DM-based subgoal graph, according to Definition 5, can set aside adequate clearance; therefore, the paths found from the resulting graphs can be collision-free.

**Figure 7.** Steps of constructing DM-based subgoal graphs with different safety radius. (**a**) Step1: placing subgoals (*R*=1); (**b**) Step2: connecting direct-h-reachable subgoals (*R*=1); (**c**) a subgoal graph with *R*=1.5; (**d**) a subgoal graph with *R*=3.
