Information-Theoretic Necessary and Sufficient Conditions for the Task-Driven Control of Robots