The use of evolutionary principles to optimize the function of proteins, metabolic pathways or other biological systems.