"Players always run the wrong way!"
It's an old joke with an old friend, and former GM... He sent a group of "corrupt cops" into a place to try and chase us out the otherr end. His combat-prone brother charged, and got himself captured by the remaining 10. My PC was hiding, watching while they threatened and interrogated him...
Fortunately, I had an area-affect weapon, and managed to take out eight of them, without getting his brother's PC. He then managed to get the one outside the area of effect, and grapple with the leader interrogating him. So two of us took out 10...
In the first-level campaign I'm in now, nine of us just "overcame" 36+ gnomes & halflings. I met the other PCs after they had been in a bar fight, and had been brought into the "Drunk-Tank" where my healer (and another PC) worked. One of the "prisoners" heard someone outside talking about "Put it right here, next to the wall... No, that's too much powder!"
I quickly unlocked the cell across the hall, and got the PCs (and drunken NPC Gnome) out of there, asking the other Cleric if he had
Create Water prepared. A Druid prisoner did, so he tried to cast it. The explosion went off while he was casting, but the PCs in the other cell were protected, and the healers in the hallway made their saves (the Druid was stunned, and hors de combat, but alive).
We then found ourselves laid claim to by the pirates who wanted the Gnome, and anyone in his immediate vicinity. They crawled through the breach in the wall. I shut the cell door and stepped back, leaving them in the cell, with us behind locked bars (and apparently, none of them had missiles weapons... which was a good thing, because we couldn't get out).
So, after some posturing and attempts at tom-foolery with a
Charmed Judge, the spell wore off, and the pirates fled! Hmmm!... What's the XP for 36+ Gnomes & Halflings, anyway?
So, no, players don't know when to run. It is very hard to tell. We didn't expect to beat 36 Halflings, but we did.