VISUALIZATION OF THE ALGORITHM FOR FINDING THE OPTIMAL PATH BETWEEN TWO POINTS IN A GRID MAZE WITH DYNAMICALLY CHANGING OBSTACLES

Authors

  • Milovidov Yurii National University of Life and Environmental Sciences of Ukraine image/svg+xml
  • Borodkina Iryna National University of Life and Environmental Sciences of Ukraine image/svg+xml

DOI:

https://doi.org/10.31548/itees.2026.01.035

Keywords:

Depth First Search, Breadth First Search, Graph theory, Pathfinding, Dynamic environment, Dijkstra's algorithm, A-star algorithm (A)*, D Lite algorithm*, Algorithm visualization, Grid-based maze, Decision support systems

Abstract

This paper investigates the current problem of finding the optimal path in dynamic environments modeled as cellular labyrinths with obstacles. The problem of finding the optimal path between two points of a cellular labyrinth is relevant due to its versatility, applied value and fundamental importance for the development of modern technologies. The main attention is paid to the development and software implementation of a system for visualizing algorithms on graphs, which allows real-time observation of the decision-making process of an autonomous agent. The paper provides a detailed comparative analysis of classical methods, such as Dijkstra's algorithm and A*, as well as specialized incremental approaches, in particular D* Lite. The advantages of using graph theory for solving problems in environmental management, logistics and robotics, where the environment can change unpredictably, are substantiated. The purpose of the presented work is to develop a program for visualizing the algorithm for finding the optimal path on a field, which can be represented as a labyrinth with surmountable and insurmountable obstacles. The task is to find the optimal path between two points on the field and display it. The practical part of the research includes the development of software in C#, which demonstrates the process of rerouting the route when new obstacles arise without the need for a complete recalculation of the entire network. This is critically important for minimizing computational costs in complex information and analytical systems. A special emphasis is placed on the educational aspect: the developed visualization is integrated into the educational process for teaching the disciplines "Algorithms and Data Structures" and "Object-Oriented Programming", which significantly improves the assimilation of complex mathematical concepts by students. The results of the work confirm that the combination of theoretical methods of pathfinding with interactive visualization provides high reliability and transparency of the functioning of modern navigation and environmental monitoring systems. The program for visualizing the algorithm for finding the optimal path in a maze has great practical importance and can be used in robotics and autonomous systems for robot navigation in a real environment, in networks and telecommunications it searches for the optimal data transmission route. Visualizing the algorithm for finding the optimal path in a cellular maze with dynamic obstacles allows for a deeper understanding of the principles of operation of algorithms, to assess their effectiveness in real time, and to experiment with different strategies for rerouting the route.

Received 2026-02-23

Accepted 2026-04-01

References

1. Minor, E.S., Urban, D.L. (2008), A Graph-Theory Framework for Evaluating Landscape Connectivity and Conservation Planning. Conservation Biology, 22: 297-307. https://doi.org/10.1111/j.1523-1739.2007.00871.x.

2. Shanu, S., Wattasseril, J. I., Qureshi, Q., & Jhala, Y. V., Bhattacharya S. (2016). A graph theoretic approach for modelling wildlife corridors. arXiv. https://doi.org/10.48550/arXiv.1603.01939

3. Choi, S., Ullah, Z., & Son, M. (2026). A graph-based machine learning framework for river water quality management under data limitations. Journal of Environmental Management, 398, 128575. https://doi.org/10.1016/j.jenvman.2026.128575.

4. Aho, K., Kriloff, C., Godsey, S. E., Ramos, R., Wheeler, C., You, Y., Warix, S., Derryberry, D., Zipper, S., Hale, R. L., Bond, C. T., & Kuehn, K. A. (2023). Non-perennial stream networks as directed acyclic graphs: The R-package streamDAG. Environmental Modelling & Software, 167, 105775. https://doi.org/10.1016/j.envsoft.2023.105775.

5. Dunne, J. A., & Williams, R. J., Martinez N. D. (2002). Food-web structure and network theory: The role of connectance and size, 99 (20) 12917-12922. https://doi.org/10.1073/pnas.19240769

6. Longjas, A. ; Tejedor, A. ; Foufoula-Georgiou, E. (2017). Graph Theory Approach for Studying Food Webs. American Geophysical Union, Fall Meeting 2017, abstract #IN33B-0119. https://ui.adsabs.harvard.edu/abs/2017AGUFMIN33B0119L/abstract.

7. Evans D.M., Pocock M.J. O., Memmott J. (2013). The robustness of a network of ecological networks to habitat loss. Ecology Letters, 16(7). https://doi.org/10.1111/ele.12117.

8. Ormsbee, L. E., & Lansey, K. E. (2024). Graph theory applications in water distribution system design and optimization. Journal of Water Resources Planning and Management, 150(4), 04023012. https://doi.org/10.1061/JWRMD5.WRENG-6001.

9. Zheng, Y. (2025) Historical Evolution and Future Optimization of A*-Based Path Planning in Static and Dynamic Environments. Highlights in Science, Engineering and Technology. https://hsetdata.com/index.php/ojs/article/view/838.

10. Liao, T., Chen, F., Wu, Y., Zeng, H., Ouyang, S., Guan, J. (2024) Research on Path Planning with the Integration of Adaptive A-Star Algorithm and Improved Dynamic Window Approach Electronics 13(2), 455; https://doi.org/10.3390/electronics13020455.

11. Sinkevych, O., Boyko, Y., Sokolovskyy, B., Rechynskyi, O. (2024) Study of Pathfinding Approach Based on A* With Adaptive Occupancy Grid. ACPS. 9(2)б, 95–100, https://doi.org/10.23939/acps2024.02.095.

12. Stawarz, P., Ozog, D., Łabuński, W. (2024) Supported Influence Mapping for Mobile Robot Pathfinding in Dynamic Indoor Environments Sensors. 24(22),. 7240, https://www.mdpi.com/1424-8220/24/22/7240.

13. Gao, Y., Han, Q., Feng, S., Wang, Z., Meng, T., Yang, J. (2024) Improvement and Fusion of D*Lite Algorithm and Dynamic Window Approach for Path Planning in Complex Environments Machines, 12(8), 525; https://doi.org/10.3390/machines12080525.

14. Chen, L., & Wang, Y. (2025). Time and memory trade-offs in shortest-path algorithms for dynamic road networks. Journal of Applied Mathematics and Computing, 71(3), 442–459. https://doi.org/10.1007/s12190-025-01842-x.

15. Aldhafferi N. (2025) Time and Memory Trade-Offs in Shortest-Path Algorithms Across Graph Topologies: A*, Bellman–Ford, Dijkstra, AI-Augmented A* and a Neural Baseline. Computers, 14(12), 545; https://doi.org/10.3390/computers14120545.

16. Patel, A. (n.d.). Introduction to the A* algorithm. Red Blob Games. Retrieved May 22, 2024, https://www.redblobgames.com/pathfinding/a-star/introduction.html.

17. Ji, Y., Zuo, T., & Hu, L. (2023). Pareto optimal path generation algorithm in stochastic transportation networks with reliability constraints. Transportation Research Part C: Emerging Technologies, 148, Article 104039. https://doi.org/10.1016/j.trc.2023.104039.

18. Vanin, V., Zalevska, O., Jablonskiy, P. (2020). The application of graph theory for improving and rendering algorithm for finding the shortest path in the mathematical models of video games [Zastosuvannia teorii hrafiv dlia udoskonalennia ta vizualizatsii alhorytmu poshuku naikorotshoho shliakhu v matematychnii modeli videoihry]. Applied Geometry and Engineering Graphics. 97, 23–28, https://doi.org/10.32347/0131-579x.2020.97.23-28.

Published

2026-04-22

Issue

Section

Computer Science