“…e reusable resource conflict coordination mechanism can be used by multiple decision-making agents simultaneously to generate repeated resource conflicts. For these resource conflicts, the tasks exhibiting higher priority are reserved and the tasks with lower priorities are coordinated (1) Procedure MA-HTN (s, T, D) (2) set s, initial state (3) set T, initial task set (4) set D, domain (5) initial operator ActionID � 0 (6) set P � the empty plan (7) T 0 ⟵ t belongs to T : no other task in T is constrained to precede t (8) loop (9) if T is empty then return P (10) nondeterministically choose any t in T 0 (11) if t is a primitive task then (12) choose a ground instance a for t with the smallest cost among the available resources (13) ActionID � ActionID + 1 (14) opmessage(a) � (ID, Resourceused(a), st(a), et(a), cost(a)) (15) sendlist ⟵ opmessage(a) (16) send opmessage(a) to the other planners (17) if receivelist ≠ ∅ : (18) ResourceID � Resourceused(a) (19) conflict actions a′ ⟵ a′ belongs to the extopmessages of receivelist : (20) has Resource(a′) � ResourceusedID and has the smallest st(a′) (21) and duration(st, et) is overlapped with duration(st′, et′)}, then (22) if st < st′ (23) delete the rest extopmessage in receivelist (24) Resourcestate(r) � i, Resourcest(r) � st, Resourceet(r) � et (25) delete T in T 0 and add a into P (26) else if st > st′ (27) delete opmessage(a) in sendlist (28) Resourcestate(r) � i′, Resourcest(r) � st′, Resourceet(r) � et′ (29) Backtrack (30) else delete T in T 0 and add a into P (31) if t is a nonprimitive task then (32) choose a method to decompose t into subtasks t 1 , t 2 , . .…”