Selection - artificial intelligence:
However the first step is to choose the individuals that will have a shot at becoming the parents of the next generation. Hence this is known like the selection procedure plus its purpose it to choose those individuals from the current population that will go with an intermediate population as IP. Thus only individuals in this intermediate population will be chosen to mate by each other but there's still no guarantee that they'll be chosen to mate otherwise that whether they do mate then they will be successful - see later this.
Therefore to perform the selection, the GA agent will utilize a fitness function. However this will assign a real number to each individual in the current generation. Hence from this value, the GA calculates the number of copies of the individual that are guaranteed to go into the intermediate population and a probability that will be used to determine where an additional copy goes into the IP. Further to be more justification, whether the value calculated through the fitness function is an integer part followed through a fractional part, so then the integer part dictates the number of copies of the individual that are guaranteed to go into the IP plus the fractional part is utilized as a probability: another copy of the individual is added to the IP with this probability, like e.g., whether it was 1/6, then a random number between 1 and 6 would be generated and only whether it was a six would another copy be added.