CA Maze Written by Ron Helwig using Borland Turbo C++. The object of this program is to demonstrate one method of solving mazes. This version uses cellular automata to find the solution path(s). Menu Commands ------------- NEW create a totally filled maze. The user specifies how large it should be, and then can edit it by clicking on squares with the left mouse button. Moving the mouse over the maze with the left mouse button pressed will toggle the squares on or off. OPEN load a maze file. SAVE SAVE AS save the file to disk. I use the filetype 'maz', but there is no restriction in this program. ITERATIONS asks the user how many iterations of the solution routine to do per click of the right mouse button. SIZE sets the size (in pixels) of each block. The maze is a simple two dimensional array of square blocks. RESTORE returns the maze to the last loaded or saved position. RANDOM changes the currently selected maze randomly. Note that the maze may have no solution. It should be used as a starting point for developing new mazes. Left Mouse Button when clicked on a maze block will toggle the status of the block. A wall will become aisle, an aisle will become wall. Right Mouse Button when clicked will perform one (or more) iteration(s) of solving the maze. How it works ------------ The program uses cellular automata to solve the maze. The maze: The maze consists of cells arranged in a 2 dimensional array. The rules: 1) If an aisle cell is surrounded on three (or more) sides, it is obviously a dead end. In this case it is turned into a wall cell. example - WWW -> WWW WaW -> WwW ??? -> ??? 2) If an aisle cell is surrounded by two wall cells, make it a wall cell if it will not close the path. example - WWW? -> WWW? WaA? -> WwA? WAA? -> WAA? ???? -> ???? In both of these cases, it can be seen that the path is not closed. However, in case 2, it might make a wide path thinner. This program is to be distributed as freeware. I don't care how or to whom you give this program. The purpose of this program was to teach myself basic MS-Windows and C++ programming. If you like it and/or have ideas for improving it, you may send comments to helwig@staff.tc.umn.edu (at least for as long as I have that account). I am planning to add printing capabilities later, but for now I have better things to do. I got the idea for this program from a Dr. Dobb's Journal (Feb 1993) article about cellular automata. It contains the basic algorithm for a two-dimensional array of cells using the first rule.