## 2 Related Work
### Maze Generation and Solving Algorithms  
Maze generation algorithms are a key component in developing puzzle-based educational games, particularly those aimed at teaching programming and problem-solving skills. In his book, [PERSON] [5] summarized and explained eleven maze generation algorithms: the recursive backtracker, [PERSON]'s algorithm, [PERSON]'s algorithm [34], [PERSON]'s algorithm [35], the recursive division algorithm, the Aldous-Broder algorithm [32], [PERSON]'s algorithm [36], the Hunt and Kill algorithm, the Growing Tree algorithm, the Binary Tree algorithm, and the Sidewinder algorithm. However, the performance and suitability of these algorithms vary significantly based on the application's requirements. Over the years, programmers and researchers have analyzed, improved, adjusted, and proposed different maze generation algorithms to best suit the given situations. For example, in a comparative analysis of different maze generation algorithms, [PERSON] et al. [37] studied [PERSON]'s algorithm, [PERSON]'s algorithm, the DFS algorithm (Depth First Search), [PERSON]'s algorithm, [PERSON]'s algorithm, the Hunt and Kill algorithm, and the Aldous-Broder algorithm. They evaluated algorithms based on two parameters: the time taken by the algorithm to generate the maze, and the space complexity of the maze. Their research findings suggest that, on average, DFS is the fastest approach for producing and solving mazes. Similarly, [PERSON] [38] ranked different maze-generating algorithms according to their difficulty. He inspected several features, such as the number of visited intersections, dead ends, and overall steps of the solving agents. In this study, the [PERSON] and [PERSON]'s algorithms achieved the best results. Implementing dynamic maze generation in games is another crucial area, where the speed of generation is paramount. For instance, [PERSON] [39] examined three different implementations of the Growing Tree method for maze generation on Android mobile devices, concluding that the maze creation process operates efficiently on these devices. As for the new approaches, [PERSON] et al. [40] tried to create a perfect maze, where any two cells can be joined by a unique path. They proposed an original approach to classify mazes using the simple measures introduced by [PERSON] [5], as well as the physical-based measures introduced by [PERSON] [41]. They designed two original maze generators, Prim and Kill, and Twist and Merge, and their study showed that the Twist and Merge algorithm is the best performingamong all the other algorithms. On the other hand, [PERSON] et al. [42] elucidated how graph theory can be used to solve mazes. They compared BFS (Breadth First Search) and DFS algorithms, and their analysis suggests that the memory requirement for coding is higher in DFS than in BFS. Therefore, in the case of large mazes, BFS is more appropriate than DFS. If the maze contains several paths to reach the destination, DFS may be time-consuming. Thus, they suggested not to use DFS in those scenarios. Moreover, if the consideration point is to find the shortest path, then BFS is preferred over DFS. More recently, [PERSON] et al. (2018) presented a new idea for solving mazes using graph theory. They elaborated on how to minimize the length of the optimal path formulated as a topology optimization problem by mapping a maze with finite elements and then, through the eigenvalues of the Laplacian matrix of the graph, imposing a constraint over the connectivity between the input and the output. [PERSON] et al. (2018) conducted a systematic literature review focusing on research related to multi-agent systems, various maze-solving algorithms, and particularly multi-agent pathfinding. Their findings revealed that most multi-agent pathfinding applications were implemented in static environments with predefined target locations. Additionally, the majority of studies employed agents with individual goals, enabling distributed decision-making and distinct interests.