Quite seriously. If you can, don't be there. I've changed walking routes to avoid gang/drug dealer territory for instance. Assuming you have a specific situation in mind do you really have to be where this person is?
I don't think you'll find a best action. Too much depends on the situation and penalties. How bad is it if you are intimidated? What happens if you are not intimidated and the situation escalates to violence? How crazy are the would be intimidaters? Finding something you can live with is normally the best you can do.
Humor sometimes helps.
Traveling with friends can work.
Just not understanding what someone wants when they try to start something can be quite effective.
Be very polite.
You probably have thought of a number of options, trust your instincts and your brain.