On the Dynamics of Cognition and Actions