WORCESTER POLYTECHNIC INSTITUTE CS4341 ❏ Artificial Intelligence ❏ B07
Mon, Tue, Thu, Fri - 1:00 - AK 233 Version: Tue Dec 4 20:01:13 EST 2007 PROJECT 3 - Finding the Best Search TeamDue DateThis project is due on Thursday 6th December 2007 Overview:The task is to write a simple Genetic Algorithm (GA) learning system that will work on teams of search vehicles and will improve them. That is, the best team that result from GA processing should produce better results than any of the the original teams. This requires some procedure for evaluating the quality (performance/effectiveness) of each team. This evaluation procedure is used to help guide the learning, causing teams which produce better results to be favored. Inspiration:
The Project:The goal of this project is to use a genetic algorithm to produce a high performance team of search vehicles. The search is carried out on a landscape of the type that you have already used. A particular landscape will be provided. A team is searching for two lost children who have become separated from their parents and from each other. A team is a set of different types of vehicles. Different types of vehicles have different abilities. By varying the mix of types in the team the effectiveness of the team's overall searching ability is altered. Teams can have between one and three types of vehicles, and may have between zero and two of each type. A GA works on a population of candidate solutions (See the Winston text, Chapter 25). Each member of the population is a team. In each step of the GA activity new teams will be generated from the existing ones by crossover and mutation. Based on evaluations of quality, a fixed number of teams will be selected for survival through to the next generation. The process repeats itself from one generation to another until one or more teams with high performance are generated. The specifications of the vehicles available to be team members are as follows:
Distance, See and Hear are attributes of each type of vehicle. The Distance value is how far a vehicle type can travel (in cells) in a unit time period. The See value is how far a vehicle type can see around them. The Hear value is how far a vehicle type can hear around them. These values are used during team evaluation. Each team is described by: ((Sprinter count-1) (Walker count-2) (Crawler count-3) (Sitter count-4))Count-1 to count-4 can each be one of {0, 1, 2}. They represent how many of that type of vehicle are in the team. Note that there can not be more than three types on a team, so one of the four counts must be zero for each team. So, for example, a sample team might be: ((Sprinter 2) (Walker 0) (Crawler 1) (Sitter 0))representing a team consisting of two Sprinter vehicles and one Crawler vehicle. You do not need to use this data structure exactly. For example, (2 0 1 0) would be just fine. Your program must use the GA principles described in Chapter 25 of Winston's AI textbook. The genetic algorithm performs two types of transformations on teams -- mutation and crossover.
Follow the general process shown in the text on page 524. The program should start with one team. That team (the initial population) is acted on by mutation (and crossover which does nothing) to form a second population. In each additional step you are supposed to generate, by using mutation and also crossover on the current generation, all possible new teams. Discard any duplicate teams that were already generated by this transformation process. Note that you apply a mutation transformation to each member of the current population, to produce new teams. You also do crossovers between all possible pairs of the current teams, to produce new teams. The initial team in your population is: ((Sprinter 0) (Walker 0) (Crawler 0) (Sitter 1)) Evaluation of the quality of a team would normally be done by extensive simulation or by real trials in an actual landscape. In this project we "cheat" (to drastically reduce run time) and "fake" a simulation by evaluating the ability to find the children by taking five pseudo-random placements of the vehicles in a team. The 10x10 landscape with the starting position (S), the positions of the children (c1 and c2), and the obstacles (black), are as follows:
Every team is assumed to start in the "lower left corner" of the landscape. The children are too frightened to move and will stay in their positions. Vehicles can move in all 8 directions. Teams know roughly where the children are (i.e., the top right quadrant) but not exactly. Consequently, you should bias the "pseudo-random" placement (used below) in some way to make it more realistic. Remember to describe the biasing method in your documentation. Seeing & Hearing: Note that seeing is blocked by obstacles, while hearing is not. Vehicles and children are also considered to be obstacles. In order to avoid "line of sight" geometric calculations use the following approximation:
where (xd, yd) is the destination (a child), and (xc, yc) is the "current" location of the path of viewing or hearing (starting at the location of the vehicle in question). The intent is to "grow" the viewing/hearing path from the vehicle towards the child. The "approx equal" relation tests for equality plus or minus one. The general assumption is that all moves will be heading from the bottom left towards the top right. In any specific situation only one diagonal move is relevant. To determine the quality of a team, you must:
Only four teams survive into the next generation. In order to select these four you need to use the rank-space method (p. 520) based on quality rank and diversity rank.
Select the highest quality team to be the first to include in your next generation population. Compute the diversity rank of each team relative to the one selected. Select the next by combined rank. To select the third and fourth teams compute the diversity rank relatively to the teams which already have been selected. You should break rank-sum ties by choosing the team with better diversity. In each case calculate the fitness and store it with the teams in the new population. The fitness (probability) usually influences which teams take part in crossovers. But, for this problem, you can try all of them, given that there are only four members in the population. As in the book, use p=0.66. The next fitness value will be 0.66 of the .33 that remains, and so on, for all four selections. The algorithm should be made to stop after producing a good team. You need to decide how that is to be determined. In case no such team is produced, the algorithm should stop after a specified number of generations. You can determine that value by experimentation. Your program must produce an output file containing, in a condensed form, a record of the the teams selected in each generation with their corresponding quality measure, and quality and diversity ranks. A condensed team representation could be something like:
Submit
You must submit:
How to submit:
Please let us know if you have problems. |