Presentation is loading. Please wait.

Presentation is loading. Please wait.

Methods and Materials (cont.)

Similar presentations


Presentation on theme: "Methods and Materials (cont.)"— Presentation transcript:

1 Methods and Materials (cont.)
Determining the efficiency of a genetic algorithm over changing problem size and complexity Kacie Bawiec Mentored by Steve Mazza Introduction The purpose of this project was to evolve a control strategy for a virtual robot using a genetic algorithm. The algorithm efficiency was determined over changing problem size and complexity. A genetic algorithm is a search algorithm that transforms a set of objects via genetic operations such as natural selection and mutation. The algorithm consists of a series of steps that are repeated until a specific level of success, called the critical threshold, is met. First, the initial population of random individuals, all of which are candidate solutions, is generated. Next, each individual is tested to determine its success at solving the problem. Finally, the most successful individuals are selected to create the next generation of candidate solutions through the genetic processes of crossover and mutation (Mitchell, 2009). Methods and Materials (cont.) The two highest fitness strategies of the generation were selected as parent strategies to create the next generation through evolution. The next generation was created by crossover as seen in Figure 2, with a five percent chance of mutation at every location in the new strategy. This process was repeated to create 200 new strategies. The fitness testing and evolution process continued until the critical threshold was met. The genetic algorithm was tested over changing size and changing complexity. Size of the problem was measured by the length of the square grid. Since more complexity arises from more interactions (Miller & Page, 2007), complexity was measured by the number of robots participating. The genetic algorithm was run over a size iteration with 100 trials each, and a complexity iteration with 25 trials each. Results (cont.) Changing the complexity of the problem also decreased the efficiency, as seen in Graph 2, but at a faster rate. Parent 1: Figure 2: Genetic recombination of strategies. A random point is selected along the length of the strategy string, and the parent strings are both cut at that point and crossed over to create two child strategies, which go into the next generation. Parent 2: Child 1: Child 2: Graph 2: Graph of complexity iteration. The complexity of the problem space was altered by increasing the number of robots on the board, and this was compared to the mean number of generations required to reach completion. Methods and Materials In Complexity: A Guided Tour, Mitchell outlined a project on creating a genetic algorithm to evolve a control strategy for a virtual robot. Programming of the algorithm was developed in Java. The problem space consisted of a robot traversing a square grid, attempting to pick up all trash. The robot’s situation was the status of the five sites visible to it, as seen in Figure 1, and a strategy defined the action to be performed at every possible situation. The initial population of 200 strategies was created by a random number generator. For each generation, each strategy was tested over 100 sessions. One session consisted of twice the number of moves as there were spaces in the grid. Each move resulted in a point value, with points added for correctly picking up trash and points removed for crashing into a wall or attempting to pick up trash in an empty space. The fitness of the strategy was the average score over all sessions. Conclusions The genetic algorithm was able to solve the stochastic virtual robot problem successfully over changes in both size and complexity. This success implies that genetic algorithms are effective at consistently arriving at optimal solutions to nondeterministic problems. The shape of Graph 2 could be a result of the fact that with the grid size held constant, the density of robots on the grid caused random crashes to occur between the robots, causing increased difficulty in completing the assigned task. The limited number of trials or the fixed parameters of the algorithm such as grid size and mutation rate may also have contributed to the shape of the graph. Increasing size and complexity decreased the efficiency of the genetic algorithm. However, increasing complexity caused the efficiency to decrease at a faster rate than increasing size. Future research could focus on other parameters of the genetic algorithm, such as the size of each generation or mutation rate, which could also factor into the efficiency. Results Outliers were found and removed by calculating the interquartile range and removing all data points beyond 1.5 times the third quartile. The stochastic nature of the problem allowed for the algorithm to take many paths to reach the best solution, and outliers were removed to account for this. For the genetic algorithm, increased efficiency was defined as reaching the critical threshold in a fewer number of generations. Increasing the size of the problem generally decreased the efficiency of the algorithm, as seen in Graph 1. Graph 1: Graph of size iteration. The size of the problem space was altered by increasing the size of the n by n grid, and this was compared to the mean number of generations required to reach completion. Figure 1: Example five by five grid. Shaded area indicates cells visible to robot “R”. “A” is another robot, and “X” is trash. Cells can be empty, contain a robot, or contain trash, and the status of the five cells is a situation. The action to be performed at this situation and all other possible situations was contained within the strategy string. Possible actions were move in one of the cardinal directions, move in a random direction, or pick up trash. X A R References Miller, J., & Page, S. (2007). Complex adaptive systems: An introduction to computational models of social life. Princeton, NJ: Princeton University Press. Mitchell, M. (2009). Complexity: A guided tour. New York, NY: Oxford University Press. Print.


Download ppt "Methods and Materials (cont.)"

Similar presentations


Ads by Google