Learning the Latent Rules of a Game from Data: A Chess Story