Unsupervised learning of an embodied representation for action selection