A phenotype is the expressed solution or observable outcome produced by an organism in an evolutionary model. Its genotype is the chromosome that encodes or represents that outcome. In a binary genetic algorithm, the phenotype can be read directly from the chromosome: each bit determines whether a corresponding choice is present. section 18.1.2
Knapsack encoding
For a 0–1 knapsack problem, each chromosome position represents an item. A 0 leaves the item behind, while a 1 places it in the Mars-bound crate. The selected goods form the phenotype. With this one-to-one mapping, identical genotypes produce identical phenotypes and therefore the same fitness value. section 18.1.2
Figure 18.4 Examples of encoding chromosomes for the knapsack problem (the specific instance described in section 1.4). Two figures are shown: the differences in the genotypes (the two strings) are reflected in the phenotypes (the goods taken to Mars: wheat flour and tomatoes versus wheat flour, rice, and beans). The latter chromosome encodes the best solution for the instance of the problem summed up in table 18.1.
Compare two bit-string chromosomes with their expressed knapsack solutions; the figure makes genotype-to-phenotype differences visible. section 18.1.2
The mapping need not be one-to-one. In biological systems, a genome encodes developmental rules rather than a precise result, and the environment also shapes the organism. Simulated problems can work similarly: evolving a robot's neural network may produce behavior whose fitness depends on running the robot in an environment. section 18.1.2
Use the phenotype to connect representation, evaluation, and evolutionary change:
- Inspect features such as color, beak shape, wings, or tail as expressed characteristics determined by genotype differences. section 18.1.5
- Evaluate fitness from the expressed result, either with a direct function or through a potentially lengthy simulation. section 18.1.5
- Let selection favor organisms whose phenotypes achieve higher fitness, then recombine and mutate their chromosomes to produce later outcomes. section 18.1.5
