liveBook · Manning

Fitness

As explained in Inside AI

A fitness function is a scoring function that evaluates the quality of a candidate solution in an optimization process.

When many solutions are possible, an optimization process needs a way to judge which ones are promising. A fitness function provides that evaluation: it scores candidate solutions against the goals of the problem. In a genetic algorithm, fitness evaluation helps determine which candidates are selected to produce the next generation. section 2.5

Choosing delivery plans

Suppose a manufacturer needs to deliver products to retailers. Candidate plans vary in routes, resource allocation, and schedules. Evaluating each plan by delivery time, cost, and other relevant factors makes it possible to rank the candidates. Parts of stronger plans can then be combined through crossover—for example, a faster route from one plan with the resource allocation of another. Mutation introduces occasional random changes, and evaluation continues across generations until improvement stops or a set number of cycles is reached. section 2.5

The choice of what to measure matters: a plan can be fast without being inexpensive. The delivery example identifies criteria but does not prescribe a numerical formula or rule for balancing them. Related evaluation functions in smart-agent systems can measure progress toward a shared goal or an individual agent’s goal, and those functions may change over time. section 2.5 section 4.1

How Inside AI covers it

How deep it goes
Explains evaluation and ranking within repeated generations, but gives no numerical scoring formula or weighting rule.
Examples
Illustrates delivery plans ranked by time and cost, alongside evaluation of progress toward smart-agent goals.
What it assumes
Introduces fitness evaluation through a delivery problem without requiring a numerical scoring formula.
What you can do after
Evaluate candidate delivery plans by relevant criteria to understand which ones should be selected for crossover.
How it connects
Connects fitness evaluation to genetic algorithms, selection, crossover, mutation, and smart-agent evaluation functions.

Also explained in

Compare how 6 books explain fitness →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Inside AI. The section links point to the parts of the book it draws on.