Fig 1.
Three versions of the “infinite monkey theorem” compared.
In the 1st version, or the classic case, all outputs of length n are equally likely, and thus the probability of obtaining a specific output scales as 1/Mn, where M is the number of keys, and n is the length of the desired output. In the 2nd version, introduced by Dawkins’s [1], a fitness function fixes each correct partial output, so that a desired n-length string is likely to be found in a timescale that scales as n × M, which is linear instead of exponential in n. In the 3rd algorithmic version, the probability of obtaining an output scales as 1/MK, where K is the length of a program that generates it [3]. Outputs for which short programs exist therefore appear with exponentially higher probability. The length of the shortest program with which a given output can be produced is related to the famous Kolmogorov complexity measure [4] so that the algorithmic monkey theorem also implies a bias towards simplicity.
Fig 2.
(A) Following [1, 29] each genotype, a set of nine integers, is used to produce the corresponding biomorph phenotype, a 2D shape using the two procedures DefineVectors and DrawBiomorph summarised in algorithm 1. (B) DefineVectors procedure: the integers at the first eight positions of the genotype (labeled g1 to g8) are used to define eight two-dimensional vectors, to
. (C) DrawBiomorph procedure: The 2D biomorph shape is created from these vectors recursively, with the number of recursions set by the integer at the ninth position of the genotype, g9. Here, we have g9 = 4 and thus four recursions, governed by the variable c. Since vector
would first be used in the fifth recursion, it is not used at all in this case.
Fig 3.
Coarse-graining biomorph figures for the computational analysis.
In order to discretize the phenotypes for our computational GP map analysis, we coarse-grain the final image on a 30 × 30 grid, as illustrated for the phenotype from Fig 2.
Fig 4.
(A) Example biomorph phenotypes: the neutral set sizes (i.e. number of genotypes per phenotype) are indicated above each image. The phenotypes shown in the first three rows are chosen to represent a range of neutral set sizes, and the last row shows three phenotypes with a neutral set size of two since ≈ 9 × 106 out of ≈ 107 phenotypes have this neutral set size. (B) The neutral set sizes of all phenotypes are plotted against their neutral set size ranks (i.e. the number of phenotypes with greater or equal neutral set size). The computational results are shown in blue and the analytic data of Eq 3 in red. In both treatments, neutral set sizes vary over several orders of magnitude, i.e. there is strong phenotype bias. (C) The neutral set size of each phenotype is plotted against the estimated complexity of the corresponding coarse-grained binary image (calculated using the block decomposition method [30]). The black solid line is an approximate, but not a perfect upper bound, drawn to illustrate the simplicity-bias prediction from Eq 1. Large neutral set size phenotypes tend to be low-complexity biomorphs and high-complexity biomorphs tend to have small neutral sets (deviations from the upper bound can also be understood within AIT [6]). Inset: Neutral set size versus complexity for the analytic model, calculated with the bound of Eq 4 which is based on an alternate complexity measure that measures the size of the constrained part of the minimal genome that generates a given biomorph. The resulting relationship is consistent with the trend in the computational results. (D) & (E) In order to test whether the results are merely a consequence of the fact that the ninth gene g9 can switch genes on or off by raising or lowering the number of stages in the growth process, we repeat the analysis with the computational method for a fixed value of g9 = 8. We find that phenotypic bias towards simple phenotypes also holds in this case.
Table 1.
Definitions of key quantities for GP maps.
Each line describes one quantity with a symbol and the definition. These definitions are commonly used in the literature [7, 14, 31, 32, 40, 41]. For clarity, we use tildes to distinguish genotypic quantities from corresponding phenotypic definitions.
Fig 5.
Structure in the GP map—The phenotypic effect of mutations.
In every panel, the computational results are shown in blue and the analytic relationships from the constrained-unconstrained model are shown as red lines, with markers indicating the discrete allowed values. (A) Point mutations of a genotype with initial phenotype q can either leave q intact or lead to a phenotypic change to a new phenotype p. The likelihood of the first outcome is given (on average) by the phenotype robustness of q, ρq; the likelihood of the latter outcome is given by the mutation probability from q to p, denoted as ϕpq (see Table 1). (B) Phenotype robustness ρp vs. phenotype frequency fp: the computational results (blue) are compared to the analytic calculation of Eq 5 (red). The black line (ρp = fp) shows the prediction from the uncorrelated null model from ref [40]. The robustness is much higher than this random null model, i.e. there are genetic correlations. (C) Genotype evolvability vs genotype robustness
for both the computational (blue) and analytic (red, Eq 6) approach: we find the expected trade-off between robustness and evolvability at the genotype level. (D) Phenotype evolvability ϵp vs phenotype robustness ρp for both the computational (blue) and analytic (red, Eq 7) approach. As observed more widely [32], robust phenotypes have large neutral sets and are connected with many other neutral networks, so there is a positive correlation. (E) Mutation probability ϕpq vs. phenotype frequency fp for a fixed initial phenotype q (shown in the corner). Again, the computational data is shown in blue, the analytic data in red (given by a parametric equation from section A.7 in S1 Text), and the black line shows the null model from ref [40], which gives ϕpq = fp, Data points with ϕpq = 0 are excluded due to the logarithmic scale, even though 99.997% of all biomorph phenotypes have ϕpq = 0 for this particular initial phenotype q.
Fig 6.
Evolution in a flat fitness landscape.
We simulate a scenario where all biomorph phenotypes are equally fit so that there is no selection, just neutral drift. (A) This plot of phenotypic frequency versus rank highlights three phenotypes that are chosen for more detailed analysis: one with high frequency in genotype space (yellow), one with medium frequency (teal), and one with low frequency (purple). (B) The normalized number of times each phenotype occurs in the population is plotted against its phenotypic frequency (for all phenotypes; the chosen phenotypes are highlighted in color). As might be expected in the absence of selection, we see an approximate one-to-one correspondence (as indicated by the black line), with some fluctuations at low values of fp. Due to the logarithmic scale, only non-zero values are shown. (C) We plot the occurrence in the population of each of the three phenotypes highlighted in (A) once every 1000 generations. This representation highlights the relative frequencies with which the different phenotypes appear in an evolving population of 2000 individuals. The most frequent phenotype (yellow) appears in the population with an average of about 7 individuals per generation. The intermediate frequency phenotype (teal) appears in the population on average only once every 28 generations, so about 200 times less frequently than the yellow phenotype. The rarest phenotype (purple) only appears twice in all 105 generations. To take this into account, we plot both times it appears, even when this is not a generation that is plotted for the other phenotypes (where we only show one every 1000 generations due to space constraints). Parameters: Population size N = 2000 individuals, with a mutation rate of μ = 0.1 per site, evolving for 105 generations, initialized on a random initial genotype—we run the simulation for 10N = 20000 generations before starting the analysis to minimize artifacts of the initial conditions.
Fig 7.
Schematic of the two-peaked fitness landscape (following a similar example for RNA [14]).
(A) Only three phenotypes have nonzero fitness—the initial phenotype p0 (grey) and the two adaptive phenotypes, p1 (blue) and p2 (red). Phenotype p1 is more frequent and has a higher mutation probability from p0 than p2 does, but p2 has higher fitness. A single point mutation can convert p0 into p1 or p2, but not p1 into p2. (B) The same scenario is sketched as a schematic ‘fitness landscape’—the population starts with the p0 phenotype (grey area) and there are two fitness peaks, corresponding to p1 (blue) and p2 (red). While p1 is a broader fitness peak and thus a larger mutational target, p2 is a higher fitness peak. (C) A schematic representation of the relevant part of the GP map: each genotype is drawn as a node in the color of the corresponding phenotype and two genotypes are connected by an edge if one can be reached from the other through a single point mutation. This representation illustrates that there are many different genotypes for each phenotype and that the population will therefore evolve neutrally on the neutral component of p0, until moving to either p1 or p2. Genotypes are only included in this network if they belong to the initial neutral component of p0, or if they are direct mutational neighbors of that neutral component and map to p1 or p2. The initial neutral component can be found by starting from the genotype (-2, 0, 2, -2, 0, 0, -2, -2, 3).
Fig 8.
Probability of discovery and fixation of the fitter and less frequent phenotype p2.
(A) Probability that the rarer phenotype p2 appears in the population before the first fixation event. As long as the more frequent phenotype p1 has a sufficiently high selective advantage s1 over the initial phenotype, it is likely to appear and fix quickly so that it becomes unlikely that the rarer phenotype p2 appears even once before p1 fixes. (B) The probability that the rarer phenotype p2 is the first to fix. p2 can only fix once it appears and so its fixation probability is even lower than the probabilities in (A). These results for the phenotypic bias are consistent with the trends expected from mutational bias [15]. Parameters: population size N = 500, mutation rate μ = 0.0001, 103 repetitions per parameter set; we consider a phenotype to have fixed if > 70% of the individuals carry that phenotype. The populations start from randomly chosen initial genotypes g0 that all belong to the NC shown in Fig 7 and then evolve neutrally for 10N generations before the three-peak simulations begin.
Fig 9.
Reconstructing Dawkins’s search for a rare beetle-shaped phenotype.
A) An evolutionary path from a dot to the final beetle-shaped biomorph that uses the smallest number of mutations from a given initial genotype that maps to a dot phenotype to the final beetle-shape phenotype. B) An evolutionary path from a dot to the final beetle shape with the smallest number of phenotypic changes (but several neutral mutations may be required between each of the phenotypic changes sketched in the figure). The neutral set sizes of the phenotypes along this path are shown on the right. A key advantage of this second scenario is that it increases the probability of a path without any fitness valleys for all intermediate steps (as recently demonstrated for molecular GP maps in Greenbury et al. [49]).