  One of the most intriguing questions in evolution is how organisms exhibit
suitable phenotypic variation to rapidly adapt in novel selective environments
which is crucial for evolvability. Recent work showed that when selective
environments vary in a systematic manner, it is possible that development can
constrain the phenotypic space in regions that are evolutionarily more
advantageous. Yet, the underlying mechanism that enables the spontaneous
emergence of such adaptive developmental constraints is poorly understood. How
can natural selection, given its myopic and conservative nature, favour
developmental organisations that facilitate adaptive evolution in future
previously unseen environments? Such capacity suggests a form of
\textit{foresight} facilitated by the ability of evolution to accumulate and
exploit information not only about the particular phenotypes selected in the
past, but regularities in the environment that are also relevant to future
environments. Here we argue that the ability of evolution to discover such
regularities is analogous to the ability of learning systems to generalise from
past experience. Conversely, the canalisation of evolved developmental
processes to past selective environments and failure of natural selection to
enhance evolvability in future selective environments is directly analogous to
the problem of over-fitting and failure to generalise in machine learning. We
show that this analogy arises from an underlying mechanistic equivalence by
showing that conditions corresponding to those that alleviate over-fitting in
machine learning enhance the evolution of generalised developmental
organisations under natural selection. This equivalence provides access to a
well-developed theoretical framework that enables us to characterise the
conditions where natural selection will find general rather than particular
solutions to environmental conditions.
