Learning by Doing: Controlling a Dynamical System using Causality, Control, and Reinforcement Learning