09 May 2025 9:17:33.631 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.) 2 17 25 26 25 33 41 49 66 65 3 18 26 27 26 50 51 59 58 66 11 12 20 28 27 35 43 51 59 67 3 20 28 29 37 52 53 59 69 77 6 21 29 30 29 53 54 62 61 78 14 13 30 31 30 54 55 54 62 70 8 16 24 0 31 39 47 55 70 78 16 24 32 31 39 47 48 72 71 72 Random maze with far apart ends: Diameter = 23 Starting cell = 1 10 Stopping cell = 4 10 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 34 49 50 58 66 65 1 9 10 34 42 41 58 0 58 66 11 12 20 28 43 51 59 58 66 74 12 20 21 29 44 45 53 59 67 77 13 21 29 37 45 53 61 60 61 69 14 22 30 29 30 45 53 70 69 77 15 14 22 30 31 39 54 62 70 71 7 24 32 31 39 56 55 63 80 79 Random maze with far apart ends: Diameter = 26 Starting cell = 2 3 Stopping cell = 8 1 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 41 49 57 74 10 18 26 34 35 50 51 50 67 75 11 19 20 19 36 35 52 67 68 67 5 20 21 36 44 52 53 52 60 68 6 14 29 37 38 37 54 53 70 69 14 22 30 38 39 47 55 63 71 79 15 14 31 39 47 55 63 64 63 71 7 15 32 31 48 56 64 0 64 72 maze_test(): Normal end of execution. 09 May 2025 9:17:33.632 PM