Academia
Diploma thesis 2025Software Engineeringalgoritmi iskanja poti · grafi · mreže

Comparison of pathfinding algorithms and artificial intelligence in a randomly generated maze

The purpose of the diploma thesis is to determine the efficiency and speed of different approaches to solving paths in complex structures.

Žan ŽerakRačunalništvo in informatika · module Programsko inženirstvo · supervisor mag. Ervin Schaff · defence november 2025
In brief

The project in five facts.

AuthorŽan Žerak
Supervisormag. Ervin Schaff
ModuleSoftware EngineeringComputer Science and Informatics
Employer / clientAcademia
Year2025november 2025
About the project

Challenge, approach and results.

The diploma thesis presents a comparison of pathfinding algorithms and artificial intelligence in solving randomly generated mazes. The purpose of the diploma thesis is to determine the efficiency and speed of different approaches to solving paths in complex structures. The theoretical part discusses shortest path search algorithms, namely the A* algorithm, breadth-first search and Dijkstra's algorithm.

Solution and method

The diploma thesis presents a comparison of pathfinding algorithms and artificial intelligence in solving randomly generated mazes.

Results

The purpose of the diploma thesis is to determine the efficiency and speed of different approaches to solving paths in complex structures. The theoretical part discusses shortest path search algorithms, namely the A* algorithm, breadth-first search and Dijkstra's algorithm. The theory of graphs and networks and the role of heuristics in pathfinding is also presented.

A special chapter is dedicated to artificial intelligence and its significance in solving the pathfinding problem. For the empirical research, an application was developed in the Python programming language with a graphical user interface. The application enables the generation of random mazes of different sizes and visualisation of the operation of individual algorithms.

A deep Q-learning approach using the PyTorch library was implemented to simulate artificial intelligence. Testing was carried out on a thousand randomly generated mazes for the following sizes: 11×11, 21×21 and 31×31. Search time, number of visited nodes and successful reaching of the goal were measured.

Pathfinding algorithms showed 100% success rate for all maze sizes. The A* algorithm proved to be the most optimised with the smallest number of visited nodes, whilst Dijkstra's algorithm found the final node the fastest. Artificial intelligence achieved 60.3% success rate on mazes of size 11×11, but its efficiency decreased significantly with larger mazes: 8.1% success rate on mazes of size 21×21 and 2.8% success rate on mazes of size 31×31.

The results indicate that traditional pathfinding algorithms are more reliable and efficient for practical applications where 100% efficiency and success rate are required. Artificial intelligence offers potentially better results, but requires more extensive training on diverse data to achieve results comparable to pathfinding algorithms. The diploma thesis contributes to a better understanding of the advantages and limitations of different pathfinding approaches in complex structures.

In the future, it would be sensible to investigate other artificial intelligence methods and optimise learning processes to achieve greater success in solving more demanding mazes.

Vezje računalniške plošče s potmi in povezavami
Diploma thesis

Full text

PDF of the diploma thesis (public).

Diploma thesis (PDF) ↓
Related

Module, programme and stories.

Module Programsko inženirstvo

Your diploma project for a real company.

A diploma thesis at Academia solves a challenge from a company – often the one where you do your 800 hours of placement. Read about the Programsko inženirstvo module or book a consultation.

800 hoursof placement in a company
97 %of graduates employed
Module Programsko inženirstvo →Apply 2027/28All diploma projects
Before you go

We will send you the curriculum, the study path and your funding and scholarship options.

No calls, no spam. One e-mail with everything you need to decide, and an invitation to a lecture.

By sending the form you agree that Academia may contact you by e-mail or phone. Privacy · unsubscribe at any time.