If we're going to have robots acting as tour guides and delivering pizzas then they need to be able to navigate through busy pedestrian environments, and that's exactly what a new robot built by MIT has been programmed to do.

The polite droid even knows the social norms of pedestrian movement, and will overtake on the left or right, or take one side of a corridor, depending on the country it's in.

To achieve all this, a suite of cameras and laser sensors are attached to the top of the bot, allowing it to recognise humans and stay out of their way, without slowing down the flow of people walking around it.

"Socially aware navigation is a central capability for mobile robots operating in environments that require frequent interactions with pedestrians," says lead researcher Yu Fan Chen.

"For instance, small robots could operate on sidewalks for package and food delivery. Similarly, personal mobility devices could transport people in large, crowded spaces, such as shopping malls, airports, and hospitals."

Today's robots can avoid basic obstacles without too much trouble, but the MIT team wanted to build a navigation algorithm that prioritised humans and obeyed some of the unspoken rules of being a pedestrian, such as leaving a wide berth when passing someone.

While self-driving cars can rely on clearly painted lines and vehicles that move in a mostly predictable way, getting through a crush of people is a bit trickier, as you'll know if you're a regular rush hour commuter.

If someone quickly changes direction in a hospital or school corridor, can a robot cope?

"The part of the field that we thought we needed to innovate on was motion planning," says one of the team, Michael Everett. "Once you figure out where you are in the world, and know how to follow trajectories, which trajectories should you be following?"

Getting the right balance between speed and safety is difficult, say the researchers: using existing systems, robots either spend too long sat still trying to calculate a path between the forest of moving legs, or can't react quickly enough when people change direction.

To overcome the problem, the team used a type of machine learning called reinforcement learning, where systems are trained through trial and error and interactions with their environment, rather than a set of specific commands.

In this case, those environments were computer simulated during the training process – that meant the robot could learn how to act in a busy thoroughfare before heading out into the field.

Once allowed out into the world, the bot used what it learned to recognise similar scenarios from its training and pilot through them.

The system on board the robot can assess its environment and adjust its path every tenth of a second, without stopping to reprogram itself each time. In fact it can maintain a 'walking speed' of 1.2 metres (3.9 feet) per second.

By making new decisions every tenth of a second, the robot navigates more naturally, and during a test run at one of the buildings on the MIT campus it passed with flying colours, even pausing behind someone getting a coffee and swerving a tour group.

The next step is to upgrade the robot to handle busier crowds in an urban environment, which will involve deciding whether to try and pilot through clumps of people or go all the way around them.

For now though, robots just got a bit smarter at working their way through pedestrians without hitting any ankles or slowing anyone else down.

"We want it to be travelling naturally among people and not be intrusive," says Everett. "We want it to be following the same rules as everyone else."

The research is due to be presented at the IEEE Conference on Intelligent Robots and Systems and is available on the arXiv.org pre-print server.

The researchers also produced a video about the research, which you can see below: