Learning and generalization from reward and punishment in opioid addiction