Learning state representations for robotic control