Learning to forgive and forget