Instance-based Generalization in Reinforcement Learning