Every program that has ever existed does this. So, you're saying that all programs that have ever existed, then, are all AI. You make no distinction whatsoever.
I would say that the more a program thinks on its own which actions to take to maximize its chances of success, the closer to AI it is.
If it's doing exactly what it's explicitly told, then it's not really intelligent, is it?
This does exactly that.