Evolution can be viewed as an implementation of the scientific method by nature. In each generation mutation and genetic recombination produce varied hypothesis (individuals), and these hypothesis are tested in the environment [sample hypothesis: a small-beaked Darwin's Finch is better suited to the food available on this island]. Those hypothesis which best survive this natural selection will produce new generations of hypothesis to be tested (differential reproduction). Hypothesis which are unsuccessful in the natural environment will die out.
Alternately the scientific method can be viewed as an implementation of evolution by man. Scientists generate variations of existing hypothesis, and subject these individual hypothesis to testing in the laboratory environment. The hypothesis which survive this testing will be used to generate new hypothesis. Hypothesis which are unsuccessful in the laboratory environment will die out.
This duality is most clearly seen in the use of techniques such as genetic algorithms in computer programming. Here analogues to mutation and genetic recombination are used to automatically generate new hypothesis from previous generations, and the "environment" consists of a fitness function that represents whatever problem is being optimized.