Reputation: 15
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
Upvotes: 0
Views: 2562
Reputation: 873
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
Upvotes: 0
Reputation: 681
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.
Upvotes: 0