From a DM's perspective, how do you adjudicate when someone should surrender/turn tail and run/try to drag away fallen comrades/whatever? I assume it would be different depending on any number of factors, including but not limited to the subject's Intelligence score, his or her motivations for being in that place at that time and for engaging the PCs in combat, the realistic chance of survival during (or after) flight versus the likelihood of defeating the heroes, etc.
For players, when do you decide when enough is enough? Is that something you work out separately with each group of characters you're playing with? Something like, "when someone is knocked into negative HP and the cleric can't reach him/her for more than a round," or," as above, and the rest of us are at 50% HP or below," or, "We keep fighting no matter what happens?" If you do have something in mind for getting away, what does the escape plan look like? Is it the kind of contingency you might spend XP and GP on by way of crafting or purchasing magic items to expedite your retreat?
As a DM, it is exceedingly rare for me to see PCs retreat, and even more rare for them to do so successfully or with a majority of their teammates still alive. I try to work out in my notes if/when a creature or NPC is willing to surrender or try to get away, and what that might look like, and what he or she does if it is no longer an option. I would oppose any hard and fast ruleset for adjudicating such a thing because there are just too many variables to account for. It's easier to write, "The bandit leader will continue to fight until more than half of his allies have been killed or knocked unconscious OR he drops below 25% HP. If he doesn't drop below this threshold and in a single round the remainder of his allies have been disabled, he flees instead of surrendering." and leave it at that.