Skip to main content

Real-Time Heuristic Search for Pathfinding in Video Games

  • Chapter
  • First Online:
Artificial Intelligence for Computer Games

Abstract

Game pathfinding is a challenging problem due to a limited amount of per-frame CPU time commonly shared among many simultaneously pathfinding agents. The challenge is rising with each new generation of games due to progressively larger and more complex environments and larger numbers of agents pathfinding in them. Algorithms based on A* tend to scale poorly as they must compute a complete, possibly abstract, path for each agent before the agent can move. Real-time heuristic search algorithms satisfy a constant bound on the amount of planning per move, independent of problem size. These algorithms are thus a promising approach to large scale multi-agent pathfinding in video games. However, until recently, real-time heuristic search algorithms universally exhibited a visually unappealing “scrubbing” behavior by repeatedly revisiting map locations. This had prevented their adoption by video game developers. In this chapter, we review three modern search algorithms which address the “scrubbing” problem in different ways. Each algorithm presentation is complete with an empirical evaluation on game maps.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 129.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 169.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 169.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Barto, A.G., Bradtke, S.J., Singh, S.P.: Learning to act using real-time dynamic programming. Artificial Intelligence 72(1), 81–138 (1995)

    Article  Google Scholar 

  2. Björnsson, Y., Bulitko, V., Sturtevant, N.: TBA*: Time-bounded A*. In: Proceedings of the International Joint Conference on Artificial Intelligence (IJCAI), pp. 431 – 436. AAAI Press, Pasadena, California (2009)

    Google Scholar 

  3. Bonet, B., Geffner, H.: Planning as heuristic search. Artificial Intelligence 129(1–2), 5–33 (2001)

    Article  MathSciNet  MATH  Google Scholar 

  4. Bonet, B., Geffner, H.: Learning depth-first search: A unified approach to heuristic search in deterministic and non-deterministic settings, and its application to MDPs. In: Proceedings of the International Conference on Automated Planning and Scheduling (ICAPS), pp. 142–151. Cumbria, UK (2006)

    Google Scholar 

  5. Bonet, B., Loerincs, G., Geffner, H.: A fast and robust action selection mechanism for planning. In: Proceedings of the National Conference on Artificial Intelligence (AAAI), pp. 714–719. AAAI Press / MIT Press, Providence, Rhode Island (1997)

    Google Scholar 

  6. Bulitko, V.: Lookahead pathologies and meta-level control in real-time heuristic search. In: Proceedings of the 15th Euromicro Conference on Real-Time Systems, pp. 13–16 (2003)

    Google Scholar 

  7. Bulitko, V.: Learning for adaptive real-time search. Tech. Rep. http://arxiv.org/abs/cs.AI/0407016, Computer Science Research Repository (CoRR) (2004)

  8. Bulitko, V., Björnsson, Y.: kNN LRTA*: Simple subgoaling for real-time search. In: Proceedings of Artificial Intelligence and Interactive Digital Entertainment (AIIDE), pp. 2–7. AAAI Press, Stanford, California (2009)

    Google Scholar 

  9. Bulitko, V., Björnsson, Y., Lawrence, R.: Case-based subgoaling in real-time heuristic search for video game pathfinding. Journal of Artificial Intelligence Research (JAIR) 39, 269–300 (2010)

    Google Scholar 

  10. Bulitko, V., Lee, G.: Learning in real time search: A unifying framework. Journal of Artificial Intelligence Research (JAIR) 25, 119–157 (2006)

    Google Scholar 

  11. Bulitko, V., Li, L., Greiner, R., Levner, I.: Lookahead pathologies for single agent search. In: Proceedings of the International Joint Conference on Artificial Intelligence (IJCAI), pp. 1531–1533. Acapulco, Mexico (2003)

    Google Scholar 

  12. Bulitko, V., Luštrek, M., Schaeffer, J., Björnsson, Y., Sigmundarson, S.: Dynamic control in real-time heuristic search. Journal of Artificial Intelligence Research (JAIR) 32, 419–452 (2008)

    Google Scholar 

  13. Bulitko, V., Sturtevant, N., Lu, J., Yau, T.: Graph abstraction in real-time heuristic search. Journal of Artificial Intelligence Research (JAIR) 30, 51–100 (2007)

    Google Scholar 

  14. Furcy, D., Koenig, S.: Speeding up the convergence of real-time search. In: Proceedings of the National Conference on Artificial Intelligence (AAAI), pp. 891–897 (2000)

    Google Scholar 

  15. Hart, P., Nilsson, N., Raphael, B.: A formal basis for the heuristic determination of minimum cost paths. IEEE Transactions on Systems Science and Cybernetics 4(2), 100–107 (1968)

    Article  Google Scholar 

  16. Hernández, C., Meseguer, P.: Improving convergence of LRTA*(k). In: Proceedings of the International Joint Conference on Artificial Intelligence (IJCAI), Workshop on Planning and Learning in A Priori Unknown or Dynamic Domains, pp. 69–75. Edinburgh, UK (2005)

    Google Scholar 

  17. Hernández, C., Meseguer, P.: LRTA*(k). In: Proceedings of the International Joint Conference on Artificial Intelligence (IJCAI), pp. 1238–1243. Edinburgh, UK (2005)

    Google Scholar 

  18. Hoffmann, J.: A heuristic for domain independent planning and its use in an enforced hill-climbing algorithm. In: Proceedings of the 12th International Symposium on Methodologies for Intelligent Systems (ISMIS), pp. 216–227 (2000)

    Google Scholar 

  19. Ishida, T.: Moving target search with intelligence. In: National Conference on Artificial Intelligence (AAAI), pp. 525–532 (1992)

    Google Scholar 

  20. Ishida, T.: Moving target search with intelligence. In: Proceedings of the National Conference on Artificial Intelligence, pp. 525–532 (1992)

    Google Scholar 

  21. Koenig, S.: A comparison of fast search methods for real-time situated agents. In: Proceedings of Int. Joint Conf. on Autonomous Agents and Multiagent Systems, pp. 864–871 (2004)

    Google Scholar 

  22. Koenig, S., Furcy, D., Bauer, C.: Heuristic search-based replanning. In: Proceedings of the Int. Conference on Artificial Intelligence Planning and Scheduling, pp. 294–301 (2002)

    Google Scholar 

  23. Koenig, S., Likhachev, M.: Real-time adaptive A*. In: Proceedings of the International Joint Conference on Autonomous Agents and Multiagent Systems (AAMAS), pp. 281–288 (2006)

    Google Scholar 

  24. Korf, R.: Depth-first iterative deepening: An optimal admissible tree search. Artificial Intelligence 27(3), 97–109 (1985)

    Article  MathSciNet  MATH  Google Scholar 

  25. Korf, R.: Real-time heuristic search. Artificial Intelligence 42(2–3), 189–211 (1990)

    Article  MATH  Google Scholar 

  26. Likhachev, M., Ferguson, D.I., Gordon, G.J., Stentz, A., Thrun, S.: Anytime dynamic A*: An anytime, replanning algorithm. In: ICAPS, pp. 262–271 (2005)

    Google Scholar 

  27. Likhachev, M., Gordon, G.J., Thrun, S.: ARA*: Anytime A* with provable bounds on sub-optimality. In: S. Thrun, L. Saul, B. Schölkopf (eds.) Advances in Neural Information Processing Systems 16. MIT, Cambridge, MA (2004)

    Google Scholar 

  28. Luštrek, M.: Pathology in single-agent search. In: Proceedings of Information Society Conference, pp. 345–348. Ljubljana, Slovenia (2005)

    Google Scholar 

  29. Luštrek, M., Bulitko, V.: Lookahead pathology in real-time path-finding. In: Proceedings of the National Conference on Artificial Intelligence (AAAI), Workshop on Learning For Search, pp. 108–114. Boston, Massachusetts (2006)

    Google Scholar 

  30. Pearl, J.: Heuristics. Addison-Wesley, Reading, MA (1984)

    Google Scholar 

  31. Rayner, D.C., Davison, K., Bulitko, V., Anderson, K., Lu, J.: Real-time heuristic search with a priority queue. In: Proceedings of the International Joint Conference on Artificial Intelligence (IJCAI), pp. 2372–2377. Hyderabad, India (2007)

    Google Scholar 

  32. Russell, S., Wefald, E.: Do the Right Thing: Studies in Limited Rationality. MIT, Cambridge, MA (1991)

    Google Scholar 

  33. Shimbo, M., Ishida, T.: Controlling the learning process of real-time heuristic search. Artificial Intelligence 146(1), 1–41 (2003)

    Article  MathSciNet  MATH  Google Scholar 

  34. Shue, L.Y., Li, S.T., Zamani, R.: An intelligent heuristic algorithm for project scheduling problems. In: Proceedings of the 32nd Annual Meeting of the Decision Sciences Institute. San Francisco (2001)

    Google Scholar 

  35. Shue, L.Y., Zamani, R.: An admissible heuristic search algorithm. In: Proceedings of the 7th International Symposium on Methodologies for Intelligent Systems (ISMIS-93), LNAI, vol. 689, pp. 69–75 (1993)

    Google Scholar 

  36. Sigmundarson, S., Björnsson, Y.: Value Back-Propagation vs. Backtracking in Real-Time Search. In: Proceedings of the National Conference on Artificial Intelligence (AAAI), Workshop on Learning For Search, pp. 136–141. Boston, Massachusetts, USA (2006)

    Google Scholar 

  37. Stenz, A.: The focussed D* algorithm for real-time replanning. In: Proceedings of the International Joint Conference on Artificial Intelligence (IJCAI), pp. 1652–1659 (1995)

    Google Scholar 

  38. Sturtevant, N.: Memory-efficient abstractions for pathfinding. In: Proceedings of the third conference on Artificial Intelligence and Interactive Digital Entertainment, pp. 31–36. Stanford, California (2007)

    Google Scholar 

  39. Sturtevant, N., Buro, M.: Partial pathfinding using map abstraction and refinement. In: Proceedings of the National Conference on Artificial Intelligence (AAAI), pp. 1392–1397. Pittsburgh, Pennsylvania (2005)

    Google Scholar 

  40. Sturtevant, N.R., Bulitko, V., Björnsson, Y.: On learning in agent-centered search. In: Proceedings of the 9th International Conference on Autonomous Agents and Multiagent Systems (AAMAS) (2010)

    Google Scholar 

Download references

Acknowledgements

Parts of this chapter have been previously published as conference and journal articles written by the authors. This research was supported by grants from the National Science and Engineering Research Council of Canada (NSERC) and the Icelandic Centre for Research (RANNÍS). All the research works by Nathan Sturtevant included in this chapter were performed at the University of Alberta. We appreciate the help of Josh Sterling, Stephen Hladky, and Daniel Huntley.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Vadim Bulitko .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer Science+Business Media, LLC

About this chapter

Cite this chapter

Bulitko, V., Björnsson, Y., Sturtevant, N.R., Lawrence, R. (2011). Real-Time Heuristic Search for Pathfinding in Video Games. In: González-Calero, P., Gómez-Martín, M. (eds) Artificial Intelligence for Computer Games. Springer, New York, NY. https://doi.org/10.1007/978-1-4419-8188-2_1

Download citation

  • DOI: https://doi.org/10.1007/978-1-4419-8188-2_1

  • Published:

  • Publisher Name: Springer, New York, NY

  • Print ISBN: 978-1-4419-8187-5

  • Online ISBN: 978-1-4419-8188-2

  • eBook Packages: EngineeringEngineering (R0)

Publish with us

Policies and ethics