A **fitness function** is a particular type of objective function that is used to summarise, as a single figure of merit, how close a given design solution is to achieving the set aims.

In particular, in the fields of genetic programming and genetic algorithms, each design solution is represented as a string of numbers (referred to as a chromosome). After each round of testing, or simulation, the idea is to delete the 'n' worst design solutions, and to breed 'n' new ones from the best design solutions. Each design solution, therefore, needs to be awarded a figure of merit, to indicate how close it came to meeting the overall specification, and this is generated by applying the fitness function to the test, or simulation, results obtained from that solution.

The reason that genetic algorithms are not a lazy way of performing design work is precisely because of the effort involved in designing a workable fitness function. Even though it is no longer the human designer, but the computer, that comes up with the final design, it is the human designer who has to design the fitness function. If this is designed wrongly, the algorithm will either converge on an inappropriate solution, or will have difficulty converging at all.

Moreover, the fitness function must not only correlate closely with the designer's goal, it must also be computed quickly. Speed of execution is very important, as a typical genetic algorithm must be iterated many times in order to produce a usable result for a non-trivial problem.

Fitness approximation may be appropriate, especially in the following cases:

- Fitness computation time of a single solution is extremely high
- Precise model for fitness computation is missing
- The fitness function is uncertain or noisy.

Two main classes of fitness functions exist: one where the fitness function does not change, as in optimizing a fixed function or testing with a fixed set of test cases; and one where the fitness function is mutable, as in niche differentiation or co-evolving the set of test cases.

Another way of looking at fitness functions is in terms of a fitness landscape, which shows the fitness for each possible chromosome.

Definition of the fitness function is not straightforward in many cases and often is performed iteratively if the fittest solutions produced by GA are not what is desired. In some cases, it is very hard or impossible to come up even with a guess of what fitness function definition might be. Interactive genetic algorithms address this difficulty by outsourcing evaluation to external agents (normally humans).

### Other articles related to "function, fitness, fitness function":

... A target

**function**can be formed to evaluate the

**fitness**or error of a particular weight vector as follows First, the weights in the network are set according to the weight vector ... techniques may then be used to minimize this target

**function**... The

**fitness function**is evaluated as follows 1) each weight encoded in the chromosome is assigned to the respective weight link of the network 2) the training set of ...

... In each generation, the

**fitness**of every individual in the population is evaluated, multiple individuals are stochastically selected from the current population (based on their

**fitness**), and modified (recombined ... of generations has been produced, or a satisfactory

**fitness**level has been reached for the population ... algorithm requires a genetic representation of the solution domain, a

**fitness function**to evaluate the solution domain ...

... Apart from the field of evolutionary biology, the concept of a

**fitness**landscape has also gained importance in evolutionary optimization methods such as ... This is done by introducing a scalar-valued

**function**f(s) (scalar valued means that f(s) is a simple number, such as 0.3, while s can be a more complicated object, for example a list of destination addresses ... Then, the solutions are mutated and selected for those with higher

**fitness**, until a satisfying solution has been found ...

### Famous quotes containing the words function and/or fitness:

“Philosophical questions are not by their nature insoluble. They are, indeed, radically different from scientific questions, because they concern the implications and other interrelations of ideas, not the order of physical events; their answers are interpretations instead of factual reports, and their *function* is to increase not our knowledge of nature, but our understanding of what we know.”

—Susanne K. Langer (1895–1985)

“Parentage is a very important profession; but no test of *fitness* for it is ever imposed in the interest of children.”

—George Bernard Shaw (1856–1950)