A robot which is learning how to be socially aware and move through pedestrian environments by observing behaviour is being developed by Stanford University.

Unlike self-driving cars which follow well-defined rules, crowds of people have unwritten rules, interacting with each other based on social convention and etiquette, some of which they might not be aware of, explained Stanford University's Alexandre Alahi.

"Every country, every culture has its own behaviour and that is why we decided to invent an algorithm which can learn on the fly," Mr Alahi explained.

The idea is to create an algorithm which can be used by any robot to learn the social conventions of the place it is in at the time, he added.

BBC Click's Spencer Kelly reports.

More at BBC.com/Click and @BBCClick.