Good answers. Uphill gets the right of way.
However, when backpacking or hiking, I yield to bikes on the trail, even though IMBA says otherwise. It's easy for me to just step off the trail, so I'm not a jerk about it...and everyone is happy.
But if I'm walking on the sidewalk, I won't yield to bikes on the sidewalk!