Model Repair with Quality-Based Reinforcement Learning