This is the description that David gave us of the program, after we told him that he had won the contest. First, all the parameters get pushed on to the stack; they'll all be left there for a bit while the program goes and does other things. Second, one-character synonyms are defined for the 35 most common primitive operators that appear in the program by "load"ing each operator and "def"ing the synonym to it. Before any definitions are done, a new dictionary is defined which is large enough to accommodate the whole program's definitions. Third, the entire program is unpacked. Since the vast majority of the code in the program can now be written as a sequence of single characters or slash-characters separated by spaces, there is no reason to put most of the spaces in the code. So the program is pushed as a sequence of 50 strings, starting with the string describing the end of the program, alternately with spaces removed and without spaces removed. The strings are then unpacked into a big string by putting in the appropriate spaces. At the end of the unpacking, the big string contains the main progrm body which is then executed. The string contains a program which does the following: it begins by taking the parameters and using them to define constants. Some of the constants which are defined are procedures or arrays of procedures which are defined differently depending on the parameters. The maze is actually generated in an array of integers by an algorithm that randomly wanders through the array, marking its path, backtracking whenever it is caught in a dead end, and branching (after backtracking) as early as possible. Once the algorithm has backtracked all the way back to its starting point and cannot branch any more, the whole array will have been visited, and furthermore, the marked path must form a tree, which means there are no loops. This tree is our maze, and a random start and end point are chosen. In a 3-dimensional maze, the concept of a "dead end" is redefined so that the wandering point can jump over any number of paths that are at right angles to the jump, as long as eventually there is an empty square to land in. After the maze is generated, a solution has to be found. A new wandering point algorithm begins at the "start" point and moves within the maze given by the first algorithm; the soltuion algorithm, however, doesn't make random turns. It systematcally "follows the left wall", favoring left turns over straight moves, and straight moves over right turns. In this kind of maze, this solution algorithm is guaranteed to get to the end point eventually, and if it marks the maze correctly, we can deduce the shortest path from beginning to end. Finally, the maze and the solution are drawn. Each "cell" of the maze can look like a straightaway, an elbow, a dead end, or a T shape. Rather than deal with each of these cases in all their orientations seperately, we notice that the walls only have a few shapes: inside small corner, outside big corner, straight wall, and dead-end. The program contains a simple algorithm that goes counterclockwise around the four possible exit directions of a maze cell and draws the appropriate kind of wall depending on the angle spanned by two adjacent cell exits. The definition of the walls depends on whether the maze is curvy or straight. Finally, in a 3-d maze, special case code is required to draw crossing paths. After the maze is printed out, the solution path is drawn and printed out in a very similar way. Now, you might ask, why might somebody go to all the trouble of writing this big program with one-letter identifiers? The answer is that I did not do that. I wrote the maze-drawing program with regular variable names and then wrote a little lex program to translate all the identifiers in the program into a one-character identifiers. With this translator, it was easy to develop the compact code and reuse precious one-letter variable names without having source code that was too confusing. The final compacting trick of assembling the main program out of strings with a short whitespace-inserting algorithm was done entirely by hand. David