06 October 2025 6:21:50.085 PM maze_test(): Fortran90 version Test maze(), which implements some maze algorithms. maze_diameter_test(): maze_diameter(): find two far apart cells; Cell numbers for the maze: 1 9 17 25 33 41 49 57 65 73 2 10 18 26 34 42 50 58 66 74 3 11 19 27 35 43 51 59 67 75 4 12 20 28 36 44 52 60 68 76 5 13 21 29 37 45 53 61 69 77 6 14 22 30 38 46 54 62 70 78 7 15 23 31 39 47 55 63 71 79 8 16 24 32 40 48 56 64 72 80 A random maze: Number of rows = 8 Number of columns = 10 The maze: +--+--+--+--+--+--+--+--+--+--+ | | | | | | + + +--+--+--+ + + + + + | | | | | | | + + +--+--+--+ + + + +--+ | | | | | +--+--+--+ + +--+ +--+--+ + | | | | | +--+--+ +--+ +--+ + +--+ + | | | | | + +--+--+--+--+--+ +--+ +--+ | | | | + +--+ + +--+ + +--+--+ + | | | | | | | +--+--+--+ + + +--+ +--+ + | | | | | | +--+--+--+--+--+--+--+--+--+--+ Rooted tree representation: (0 is the root. All other cells print the cell number of their parent on the tree.) 9 17 25 33 41 42 50 58 66 74 1 9 10 34 42 43 51 59 67 66 2 10 27 35 43 51 0 51 59 76 12 20 28 27 35 52 51 52 76 77 13 21 20 21 36 53 52 60 61 69 5 6 30 38 46 54 53 70 69 70 6 23 22 30 47 46 54 71 79 78 16 24 32 31 39 47 64 63 80 79 Random maze with far apart ends: Diameter = 23 Starting cell = 3 1 Stopping cell = 8 7 The maze: +--+--+--+--+--+--+--+--+--+--+ | | | | | | + + +--+--+--+ + + + + + | | | | | | | + + +--+--+--+ + + + +--+ |00| | | | +--+--+--+ + +--+ +--+--+ + | | | | | +--+--+ +--+ +--+ + +--+ + | | | | | + +--+--+--+--+--+ +--+ +--+ | | | | + +--+ + +--+ + +--+--+ + | | | | | | | +--+--+--+ + + +--+ +--+ + | | | |$$ | | +--+--+--+--+--+--+--+--+--+--+ maze_path_test(): maze_path() generates a path from one cell to another, in a connected maze. Cell numbers for the maze: 1 9 17 25 33 41 49 57 65 73 2 10 18 26 34 42 50 58 66 74 3 11 19 27 35 43 51 59 67 75 4 12 20 28 36 44 52 60 68 76 5 13 21 29 37 45 53 61 69 77 6 14 22 30 38 46 54 62 70 78 7 15 23 31 39 47 55 63 71 79 8 16 24 32 40 48 56 64 72 80 A random maze: Number of rows = 8 Number of columns = 10 The maze: +--+--+--+--+--+--+--+--+--+--+ | | | | | +--+--+--+ +--+ +--+ + + + | | | | | | + +--+ +--+--+ +--+--+ +--+ | | | | | | | | + +--+ + + + + +--+--+ + | | | | +--+--+ + +--+ + +--+ +--+ | | | | | | | | + + + +--+ + +--+ + + + | | | | | | + + +--+ +--+--+--+ +--+ + | | | | | | | | + +--+ +--+ + + + +--+ + | | | | | +--+--+--+--+--+--+--+--+--+--+ Rooted tree representation: (0 is the root. All other cells print the cell number of their parent on the tree.) 9 17 25 33 41 42 57 58 66 74 3 18 19 25 42 43 58 66 67 66 4 3 20 28 36 44 52 67 75 76 12 20 28 36 44 45 53 52 69 68 6 21 20 28 38 53 61 62 70 78 7 13 21 38 46 45 62 70 78 0 15 14 31 30 40 48 56 62 79 78 7 24 23 40 48 56 64 63 80 79 Random maze with far apart ends: Diameter = 26 Starting cell = 5 1 Stopping cell = 1 7 The maze: +--+--+--+--+--+--+--+--+--+--+ | |$$ | | | +--+--+--+ +--+ +--+ + + + | | | | | | + +--+ +--+--+ +--+--+ +--+ | | | | | | | | + +--+ + + + + +--+--+ + | | | | +--+--+ + +--+ + +--+ +--+ |00| | | | | | | + + + +--+ + +--+ + + + | | | | | | + + +--+ +--+--+--+ +--+ + | | | | | | | | + +--+ +--+ + + + +--+ + | | | | | +--+--+--+--+--+--+--+--+--+--+ Random maze with path from start to stop: The maze +--+--+--+--+--+--+--+--+--+--+ | |$$***| | | +--+--+--+ +--+ +--+**+ + + | | | | | ***** | + +--+ +--+--+ +--+--+**+--+ | | | | | | | *****| + +--+ + + + + +--+--+**+ | ***********| |*****| +--+--+**+ +--+**+ +--+**+--+ |00|*****| | |********|**| | +**+**+ +--+ + +--+**+**+ + |**|**| | | ***** | +**+**+--+ +--+--+--+ +--+ + |*****| | | | | | | + +--+ +--+ + + + +--+ + | | | | | +--+--+--+--+--+--+--+--+--+--+ maze_print_test(): maze_print() prints a maze with path marked. The maze: +--+--+ |*****|$$ +**+**+**+ |00|*****| + +--+--+ maze_random_test(): maze_random() generate a random maze. Cell numbers for the maze: 1 9 17 25 33 41 49 57 65 73 2 10 18 26 34 42 50 58 66 74 3 11 19 27 35 43 51 59 67 75 4 12 20 28 36 44 52 60 68 76 5 13 21 29 37 45 53 61 69 77 6 14 22 30 38 46 54 62 70 78 7 15 23 31 39 47 55 63 71 79 8 16 24 32 40 48 56 64 72 80 A random maze: Number of rows = 8 Number of columns = 10 The maze: +--+--+--+--+--+--+--+--+--+--+ | | | | | | | + +--+--+ + + +--+--+ + + | | | | | | | | + +--+ +--+--+ + + + + + | | | | | | + + + + + +--+--+--+ +--+ | | | | +--+--+ +--+ +--+--+--+ + + | | | | +--+--+--+--+ +--+--+ +--+--+ | | | | | | | | | +--+ + + + + + +--+ +--+ | | | + +--+ + +--+ +--+--+ +--+ | | | | | +--+--+--+--+--+--+--+--+--+--+ Rooted tree representation: (0 is the root. All other cells print the cell number of their parent on the tree.) 2 17 25 26 34 42 57 65 66 74 3 2 19 18 42 43 51 59 67 75 4 19 20 28 36 35 43 67 68 67 12 11 28 36 37 36 44 52 60 77 13 21 20 37 38 37 45 69 68 69 14 15 23 31 39 47 55 61 71 70 15 23 0 23 31 39 47 55 72 71 7 24 23 31 32 47 48 56 64 72 maze_test(): Normal end of execution. 06 October 2025 6:21:50.086 PM