“Socially aware” robot learns how to be polite