You want to evolve a binary string of length 6 to maximize the number of 1s. Initial…
- User
You want to evolve a binary string of length 6 to maximize the number of 1s.
Initial population: P1 = 101010, P2 = 111000, P3 = 000111, P4 = 110011
a) Define a suitable fitness function and compute fitness for each individual. Perform roulette-wheel selection to choose two parents. Show cumulative probabilities. (10 marks)
b) Perform one-point crossover after position 3. Then apply bit-flip mutation with p=0.2 to each child. Show final offspring. (10 marks) (Non-anonymous question )
(20 Points)
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.