Half of Earth’s population lives in cities, and that number will hit 66% by 2050. Overcrowding streets are a key concern – but the wild roads of India could help us find solutions.

“In 60 seconds you have to consider 70 options,” says my rickshaw driver Raju, leaning over his shoulder as we weave through traffic. We’re navigating the infamous congested streets of Bangalore, and he’s explaining the rules of the road.

Having lived in India for two-and-a-half years, I get what he means. Not an inch of the road is wasted – if there’s a gap, a scooter will fill it. Vehicles travel bumper to bumper. Overtaking is attempted as frequently as possible. Indicators and wing mirrors are optional extras. Most drivers seem to rely on the incessant honking of nearby vehicles – almost a form of echolocation.

But there is method to the madness. Drivers deftly navigate around manoeuvres that would lead to accidents in the UK, and offenders rarely elicit more than a mutter. They’ve adapted to predictable unpredictability.

India’s crowded roads provide a unique kaleidoscope of different road obstacles – like elephants – that could provide better data for self-driving AI (Credit: Getty)

“We expect anything; only then do we make predictions. We are always expecting that the car in front could go left, right, brake suddenly,” Raju says. “Something always happens.”

This driving philosophy has complex cultural and historical roots, but it’s also a product of rapid growth in both urban populations and vehicle ownership – which government figures show nearly quadrupled between 2000 and 2013. This growth is outstripping the ability to build new infrastructure, leaving citizens to adapt.

India is far from alone – rapid urban overcrowding and car ownership put countries like China, Brazil and the Philippines all in a similar boat.

But for many tech companies and researchers, India’s chaotic roads make it the perfect testing ground. They might help us solve some of the big problems that come with living in crowded cities… ones that are only going to keep getting more crowded.

***

Overcrowding in Earth’s cities is a complex, nuanced problem with no magic bullet solution – it requires a comprehensive game plan that addresses everything from infrastructure to energy to income inequality.

But as far as those cities’ roads are concerned, technologists all over the world are pursuing one grand idea in particular – one idea that doesn’t even involve humans.

Self-driving cars bring the promise to keep traffic flowing and to help us optimise our journeys. The argument is that smart robot cars could communicate with each other, better sense obstacles and generally create a more organised flow of traffic.

But much of this technology is being developed for the orderly streets of the West. Uber’s former CEO Travis Kalanick has said India would be the last place to get driverless cars after experiencing Delhi traffic.

That hasn’t deterred design firm Tata Elxsi, which is building a self-driving system that could be retrofitted to any car, and have started testing prototypes on a test track near their Bangalore headquarters.

Road testing is far away though and they’re under no illusions about the challenges. “Driving behaviour is a lot more erratic here,” says Nitin Pai, head of marketing and strategy. “Rules are not rules, they’re more guidelines.”

And that’s exactly why thinking about Indian roads in particular could help us come up with the best ideas.

Self-driving cars rely heavily on machine learning – that’s when AI uses mountains of data to train itself to do things like recognise vehicles and predict their trajectories over time.  So far, such cars have been tested across the globe in places like San Francisco and Pittsburgh in the US, and in smaller cities in countries like Japan and China.

But most research has been done in the West, where driver behaviour could be argued to be more predictable and roads are reliable with clear signs.

“These are the foundations on which you lay the system of a driverless car,” says Pai.

The group has been training their system on third party data collected by researchers at the Karlsruhe Institute of Technology in Germany. This was done on German roads using a car equipped with high resolution cameras, GPS and a Lidar sensor – effectively radar using laser light instead of sound for very sensitive distance measurements.

They’ve developed algorithms using this data, says head of strategic initiatives Rajesh Kumar, but machine learning is only as good as the data you give it. And if we want to solve road problems in overcrowded developing countries, we need data from those environments.

Indian roads throw up plenty of obstacles that don’t appear on German roads, which means that an AI trained on German data won’t be able to recognise all the objects a self-driving car will encounter on India’s roads.

For example, “any dataset you take from a European or American university won’t  feature a typical autorickshaw,” he says. “If there aren’t  autos in my dataset my self-driving car will never recognise one because my AI system has not been trained to recognise autos.”

It’s not just rickshaws; in India scooters and motorbikes are far more prevalent and cars also compete with a menagerie of unconventional road users.

“People suddenly come into the road, so do cattle, monkeys, elephants,” laughs Raju the rickshaw driver. “They are also part of our traffic so we are always looking out for them.”

And all that could help self-driving car technology be better and safer in a way it couldn’t be without Indian road data.

Capturing these differences is essential if self-driving cars are ever to work on Indian roads, says Kumar, but it’s also a data gold mine for researchers looking to perfect the technology for other developing countries.

So several times a week they drive a sensor-laden sedan around Bangalore’s Whitefield suburb to build up a local dataset of high-definition video, LIDAR data and high-precisions GPS readings.

Elxsi thinks their first customers will be in developed countries, but setting the bar high could eventually let them tap emerging markets with similar traffic conditions.

“If we’re able to solve Indian roads, we can do any roads,” says Kumar.

***

They aren’t the only ones trying to tame India’s byways and highways – which could then help cities run more smoothly worldwide. Lelitha Devi is an associate professor at the Indian Institute of Technology (IIT) Madras in Chennai, where she works on so-called intelligent transport systems (ITS).

This is the technology behind services people take for granted in the UK like journey planners, digital bus arrival time signs and smart control of traffic lights that keep traffic flowing.

Indian city administrators are increasingly looking to introduce similar technology, says Devi, but a lack of home-grown solutions means they often turn to Western providers.

“Just because it works in the US or UK doesn’t mean it will work in our cities,” she adds. “The characteristics are completely different, the complexity is much more. So we need indigenous solutions.”

Her lab has set up a network of video cameras and sensors along one of Chennai’s commuter corridors. Low-power wireless communication technology streams data to a makeshift traffic monitoring room at IIT to help them start building models of Indian traffic.

“In western traffic, there is one vehicle behind another and they all leave minimum spacing during congestion. Here, there will be vehicles in any space you have,” she says.

Some of her students are trying to model two-wheelers moving around vehicles using analogies from how fluids flow through air pockets in sand.

Meanwhile, one of their models is already delivering results using GPS data from city buses to predict arrival times. Similar approaches are used in Europe, says Devi, but they tend to assume uniform speeds on subsections of the route.

“Here, you can’t assume anything will be uniform or use any prediction method that does,” she says.

Even capturing data in the first place has required creative thinking. A popular approach to monitoring traffic is inductive loops. Wire is laid under each lane, and when a vehicle passes above, the wire’s magnetic field is disturbed, causing a signal to be transmitted to a counter.

The approach works when vehicles stick to their lane, but that’s rarely the situation in India. So Devi’s group built a system that accurately detects eight vehicle types even when passing simultaneously.

***

These projects are impressive, but they are in their infancy, and it will be hard to convince city planners to implement them.

Devi says officials often prefer established foreign solutions, regardless of whether they are appropriate for Indian conditions.

But there is considerable impetus for this kind of technology. One of Prime Minister Narendra Modi’s flagship initiatives is the $15bn (£11.5bn) Smart Cities Mission aimed at using data to transform everything from transport to sanitation. The benefits could be considerable on the increasingly choked streets of India’s booming cities.

Raju the rickshaw driver says 15 years ago, the average speed in Banglaore was 25mph (40km/h) , but today it’s down to around 6mph (10km/h).

“These new [autorickshaw] drivers starting now won’t last more than five years, because of the heavy traffic, the pollution. It will risk their health,” he says.

Devi thinks technology like their bus prediction system could help ease the burden by encouraging use of public transport. In passenger surveys, they found many would prefer to travel on busses, but simply can’t rely on them.

Her group is also working on route planning systems that could optimise road use. Their traffic predictions could one day feed into systems controlling traffic lights intelligently, based on traffic flow, rather than just using timers as done presently.

But all the technology in the world could only help sort the wild roads of India – or anywhere else – so much. The best way to make the best use of a difficult driving landscape might be starting with the actual humans behind the wheel.

Some transport engineers think trying to change the habits of India’s drivers is a better approach, but Devi feels that is beyond their control.

As with most things in India, it’s easier to go with the flow.

“This is how the system is. The question is how do we improve it,” she says. “Anyway, it’s more efficient in some ways. We don’t waste any space on the road!”