Experience, knowledge and wisdom
Experience they say is the best teacher. I believe it often depends on how much wisdom we apply to the knowledge gained from experience.
It often surprises me how often we repeat the same mistakes everyday. Sometimes, it happens out of habit, sometimes out of lack of adequate knowledge but mostly the mistakes come from the lack of openness to accept that our some of our choices give us a good chance of doing well or failing.