Maze Navigation via Genetic Optimization

One of the most interesting applications of genetic algorithms falls into the area of decision support. Decision support problems involve a series of decisions, each of which is influenced by all decisions made prior to that point. This class of problems occurs often in enterprise management, particularly in the area of scheduling or resource allocation. In order to demonstrate the formulation of this class of problems, a series of maze problems will be presented. The complexity of the mazes is intensified as each new maze is introduced. Two solving scenarios are introduced and comparison results are provided. The first scenario incorporated the traditional genetic algorithm procedure for the intended purpose of acquiring a solution based upon a purely evolutionary approach. The second scenario utilized the genetic algorithm in conjunction with embedded domain specific knowledge in the form of decision rules. The implementation of domain specific knowledge is intended to enhance solution convergence time and improve the overall quality of offspring produced which significantly increases the probability of acquiring a more accurate and consistent solution. Results are provided below for all mazes considered. These results include the traditional genetic algorithm final result and the genetic algorithm optimization approach with embedded rules result. Both results were incorporated for comparison purposes. Overall, the incorporation of domain specific knowledge outperformed the traditional genetic algorithm in both performance and computation time. Specifically, the traditional genetic algorithm failed to adequately find an acceptable solution for each example presented and prematurely converged on average within 54% of their specified generations. Additionally, the most complex maze generated an optimal path directional sequence (i.e. N, S, E, W) via a traditional genetic algorithm which


Introduction
Decision support has developed into a broad spectrum of applications encompassing optimization through a variety of methods including genetic algorithms [1]. The traditional genetic algorithm is an evolutionary approach where problem characteristics are encoded to initially form random chromosome strings where strings are paired and the exchange of essential data is passed to create offspring. This offspring is evaluated against an objective function and potential optimization constraints which determine the success of the derived offspring.
Additional key factors in the genetic algorithm evolutionary process include penalty factors which minimize the occurrence of poor offspring and mutation which randomly alters the encoded string to produce designs potentially unattainable within a small population size. Extensive background and theory regarding the fundamental methodology of the genetic algorithm can be found in [2] and [3].
The aim of this research is to illustrate the use of domain specific knowledge to enhance the genetic algorithm search through the minimization of computation time for solution convergence. Domain specific knowledge has been introduced into the genetic algorithm in the form of a two-phase rule approach to enhance both topological and structural optimization problems as demonstrated by Webb, et al. [4] and [5].
This study determines the appropriate path sequence to effectively negotiate a series of mazes within this prescribed research. Similarly to this optimization initiative, the use of domain specific knowledge was demonstrated by Alobaidi, et al. [6] to determine the optimal travel path sequences for the Traveling Salesman problem through the use of a rule based genetic optimization algorithm. Overall, the incorporation of a rule based enhancement to the genetic algorithm can be introduced within a variety of methods which includes a phased based rule encoding scheme as proposed by Sandgren et al. [7]. Phase one mimics the formulation of a traditional genetic algorithm string; however the second phase utilizes rule based chromosome strings to determine what domain specific knowledge or rule executes to ultimately improve the outcome of phase one. This research exposes embedded rules within the traditional genetic algorithm to further illustrate an alternative means for utilizing domain specific knowledge while enhancing the traditional genetic algorithm process.

Traditional Genetic Optimization Approach
Traditional genetic optimization or scenario one began with a series of encoded can either represent the values of "0" or "1" to appropriately define each cell. A value of "0" for the first character within the first row indicates that there is a north wall within the first cell of the grid. Conversely, a value of "1" for the first character within the first row indicates an absence of a north wall within the first cell of the lattice. Each cell is labeled throughout the maze where the first block or entrance of the maze is designated by (1, 1), meaning row one, column one, and is located at the lower left corner as illustrated by the example in Figure 1.
The exit or last cell for the maze illustrated in Figure 1 Table 1 provides the possible values for which a character within the travel sequence string could potentially represent. Additionally, Table 2 illustrates the genetic algorithm parameters where, npath = total number of paths each cell move possesses that culminates the defined path.

Genetic Optimization via Embedded Rules
Domain specific knowledge in the form of rules were embedded within scenario one. These rules are governed by each travel sequence and the travel sequence is controlled by the genetic algorithm.
The cells which compose of the maze are initially predefined by how many exits each cell possesses and if the cell possesses only one exit, information is provided to which direction the available exit is located (i.e. N, E, S or W). When a cell is located within the travel sequence and only one exit is available, the genetic code is provided with what direction out the cell possesses. With this information, a wall is created to block off the cell, creating a block, so that no future travel sequences may enter. All cells are updated with the creation of this new wall and the process continues whenever a travel sequence encounters a one exit cell. This prescribed embedded rule is attributed by prior knowledge acquired from Williams [8]. Additionally, when the objective function evaluates each move within a specific travel sequence, redundant moves are removed such as N-S and E-W, so that every move accepted creates an actual distance.

Results
Three mazes were investigated and solved by the use of both a traditional genetic algorithm and a genetic algorithm with embedded rules. Each maze scenario presented was programmed in Visual Basic [9]. Genetic algorithm parameters utilized in the formulation of the provided results are illustrated in Table 3

Example One: 10 × 10 Cell Maze
Below illustrated in Figure 2 is the initial 10 × 10 cell maze before the commencement of genetic optimization. Notice that the complexity of the maze is fairly straightforward, but results below confirm that a conventional genetic algorithm was unable to locate an acceptable solution.

Traditional Genetic Algorithm Result (Scenario One)
The traditional genetic algorithm result is shown below in Figure 3. Upon the   completion of fifty two generations and an initial population size of one hundred, the genetic algorithm was unable to locate an acceptable solution. Population and generation sizes must be largely increased to potentially locate the maze solution. The objective function versus generation graph provided in Figure 4 revealed an overall steady increase in objective function until generation forty five and remained constant throughout the remainder of the fifty two specified generations. An increase in these genetic input parameters would significantly hinder computation time, and would further reinforce the necessity to refine the genetic algorithm procedure. Theoretically, once a considerable number of generations of offspring have been produced an acceptable solution would be achieved. However, genetic input parameters were increased on several occasions, but an acceptable solution was still not acquired.

Genetic Algorithm with Embedded Rules Result (Scenario Two)
Below illustrated in Figure 5 is   knowledge. Genetic input parameters were identical to the traditional genetic optimization result illustrated in Figure 3. An examination of Figure 5 revealed that not all travel paths were blocked, which clearly indicated for even the least complex of mazes that the embedded rules are travel sequence dependent, where each travel sequence is controlled by the genetic algorithm. Furthermore, the objective function versus generation graph illustrated in Figure 6 revealed that a solution was found upon the conclusion of the second generation of offspring produced. In comparison to Figure 4, the traditional genetic optimization approach spawned fifty two generations of offspring, yet was incapable of generating an acceptable solution. Clearly this approach is the optimal method for solving this class of problems. Figure 7 represents the 20 × 20 cell maze before genetic optimization has commenced. In comparison to the previously illustrated 10 × 10 maze, the complexity has significantly increased, which requires larger genetic input parameters for

Traditional Genetic Algorithm Result (Scenario One)
Illustrated within Figure 8 is the traditional genetic algorithm result. Genetic input parameters consisted of a population size of two hundred with one hundred-two generations. Notice that an acceptable solution was unable to be located upon the conclusion of one hundred-two generations. Population and generation genetic input parameters were manipulated on several instances but, an acceptable solution remained unachievable.
An examination of Figure 9 revealed a steady increase in objective function over a period of eighty generations, however inactivity was apparent throughout the remaining twenty two generations.

Genetic Algorithm with Embedded Rules Result (Scenario Two)
The illustration within Figure

Example Three: 50 × 50 Cell Maze
The final maze investigated consisted of a 50 × 50 cell maze [10]. This maze incorporated the highest level of complexity among the mazes previously examined. Twenty five hundred cell blocks were manipulated in the formation of the maze illustrated below in Figure 12. The ability to utilize domain specific knowledge within a genetic algorithm to enhance solution time and the quality of offspring generated, while demonstrating that an acceptable solution can be located at this level of complexity, settles any disputes with regard to the need for rules within a genetic algorithm.

Traditional Genetic Algorithm Result (Scenario One)
The traditional genetic algorithm approach was unable to locate an acceptable solution shown in Figure 13 however unlike the 20 × 20 cell maze traditional Figure 11. Objective function versus generation.   genetic algorithm result; the genetic algorithm was able to locate a portion of the optimal path. Genetic input parameters consisted of a population size of five hundred and a generation size of two hundred fifty-two. Since an acceptable portion of the path was located, an increase in genetic input parameters would potentially improve the probability of locating a more acceptable solution in comparison to the previous 20 × 20 and 10 × 10 maze results. Surprisingly, the conventional genetic algorithm procedure failed to locate the complete travel path for each maze considered.

Objective Function Versus Generation Scenario Two -20x20 Maze
An examination of Figure 14 shows a steady but minimal increase in objective function over a period of one hundred eighty-seven generations, yet remained inactive throughout the remaining sixty five generations.

Genetic Algorithm with Embedded Rules Result (Scenario Two)
The genetic algorithm which incorporated embedded rules was utilized to solve the 50 × 50 cell maze. Genetic input parameters remained identical to its counterpart. This optimization approach effectively solved the maze illustrated in

Concluding Remarks
The   to locate an acceptable solution which effectively solved each maze.