Of course there is, but there are some tricks also for it :) Modern software (and AI) can predict some user actions very precisely. Anyway, there will be input lag, without any doubts, even with the smartest AI, but for some games it's pretty acceptable. Especially for non-competitive ones.