self-adapting program

noun

1.
a program that can change its performance in response to its environment