PIBT¶
cuplan.PIBT — Priority Inheritance with Backtracking (Okumura,
Machida, Défago and Tamura 2022, Artificial Intelligence
310:103752). No whole-path planning: every timestep, each agent
proposes the neighbouring vertex closest to its goal, and conflicts are
settled on the spot — a high-priority agent lends its priority to the
occupant of the vertex it wants, recursively, backtracking when a chain
cannot move. Priorities grow while an agent is away from its goal and
reset on arrival, which prevents starvation.
Guarantees, stated plainly¶
PIBT is incomplete: it can livelock on instances that require an agent to move far away from its goal. Reachability of every goal is verified up front, so a failure is reported as livelock within the step bound, never silently. LaCAM — on the roadmap — wraps PIBT in a complete search and fixes exactly this.
Parallelization¶
Three parts, two of them parallel:
- Distance oracle — one exact goal-distance table per agent, the dominant cost in pymapf's implementation (a serial Dijkstra per agent). Here it is a single batched BFS.
- Candidate evaluation — each step, every agent's five candidate vertices are gathered and ordered by goal distance with random tie-breaking: one vectorized gather + argsort across all agents.
- Inheritance chains — recursive and data-dependent, so they run on the host, exactly as written in the paper.
Runs are reproducible for a fixed seed, and identical between the
CPU and CUDA backends (the backends change where the oracle is
computed, not any decision).
Priority Inheritance with Backtracking (PIBT), GPU-assisted.
PIBT (Okumura et al. 2022, Artificial Intelligence 310:103752) plans one timestep at a time: each agent proposes the neighbouring vertex closest to its goal, and conflicts are settled on the spot by priority inheritance with backtracking. Priorities grow while an agent is away from its goal and reset on arrival, which prevents starvation.
What parallelizes and what does not, stated plainly:
- The distance oracle — one exact goal-distance table per agent, the dominant cost in pymapf's implementation (one serial Dijkstra per agent) — is a single batched BFS on the selected backend.
- The candidate evaluation — gathering the five candidate vertices of every agent and ordering them by goal distance with random tie-breaking — is one vectorized gather + argsort across all agents per timestep.
- The inheritance chains are recursive and data-dependent, so they run on the host, exactly as written in the paper.
PIBT is incomplete: it can livelock on instances that require an agent to move far away from its goal (LaCAM, on the roadmap, fixes that by wrapping PIBT in a complete search). Reachability of every goal is checked up front, so failures are reported as livelock, not silence.
PIBT ¶
Rule-based one-step-at-a-time MAPF solver (Okumura et al. 2022).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
max_timestep
|
int | None
|
give up after this many timesteps. Defaults to a bound proportional to the map size and the agent count. |
None
|
seed
|
int | None
|
fixes tie-breaking, making a run reproducible. |
0
|
backend
|
Backend
|
backend used for the batched distance oracle and the per-step candidate evaluation. |
'auto'
|
Source code in cuplan/pibt.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | |
solve ¶
solve(problem)
Return a conflict-free :class:~cuplan.problem.Solution or None.
Source code in cuplan/pibt.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | |