This action might not be possible to undo. Are you sure you want to continue?
ASSIGNMENT II: SHORTEST TRACK ROUTE PROBLEM USING GENETIC ALGORITHM
score = 3 Next.Genetic Algorithm Solution The following are the steps in solving the genetic algorithm for the Vector game: Step 1.e. You have several options. such as (g) and (c).) Assume that you have selected these four: (a) (b) (c) (d) 110100. selected at random. The result is (f). Call (c) and (d) parents. score = 3 Because none of the strings is entirely correct. (Select four arbitrarily. Now copy the original (c) and (d). Step 4. continue. Select (g) and (f). one digit correctly guessed) 111101. Now duplicate and crossover. Now you have two new offspring. score = 1 (i. Here are the results: (f) 1: 01011 (g) 0: 11000 . you may find that five or six may be better. Step 5. score = 4 101100. Delete (a) and (b) because of their low scores. the second offspring: (f) 101011. “Mate” the parents by splitting each number as shown here between the second and third digits (the position of the split is randomly selected): (c) 01: 1011 (d) 10:1100 Now combine the first two digits of (c) with the last four of (d) (this is called crossover). Step 3.. (g) and (h): (c) 0110:11 (d) 1011:00 (g) 0110:00. but use a different split. score = 3 Similarly. Step 2. score = 1 011011. combine the first two digits of (d) with the last four of (c). The result is (e). the first offspring: (e) 011100. repeat step 2: Select the best “couple” from all the previous solutions to reproduce. Present to your opponent four strings. score = 4 It looks as though the offspring are not doing much better than the parents. Through experimentation. score = 4 (h) 1011:11. Mate and crossover the new parents.
and duplicate the crossover: (j) 00101:1 (k) 10100:0 (m) 001010. score = 3 (j) 001011. score = 4 (l) 011011. score = 5 You can also generate more offspring: (f) 101:011 (g) 011:000 (k) 101000.(i) 111000. score = 4 Now repeat the processes with (j) and (k) as parents. score = 6 This is it! You have reached the solution after 13 guesses. Not bad compared to the average of 32 for a random guess out of 64 responsibilities. .