0

I am going through a past exam paper for one of my exams coming up. Here's the following question:

Assume that you have a population of 6. The fitness of the first solution, f(S1)=2; the second solution f(S2)=4; f(S3)=8; f(S4)=16; f(S5)=19; f(S6)=27. Assume you use tournament selection with replacement with a tournament size of 6. Ignoring crossover and mutation, write down a possible population during the next generation.

Does anyone know where I start to answer this question? I'm quite confused and need some direction.

I have this so far:

          1)   2
          2)   4
          3)   8
          4)   16
          5)   19
          6)   27

Am I going along the right lines?

Many thanks

7389573987
  • 15
  • 3
  • 1
    Hello and welcome to Stack Overflow! Please take the [tour] if you haven't already and take a look at [ask] and [How do I ask and answer homework questions?](https://meta.stackoverflow.com/questions/334822/how-do-i-ask-and-answer-homework-questions). Anyway, it's not really clear from your question what you're confused about. Is there any terminology you don't understand? And what is your reasoning behind what you've tried already? I understand your question is already answered by Rahul, but you can use this feedback for when you come back with more questions. ;) – PJvG May 04 '17 at 13:00

2 Answers2

0

According to my understanding of your problem, if the population size is 6 and you're implementing a tournament selection algorithm of size 6 with replacement, it's actually somewhat trivial. Because the tournament size is equal to the population size, the entire population will take part in each tournament. This means if your selection method selects the individual with the highest fitness from each tournament population, the same individual will be picked over and over. Plainly speaking, s6, the solution with the highest fitness, will be picked the first round and then replaced, which means he'll go on to be picked again the second round and so on. So there is only one possible population for the next generation, assuming the size of the population remains constant at 6.

All members of the new population will be solution 6, the individual with the highest fitness.

  1. s6
  2. s6
  3. s6
  4. s6
  5. s6
  6. s6
Rahul Chowdhury
  • 641
  • 1
  • 7
  • 16
  • Glad to be of help, but remember this is only true if your selection method selects the highest fitness in each tournament round. – Rahul Chowdhury May 03 '17 at 06:58
  • Please take a look at [How do I ask and answer homework questions?](https://meta.stackoverflow.com/questions/334822/how-do-i-ask-and-answer-homework-questions). For these kind of questions it's often better to try to provide explanation that will lead the asker in the correct direction instead of giving the complete answer to the problem right away. – PJvG May 04 '17 at 13:04
0

I'm not sure, s6 has the biggest probability to choose, but that doesn't mean s6 will be only selected solution. Total fitness amount is 76, s6 has 27, so his probability of pick is 27/76, this is 35.5%. Fifth solution has probability 25%, fourth 21%. According me next population will be

  • s6
  • s6
  • s6
  • s5
  • s5
  • s4
viceriel
  • 835
  • 12
  • 18