Symbol Generation and Grounding for Reinforcement Learning Agents Using Affordances and Dictionary Compression