The principles of Darwinian evolution are fundamental to understanding biological organization and have been applied to the development of functional molecules in the test tube. Laboratory evolution is greatly accelerated compared with natural evolution, but it usually requires substantial manipulation by the experimenter. Here we describe a system that relies on computer control and microfluidic chip technology to automate the directed evolution of functional molecules, subject to precisely defined parameters. We used a population of billions of RNA enzymes with RNA-joining activity, which were challenged to react in the presence of progressively lower concentrations of substrate. The enzymes that did react were amplified to produce progeny, which were challenged similarly. Whenever the population size reached a predetermined threshold, chip-based operations were executed to isolate a fraction of the population and mix it with fresh reagents. These steps were repeated automatically for 500 iterations of 10-fold exponential growth followed by 10-fold dilution. We observed evolution in real time as the population adapted to the imposed selection constraints and achieved progressively faster growth rates over time. Our microfluidic system allows us to perform Darwinian evolution experiments in much the same way that one would execute a computer program.