Fitness function - canonical genetic algorithm:
Conversely the fitness function will use an evaluation function to calculate a value of worth for the individual accordingly that they can be compared against each other. Frequently the evaluation function is written g(c) for a particular individual c. hence correctly specifying such evaluation functions is a risky job that we look at later. However the fitness of an individual is calculated through dividing the value it gets for g with the average value for g over the entire population as:
Here fitness(c) = g(c)/(average of g over the entire population)
Therefore we see that every individual has at least a chance of going with the intermediate population unless they score zero for the evaluation function. In fact as an example of a fitness function requiring an evaluation function, assume our GA agent has calculated the evaluation function for every member of the population plus the average is 17. After then, for a particular individual c0, the value of the evaluation function is 25. Moreover the fitness function for c0 would be calculated as 25/17 = 1.47. Because, one copy of c0 will definitely be added to the IP plus one copy will be added with a probability of 0.47 as in e.g., a 100 side dice is thrown and only if it returns 47 or less so there is another copy of c0 added to the IP.