Control theory is a mathematical description of how to act optimally to gain future rewards. In this paper I give an introduction to deterministic and stochastic control theory; partial observability, learning and the combined problem of inference and control. Subsequently, I discuss a class of non-linear stochastic control problems that can be efficiently solved using a path integral. In this ...