An anytime assignment algorithm: From local task swapping to global optimality


The assignment problem arises in multi-robot task-allocation scenarios. Inspired by existing techniques that employ task exchanges between robots, this paper introduces an algorithm for solving the assignment problem that has several appealing features for online, distributed robotics applications. The method may start with any initial matching and incrementally improve the current solution to reach the global optimum, producing valid assignments at any intermediate point. It is an any-time algorithm with a performance profile that is attractive: quality improves linearly with stages (or time). Additionally, the algorithm is comparatively straightforward to implement and is efficient both theoretically (complexity of \(O(n^3\lg n)\) is better than many widely used solvers) and practically (comparable to the fastest implementation, for up to hundreds of robots/tasks). The algorithm generalizes “swap” primitives used by existing task exchange methods already used in the robotics community but, uniquely, is able to obtain global optimality via communication with only a subset of robots during each stage. We present a centralized version of the algorithm and two decentralized variants that trade between computational and communication complexity. The centralized version turns out to be a computational improvement and reinterpretation of the little-known method of Balinski–Gomory proposed half a century ago. Thus, deeper understanding of the relationship between approximate swap-based techniques—developed by roboticists—and combinatorial optimization techniques, e.g., the Hungarian and Auction algorithms—developed by operations researchers but used extensively by roboticists—is uncovered.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12


  1. 1.

    The algorithm was first presented in the 2012 Robotics: Science and Systems conference (Liu and Shell 2012a).

  2. 2.

    Every traversed entry on the path segments, no matter whether it is assigned or unassigned, must connect to a new entry in other rows, requiring a message be passed. The number is approximately half of all the traversed entries since each entry is counted twice for the analysis of communication complexity.


  1. Akgül, M. (1992). The linear assignment problem. In M. Akgiil & S. Tufecki (Eds.), Combinatorial optimization (pp. 85–122). Berlin: Springer.

    Chapter  Google Scholar 

  2. Balinski, M. L., & Gomory, R. E. (1964). A primal method for the assignment and transportation problems. Management Science, 10(3), 578–593.

    Article  Google Scholar 

  3. Berhault, M., Huang, H., Keskinocak, P., Koenig, S., Elmaghraby, W., Griffin, P., & Kleywegt, A. J. (2003). Robot Exploration with Combinatorial Auctions (pp. 1957–1962). In Proceedings of the IROS.

  4. Bertsekas, D. P. (1990). The auction algorithm for assignment and other network flow problems: A tutorial. Interfaces, 20(4), 133–149.

    Article  Google Scholar 

  5. Burkard, R., Dell’Amico, M., & Martello, S. (2009). Assignment problems. New York, NY: Society for Industrial and Applied Mathematics.

    MATH  Book  Google Scholar 

  6. Cao, Y. U., Fukunaga, A. S., & Kahng, A. B. (1997). Cooperative mobile robotics: Antecedents and directions. Autonomous Robots, 4, 226–234.

    Article  Google Scholar 

  7. Chaimowicz, L., Campos, M. F. M., & Kumar, V. (2002). Dynamic role assignment for cooperative robots (pp. 293–298). In Proceedings of the IEEE International Conference on Robotics and Automation.

  8. Cunningham, W., & Marsh, A. B, I. (1978). A primal algorithm for optimum matching. Mathematical Programming Study, 8, 50–72.

    Google Scholar 

  9. Dantzig, G. (1963). Linear programming and extensions. Princeton: Princeton University Press.

    MATH  Google Scholar 

  10. Dias, M.B., & Stentz, A. (2002). Opportunistic optimization for market-based multirobot control (pp. 2714–2720 ). In Proceedings of the IROS.

  11. Dias, M. B., Zlot, R., Kalra, N., & Stentz, A. (2006). Market-based multirobot coordination: A survey and analysis. In Proceedings of the IEEE.

  12. Edmonds, J., & Karp, R. M. (1972). Theoretical improvements in algorithmic efficiency for network flow problems. Journal of the ACM, 19(2), 248–264.

    MATH  Article  Google Scholar 

  13. Farinelli, A., Iocchi, L., Nardi, D., & Ziparo, V. A. (2006). Assignment of dynamically perceived tasks by token passing in multi-robot systems. In Proceedings of the IEEE, Special Issue on Multi-robot Systems.

  14. Gerkey, B. P., & Matarić, M. J. (2004). A formal analysis and taxonomy of task allocation in multi-robot systems. International Journal of Robotics Research, 23(9), 939–954.

    Article  Google Scholar 

  15. Giordani, S., Lujak, M., & Martinelli, F. (2010). A distributed algorithm for the multi-robot task allocation problem. LNCS: Trends in Applied Intelligent Systems, 6096, 721–730.

    Article  Google Scholar 

  16. Goldberg, A. V., & Kennedy, R. (1995). An efficient cost scaling algorithm for the assignment problem. Mathematics Programs, 71(2), 153–177.

    MathSciNet  MATH  Article  Google Scholar 

  17. Golfarelli, M., Maio, D., & Rizzi, S. (1997). Multi-agent path planning based on task-swap negotiation (pp. 69–82). In Proceedings of the UK Planning and Scheduling Special Interest Group, Workshop.

  18. Koenig, S., Keskinocak, P., & Tovey, C. A. (2010). Progress on agent coordination with cooperative auctions. In Proceedings of the AAAI.

  19. Kuhn, H. W. (1955). The Hungarian method for the assignment problem. Naval Research Logistic Quarterly, 2, 83–97.

    Article  Google Scholar 

  20. Lagoudakis, M. G., Markakis, E., Kempe, D., Keskinocak, P., Kleywegt, A., Koenig, S., et al. (2005). Auction-based multi-robot routing. In Robotics: Science and Systems. Cambridge: MIT Press.

  21. Liu, L., & Shell, D. (2011). Assessing optimal assignment under uncertainty: An interval-based algorithm. International Journal of Robotics Research, 30(7), 936–953.

    Article  Google Scholar 

  22. Liu, L., & Shell, D. (2012a). A distributable and computation-flexible assignment algorithm: From local task swapping to global optimality. In Proceedings of Robotics: Science and Systems, Sydney, Australia.

  23. Liu, L., & Shell, D. (2012b). Large-scale multi-robot task allocation via dynamic partitioning and distribution. Autonomous Robots, 33(3), 291–307.

    Article  Google Scholar 

  24. Nanjanath, M., & Gini, M. (2006). Dynamic task allocation for robots via auctions (pp. 2781–2786). In Proceedings of the ICRA.

  25. Parker, L. E. (2008). Multiple mobile robot systems. In B. Siciliano & O. Khatib (Eds.), Handbook of robotics chapter 40. Berlin: Springer.

    Google Scholar 

  26. Sandholm, T. (1998). Contract types for satisficing task allocation: I Theoretical results (pp. 68–75). In Proceedings of the AAAI Spring Symposium: Satisficing Models.

  27. Sariel, S., & Balch, T. (2006). A distributed multi-robot cooperation framework for real time task achievement. In Proceedings of Distributed Autonomous Robotic Systems.

  28. Stone, P., Kaminka, G. A., Kraus, S., & Rosenschein, J. S. (2010). Ad Hoc autonomous agent teams: Collaboration without pre-coordination. In Proceedings of the AAAI.

  29. Thomas, L., Rachid, A., & Simon, L. (2004). A distributed tasks allocation scheme in multi-UAV context (pp. 3622–3627). In Proceedings of the ICRA.

  30. Wawerla, J., & Vaughan, R. T. (2009). Robot task switching under diminishing returns (pp. 5033–5038). In Proceedings of the 2009 IEEE/RSJ international conference on Intelligent robots and systems, IROS’09.

  31. Zavlanos, M. M., Spesivtsev, L., & Pappas, G. J. (2008). A distributed auction algorithm for the assignment problem. In Proceedings of the CDC.

  32. Zheng, X., & Koenig, S. (2009). K-swaps: cooperative negotiation for solving task-allocation problems (pp. 373–378). In Proceedings of the International Joint Conferences on Artificial Intelligence (IJCAI).

  33. Zilberstein, S. (1996). Using anytime algorithms in intelligent systems. AI Magazine, 17(3), 73–83.

    Google Scholar 

Download references

Author information



Corresponding author

Correspondence to Lantao Liu.

Rights and permissions

Reprints and Permissions

About this article

Cite this article

Liu, L., Shell, D.A. An anytime assignment algorithm: From local task swapping to global optimality. Auton Robot 35, 271–286 (2013).

Download citation


  • Multi-robot task allocation
  • Decentralized assignment
  • Anytime algorithms
  • Task swapping