The easy (and only correct) way to prevent the awkward dance of for everyone to follow the International Regulations for Preventing Collisions at Sea.
The conventions state that if a risk of head on collision exists, both vessels must turn starboard (right) so as to pass each other on the port side. If one vessel is unable to turn, the system still works because just one vessel turning will avoid a collision. Both is just an extra safety factor.
These conventions have been adopted by aircraft as well.
In a pedestrian context, as a collision becomes likely, take one step right. If you both do that you will pass with two steps clearance. If one party of mobility impaired (wheelchair, crutches, zimmer frame etc) the active party still steps right and the clearance is one step.
Any resulting collisions are then caused by one party not following the conventions in which case they can be stripped of their masters ticket and lose command of their vessel. In a pedestrian context I imagine this would involve having their feet removed.