On the campaign map, this applies to both human player and AI:

Never fight a battle unless you are almost certain to win.