Causal Reinforcement Learning for Optimisation of Robot Dynamics in Unknown Environments