Cracking the Code of Action: a Generative Approach to Affordances for Reinforcement Learning