### Making the probability of a fitter number getting picked higher. So I have to make a mating pool and with it a sort of raffle for the fittest strings. The problem I'm facing is that I am stuck how to go about making a raffle and choosing the fittest of the strings. The ultimate goal of the function is to build an array with the indices of the strings that are the best match based on the fitness score. The fitness score is inside of the populationFitness array.Each fitness score is multiplied by a mating factor and that gives it a certain amount of tickets. Then based on how many tickets each index has, the "fitter" ticket indexes get put into the mating pool array.I just don't know how to go about programming a raffle. Any help would be much appreciated.

 ``12345678910111213141516171819202122`` ``````void buildMatingPool(int matingFactor, double populationFitness[],int matingPool[]){ int i; int j = -1; int num1 = 0; double tickets; double ticketI = {}; int population = {}; for(i = 0; i < 200; i++){ population[i] = i; } for (i = 0; i < 200; i++){ tickets = 0; tickets = populationFitness[i] * matingFactor; ticketI[i] = tickets; if(ticketI[i] > 0){ matingPool[j] = population[i]; j = j + 1; } cout << ticketI[i] << endl; } }``````