Thống nhất chéo của các loại được sử dụng ở đây có tính chất rất khác nhau hơn so với điểm giao nhau, và sử dụng của nó làm cho nó khó khăn hơn để tìm ra những gì các lược đồ được kết hợp lại. | Chapter 2 Genetic Algorithms in Problem Solving COMPUTER EXERCISES 1. Implement a genetic programming algorithm and use it to solve the 6-multiplexer problem Koza 1992 . In this problem there are six Boolean-valued terminals a0 a1 d0 dj d2 d3 and four functions AND OR NOT IF . The first three functions are the usual logical operators taking two two and one argument respectively and the IF function takes three arguments. IF X Y Z evaluates its first argument X. If X is true the second argument Y is evaluated otherwise the third argument Z is evaluated. The problem is to find a program that will return the value of the d terminal that is addressed by the two a terminals. . if a0 0 and a1 1 the address is 01 and the answer is the value of d1. Likewise if a0 1 and a1 1 the address is 11 and the answer is the value of d3. Experiment with different initial conditions crossover rates and population sizes. Start with a population size of 300. The fitness of a program should be the fraction of correct answers over all 26 possible fitness cases . values of the six terminals . 2. Perform the same experiment as in computer exercise 1 but add some distractors to the function and terminal sets extra functions and terminals not necessary for the solution. How does this affect the performance of GP on this problem 3. Perform the same experiment as in computer exercise 1 but for each fitness calculation use a random sample of 10 of the 26 possible fitness cases rather than the entire set use a new random sample for each fitness calculation . How does this affect the performance of GP on this problem 4. Implement a random search procedure to search for parse trees for the 6-multiplexer problem at each time step generate a new random parse tree with the maximum tree size fixed ahead of time and calculate its fitness. Compare the rate at which the best fitness found so far plotted every 300 time steps equivalent to one GP generation in computer exercise 1 increases with that .