## Genetic Algorithms

You are to write a genetic algorithm program to find solutions to the following problems:

1. Find the maximum value of the sum of the squares of three real numbers x1, x2, and x3, where each is in the interval
-5.12 <= xi <= +5.12.

2. Find the maximum value of a function of two variables:
F(x1,x2) = 100(x1^2 - x2)^2 + (1 - x1)^2
where x1 and x2 are in the interval -2.048 <= xi <= +2.048.

3. Find the maximum value of a function of two variables:
F(x1,x2) = 0.002 + SUM j = 1,25 [1 / (j + (x1 - 1)^6 + (x2 - 1)^6)] where x1 and x2 are in the interval -65.536 <= xi <= +65.536.
(This problem is for extra credit; it is not required.)

Each of the encodings can use a simple, signed integer binary representation for the values. For example, the encoding for the first function could be three 10-bit numbers (nine bits to represent values between 0 and 512 plus one bit for the sign) concatenated together to form a 30-bit string. The second function could be two 12-bit numbers (11 bits for the value and one for the sign) concatenated together.

You do not need to implement mutation.

### What to Turn In

Your program should output the relevant statistics for each generation. Some interesting statistics include the minimum, maximum, average, and standard deviation for the population.

In addition to the source code for your program, and the output from your executions, you should also turn in a write-up describing your experiments. What population size did you choose? How well does the genetic algorithm perform? How many generations does it take to find a good solution? How does the performance of the program change with population size?

### Due Date

This assignment is due Tues, April 28.

Unlike the previous assignment, this is not a group project. Each of you should work independently.