how does genetic algorithm work? population -> a number of iterations for new generations -> target population a. population -- pop_size = 50 next generation? (1) select parents, create next generation by crossover and then mutate -- select_count = 20 (2) select the strongest from the current generation, keep_count = 5 (3) random individuals, pop_size - keep_count - select_count b. fitness equation starter code: assign9.py, picture.py a. generate a population of individuals what is the population size? input parameter (line 161), initialization (line 140) what is each individual's gene? rectangle input parameter (line 161), initialization individuals (line 90), initialize genes (line 12), gene (a rectangle) (line 7), xywhrgbz meaning? b. evolving by (1) keep some strongest, (2) select to breed and (3) random breed how many to keep? how many to select? 5, line 161, 142, 81, explain the attributes of Population 'evolve_step': step 1: GIVEN: initialize a new generation, line 117 step 2: TODO: keep some strongest, how? a for loop, what range? how to pick the strongest? step 3: TODO: select to breed, how? another for loop, what range? three mini steps: i) how to select two people? -- select strategy ii) crossover to breed iii) mutate step 4: TODO: random breed, what range? for loop? step 5: GIVEN: replace the current generation with the new one step 6: GIVEN: sort by fitness? lower better or larger better? c. more details about select, crossover_with and mutate: select: input? output? input: self, which is a population of individuals output: two individuals from this population, e.g., self crossover_with: input? output? input: self, ind2, which means crossover genes between self and ind2, both of which are individuals. explain individuals in line 11 output: a new individual or a baby, which is an Individual how: initialize a new individual and then manipulate genes mutate: input: self: an individual, rate: the probability to mutate, amt: the amount to change output: a new individual d. how to determine fitness? line 44, and picture->compare the output of run_ga, after step number, the best fitness and the worst fitness will be printed out e. add simple strategy for select, crossover and mutate first, and finish evolve_step. After that, you could test more advanced strategies.