Seminar arranged for Week 3

Before the seminar, you should have encoded a simple Genetic Algorithm to solve the following problem:-
You have 10 cards numbered 1 to 10.

You have to divide them into 2 piles so that:

  • The sum of the first pile is as close as possible to 36
  • And the product of all in second pile is as close as poss to 360
    Hint: call the piles 0 and 1, and use binary genotypes of length 10 to encode any possible solution.

    You will need to design an appropriate fitness function -- there are various possibilities here.

    Is there a perfect solution? How many evaluations did it take to find a solution? How can you optimise the code, and the parameters such as population size, mutation rate, so as to minimise the number of evaluations taken? How does this compare with random search? Is this a suitable problem for GAs?

    Bring to the seminar printouts of your code, and answers to these questions.

    NB due to Bank Holiday Monday, those in groups A and B should attend Tue 14:00 seminar, those in groups C and D should attend Tue 15:00 seminar.