Efficient Planning in Large-scale Systems Using Hierarchical Finite State Machines
Elis Stefansson, Karl H. Johansson
TL;DR
This work introduces HiMMs, a modular representation of hierarchical Mealy machines with nonnegative costs, to enable scalable optimal planning in large-scale systems. It presents a two-step planning paradigm: an offline Optimal Exit Computer that precomputes, for each machine, the minimal exit costs for all inputs, and an online Optimal Planner that rapidly computes optimal plans by reducing the HiMM and expanding the reduced solution back to the original, with a near-linear complexity in the hierarchy depth for bounded machines. The framework is extended to handle dynamic reconfigurations with targeted updates and to exploit identical machines via compact representations, yielding substantial speedups in preprocessing and planning. Empirical results on millions of states and a robotic warehouse task demonstrate speedups over Dijkstra and Bidirectional Dijkstra, while Contraction Hierarchies can outperform in some cases but at much higher preprocessing costs; the identical-machines variant enables planning on extremely large state spaces (e.g., up to $10^{150}$ states) by dramatically reducing the model size. Overall, the HiMM approach provides a principled, modular, and reconfigurable planning solution for large-scale hierarchical control systems with practical efficiency gains. The offline-online separation and modular proofs underpin robustness to changes and the potential for aggressive compression when many machines are identical. $O(|X|)$ preprocessing and $O( ext{depth}(Z)\, ext{log} ext{ depth}(Z))$ online planning emerge as the core complexity characteristics for bounded components, with additional improvements from reconfiguration and identical-machine grouping.
Abstract
We consider optimal planning in a large-scale system formalised as a hierarchical finite state machine (HFSM). A planning algorithm is proposed computing an optimal plan between any two states in the HFSM, consisting of two steps: A pre-processing step that computes optimal exit costs of the machines in the HFSM, with time complexity scaling with the number of machines; and a query step that efficiently computes an optimal plan by removing irrelevant subtrees of the HFSM using the optimal exit costs. The algorithm is reconfigurable in the sense that changes in the HFSM are handled with ease, where the pre-processing step recomputes only the optimal exit costs affected by the change. The algorithm can also exploit compact representations that groups together identical machines in the HFSM, where the algorithm only needs to compute the optimal exit costs for one of the identical machines within each group, thereby avoid unnecessary recomputations. We validate the algorithm on large systems with millions of states and a robotic application. It is shown that our approach outperforms Dijkstra's algorithm, Bidirectional Dijkstra and Contraction Hierarchies.
