If there's a way out, find it and book out. If there's no way out defend as best you can, but try not to take a knife to a gun fight and if you are not in a place that has gun,knife,fist, etc fights, chances you not be in one.
I know of a fellow riding a 4 wheeler in Az that came up a hill right into a mountain lion. He meant to reverse and run but by accident he lurched forward, scaring the big cat into running off. You never know what's in the other guy's head. 2 cents and change Wyndham