In biology, a phenotype is some observable property of an individual that is encoded by its genes (often in combination with its environment). In artificial life, phenotype means roughly the same thing, but this word is sometimes used in ways that feel inconsistent to newcomers.
To help clarify, here is a lightly-edited version of a stackoverflow answer that Emily Dolson wrote on this topic:
People who study artificial life and evolutionary computation sometimes use the words “genotype” and “phenotype” inconsistently. The only rule that holds true across all systems is that the genotype is a lower-level (i.e. less abstracted) encoding than the phenotype. A consequence of this rule is that there can generally be multiple genotypes that map to the same phenotype, but not the other way around (at least in the context of a static environment and deterministic organisms). In some systems, there are really only two levels of abstraction: the representation of a solution and the solution itself. In these cases, the former is the genotype and the latter is the phenotype.
This holds true for:
- Simple genetic algorithms where the solution is encoded as a bitstring.
- Simple evolutionary strategies problems, where a real-value vector is evolved and the numbers are plugged directly into a function which is being optimized
- A variety of other systems where there is a direct mapping between solution encodings and solutions.
But as we get to more complex algorithms, this rule starts to break down. Consider a simple genetic program, in which we are evolving a mathematical expression tree. The number that the tree evaluates to depends on the input that it receives. So, while the genotype is clear (it’s the series of nodes in the tree), the phenotype can only be defined with respect to specific inputs. That isn’t really a big problem – we just select a set of inputs and define phenotype based on the set of corresponding outputs. These different input sets are analogous to different abiotic environments in biology. But the distinction between genotype and phenotype gets even messier.
As we continue to look at more complex algorithms, we reach cases where there are no longer just two levels of abstraction. Evolutionary algorithms are often used to evolve simple “brains” for autonomous agents. For instance, say we are evolving a neural network with NEAT. NEAT very clearly defines what the genotype is: a series of rules for constructing the neural network. And this makes sense – that it the lowest-level encoding of an individual in this system. The original paper on NEAT goes on to define the phenotype as the neural network encoded by the genotype. Fair enough – that is indeed a more abstract representation. However, there are others who study evolved brain models that classify the neural network as the genotype and the behavior as the phenotype. That is also completely reasonable.
Finally, we arrive at the systems with the least definable genotypes and phenotypes: open-ended artificial life systems. The goal of these systems is basically to create a rich world that will foster interesting evolutionary dynamics. Usually the genotype in these systems is fairly easy to define – it’s the lowest level at which members of the population are defined. Perhaps it’s a ring of assembly code, as in Avida, or a neural network, or some set of rules as in geb. Intuitively, the phenotype should capture something about what a member of the population does over its lifetime. But each member of the population does a lot of different things. So ultimately, in these systems, phenotypes tend to be defined differently based on what is being studied in a given experiment. While this may seem questionable at first, it is essentially how phenotypes are discussed in evolutionary biology as well. At some point, a system is complex enough that you just need to focus on the part you care about.