Scaling Analysis of Maze-Solving Algorithms: From BFS And Dijkstra to Heuristic A*

Authors

  • Kewen Zhu

DOI:

https://doi.org/10.54097/arvg8s77

Keywords:

Maze solving; heuristic function; turn penalty; algorithm evaluation.

Abstract

The maze solving has long been regarded as a fundamental problem in computer science and artificial intelligence. By modeling a maze as a weighted graph through the skeletonization, the problem can be approached as a path-finding task. This paper presents an empirical study that evaluates the classical search algorithms including BFS, DFS, Dijkstra alongside heuristic search methods (standard A* with Manhattan distance and a turn-penalized A* variant). Using mazes of varying and averaging results across multiple random seeds, the experiments measure performance in terms of expanded nodes, and runtime. Furthermore, log–log regression is applied to characterize the empirical scaling behavior of each algorithm. The results show that all algorithms exhibit near-linear growth in both node expansions and runtime, but differ significantly in constant factors. The turn-penalized A* demonstrates the influence of the heuristic design on search cost and path smoothness, highlighting trade-offs between the human-inspired intuition and the algorithmic optimality.

References

[1]Abd Algfoor Z, Sunar MS, Kolivand H. A comprehensive study on pathfinding techniques for robotics and video games. Int J Comput Games Technol. 2015; 2015:736138.

[2]Fangfang. Research on power load forecasting based on Improved BP neural network. Harbin Institute of Technology; 2011.

[3]Barnouti NH, Al-Dabbagh SSM, Naser MAS. Pathfinding in strategy games and maze solving using A* search algorithm. J Comput Commun. 2016;4(11):15-25.

[4]Ansari A, Sayyed MA, Ratlamwala K, Shaikh P. An optimized hybrid approach for path finding. Int J Found Comput Sci Technol. 2015;5(2):47-58.

[5]Beamer S, Asanović K, Patterson D. Direction-optimizing breadth-first search. Sci Program. 2013;21(3-4):137-48.

[6]Foead D, Ghifari A, Kusuma MB, Hanafiah N, Gunawan E. A systematic literature review of A* pathfinding. Procedia Comput Sci. 2021; 179:507-14.

[7]Botea A, Bouzy B, Buro M, Bauckhage C, Nau D. Pathfinding in games. In: Lucas SM, Mateas M, Preuss M, Spronck P, Togelius J, editors. Artificial and computational intelligence in games. Dagstuhl Follow-Ups. Vol. 6. Schloss Dagstuhl–Leibniz-Zentrum für Informatik; 2013. p. 21-31.

[8]Cui X, Shi H. A*-based pathfinding in modern computer games. Int J Comput Sci Netw Secur. 2011;11(1):125-30.

[9]Kallem SR. Artificial Intelligence Algorithms. IOSR J Comput Eng. 2012;6(3):1-8.

[10]Gabrovšek P. Analysis of maze generating algorithms. IPSI Trans Internet Res. 2019;15(1):23-30.

[11]A Z, Rui X, Gao C. Improved A* navigation path-planning algorithm based on hexagonal grid. ISPRS Int J Geo-Inf. 2024;13(5):166.

Downloads

Published

15-03-2026

Issue

Section

Articles

How to Cite

Zhu, K. (2026). Scaling Analysis of Maze-Solving Algorithms: From BFS And Dijkstra to Heuristic A*. Mathematical Modeling and Algorithm Application, 9(1), 189-195. https://doi.org/10.54097/arvg8s77