Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Standard Genetic Algorithm Start with a “population” of “individuals” Rank these individuals according to their “fitness” Select pairs of individuals.

Similar presentations


Presentation on theme: "The Standard Genetic Algorithm Start with a “population” of “individuals” Rank these individuals according to their “fitness” Select pairs of individuals."— Presentation transcript:

1 The Standard Genetic Algorithm Start with a “population” of “individuals” Rank these individuals according to their “fitness” Select pairs of individuals to “reproduce” –Higher fitness  greater probability of selection Each pair of “parents” produces two “children” –Because of “crossover,” children receive “genes” from both parents Introduce random “mutations” in some of the children Repeat until a desired fitness level has been reached or some number of generations have elapsed

2 Individuals and Fitness In this system, the individuals are utility functions, and the genes are the weights assigned to the different factors. Population size is set by the user and must be a power of 2. Fitness is measured in a single-elimination tournament. –Games are played to a maximum of 40 moves. –A win in the tournament is worth 10 fitness points. –A tie is worth 5 fitness points. –The sum of all individuals’ fitnesses is normalized to 1. Parents are selected with probability equal to their fitness. –Parents are not necessarily monogamous.

3 Finding Fitnesses Individual PointsFitness A 100.1429 B 00 C 300.4286 D 00 E 00 F 200.2857 G 100.1429 H 00 Total 701

4 Crossover and Mutation Genes are listed in a fixed, arbitrary order, and crossover occurs at a single, randomly chosen point in the list. –One child receives from one parent the set of genes that occur before the crossover point. It receives from its other parent the set of genes that occur after the crossover point. –The other child receives the complementary set of genes from each parent. Each gene is subject to mutation with a small, independent probability that is set by the user. –The size of the mutation is random, but the distribution is skewed toward smaller changes. –A gene can never change by more than its current value.

5 Generating Children Advancement Back Row Bridge Center Control Diagonal Moment King Center Control Total Mobility Triangle of Oreo Threat 10 2 8 3 5 1 4 Advancement Back Row Bridge Center Control Diagonal Moment King Center Control Total Mobility Triangle of Oreo Threat 6991482569914825 ParentsChildren 10 2 8 3 5 8 2 5 6991451469914514 crossover 10 3 8 3 5 2 5 6891451468914514 mutation

6 Encoding Knowledge of Checkers Move Generator –Incorporates all of the rules of the game. –Computes the legal moves that are available in a given board state. Utility Function –Attempts to quantify the desirability of a given board state. –Consists of a simple linear combination of 16 factors taken from A. L. Samuel’s original checkers program of 1959. –Coefficients can take on any value in the range of a Java double. –Unfortunately, this function is too simple to represent the game, since it cannot even represent interactions between the factors.

7 The Computer Player Basic Strategy: Minimax Search –Searches forward in time to find the best move to make now. –Represents the game as a tree. Each level corresponds to a turn. Each node corresponds to a possible game state. Each edge represents a legal move. –Assumes that, at each turn, players will choose the move that is most beneficial. –In checkers, it is usually impossible to search to the end of the game because there are so many possible moves at each turn. In this system, the search is stopped at an arbitrary depth of 6 moves, and a utility function rates the desirability of every possible game state.

8 Minimax Search


Download ppt "The Standard Genetic Algorithm Start with a “population” of “individuals” Rank these individuals according to their “fitness” Select pairs of individuals."

Similar presentations


Ads by Google