How do Artificial Neural Networks learn? Rubik's Code