Evolutionary trajectories for single-step and multi-step adaptation. Vertical arrows show points where the average fitness in the population reaches the 0.75 threshold in a XOR environment. The 0.75 threshold guaranties that close to 99% of the population exhibits the I/O characteristics of the corresponding logical gate. (A) The evolutionary trajectory during single-step evolution in an XOR environment (averaged over 64 simulations), where it takes more than 5000 epochs to achieve the desired fitness; (B-D) If cells are first evolved in an OR and then in an XOR environment (guided, step-wise evolution), a fit phenotype emerges much faster (1,389 vs. 5,241 in the single-step evolution). Fitness discontinuity during transitions is due to the different correlations between the nutrients and the signals in the various environments. Similarity between environments (e.g. OR and XOR) result in cells that are exposed in the latter environments to already have certain non-zero fitness.