Learning and Planning with a Semantic Model