17-year-old uses deep learning to program AI cars that race around in your browser

self driving car browser selfdriving head
German software engineer Jan Hünermann watches two autonomous cars — one colored pink, the other turquoise — race around a track. There are various obstacles set up to confound them, but thanks to the brain-inspired neural networks that provide them with their intelligence, the cars smoothly navigate these obstacles with the confidence of seasoned pros.

From time to time, Hünermann throws a new obstacle in their path, and then watches with satisfaction as the cars dodge this new impediment. Best of all? The longer he watches them, the smarter the cars become: learning from their mistakes until they can handle just about any scenario that comes their way.

There are a couple of unusual things about the scenario. The first is that Hünermann is only 17 years old, impressively young to be coding autonomous cars. The second is that the cars don’t actually exist. Or at least they don’t exist outside of a couple of crudely-rendered sprites in a web browser.

This is Hünermann’s “Self-Driving Cars In A Browser” project; one which… well, does what it says on the tin, really. It’s a web app designed to “create a fully self-learning agent” that’s able to navigate a pair of cars through an ever-changing 2D environment. The “ever-changing” bit comes down to the individual users, who are able to use their mouse to click and drag new items onto the preexisting map.

Picture a solid vector suddenly appearing in the middle of the freeway on your commute to work, and you’ll have some sympathy for what Hünermann’s long-suffering cars are faced with!

The idea for the project hit Hünermann a couple of years ago when he was a high school sophomore. Like every else who follows tech, he marveled at the news coming out of Google DeepMind, showing how the cutting-edge research team there had used a combination of reinforcement learning (a type of AI that works toward specific goals, through trial-and-error) and deep learning neural networks to build bots which could work out how to play old Atari games. Unlike the intelligent agents that make up non-player characters (NPCs) in video games, these bots were able to learn video games without anyone explicitly telling them what to do.

At the time, Hünermann was focused on building iOS apps and websites for computer-based extracurricular activities. With limited resources, however, he decided to follow Google’s example. He went ahead and downloaded DeepMind’s paper, read it, and decided to have a go at coding his own project.

“I was really interested in this field of deep learning and wanted to get to know it,” Hünermann told Digital Trends. “I thought that one possible way to do that would be to create a self-driving car project. I didn’t actually have a car, so I decided to do it in the browser.”

The virtual cars themselves boast 19-distance sensors, which come out of the car in different directions. You can picture these like torch beams, with each beam starting out strong and then getting fainter the further away from the vehicle they are. The shorter the beam, the higher the input the agent receives when it comes into contact with something, similar to parking sensors which beep more rapidly the closer you get to a way. When taken in conjunction with the speed of a car and knowledge about the action it is taking, the cars provide 158 dimensions of information.

This data is then fed into a multi-layer neural network. The more the cars drive and crash, the more the “weights” connecting the network’s different  nodes are adjusted so that it can learn what to do. The result is that, like any human skill, the longer the cars practice driving, the better they get.

They’re not perfect, of course. In particular, the cars can tend to be a bit optimistic when it comes to the size of a gap they can squeeze through, since the sensor positioned at the front of the car spots open road, without always taking into account the cars’ width. Still, it’s impressive stuff — and the point is that it’s getting more impressive all the time.

“One thing I’d like to add is more intelligence so that the cars can realize that they’re stuck, and back up and try another route,” Hünermann continued. “It would also be really interesting to add traffic, and maybe even lanes as well. The idea is to get it to reflect, as closely as possible, the real world.”

If you want to follow what he’s doing with the project, Hünermann has made the code for the demo, along with the entire JavaScript library, available on GitHub. Given that real-life self driving cars are based on the same kinds of neural networks used here, Hünermann’s creation is a great way to get to grips with a simplified version of the tech that’s (no pun intended) driving real-world autonomous car projects.

As to what’s next for himself, Hünermann is off to study Computer Science at university in England this year. “I’d like to do this as a job,” he said. “I’m absolutely fascinated by this area of research.”

Who knows: by the time he arrives in the U.K., he may even be legally old enough to drive himself!

Emerging Tech

Michigan’s former transportation chief has some advice for wannabe smart cities

After 31 years as Michigan’s transportation director, Kirk Steudle has seen it all, particularly with smart city projects. He spoke with Digital Trends recently about what makes smart cities work, and offers advice along the way.
Cars

Waymo will launch its commercial autonomous ridesharing service in December

Waymo will launch a commercial ridesharing service using self-driving cars in December, according to a new report. As previously discussed by Waymo, the service will operate in specific areas around Phoenix, Arizona.
Cars

Bosch, Daimler team up to deploy autonomous Mercedes-Benz S-Classes in San Jose

In 1986, when Bosch and Daimler joined an autonomous car research project, the technology seemed overly futuristic. Now, the partners are aiming to make a production self-driving car by the early 2020s.
Cars

Safety driver in Waymo autonomous car causes collision with biker

Safety drivers are supposed to take control of a self-driving car when a potentially dangerous situation occurs during road tests. But a recent takeover by a Waymo driver resulted in an accident with a motorcyclist.
Emerging Tech

‘Bionic mushroom’ can generate electricity without using fossil fuels

Researchers have come up with a way to produce electricity without fossil fuels using mushrooms covered with bacteria. The mushroom provides a safe environment for special cyanobacteria that generate electricity when light is shone on them.
Emerging Tech

Curiosity rover active and drilling again after computer issue

The Curiosity rover has succeeded in drilling a hole into the tough bedrock that previously defeated it, allowing imaging and collection of samples. The rover had been incapacitated for a few weeks due to problems with its computer.
Emerging Tech

Awesome Tech You Can’t Buy Yet: 1-handed drone control, a pot that stirs itself

Check out our roundup of the best new crowdfunding projects and product announcements that hit the web this week. You may not be able to buy this stuff yet, but it sure is fun to gawk!
Emerging Tech

Astronomers discover two rogue planets that do not orbit a star

Astronomers have identified two rogue planets in our galaxy which do not orbit around a star. Unlike the vast majority of discovered planets, these rogue planets drift through space alone with no sun to shine on them.
Emerging Tech

Pairs of supermassive black holes spotted in colliding galaxies

Astronomers have discovered several pairs of supermassive black holes in galaxies that are colliding with each other. These black holes will spiral closer and closer together and eventually merge into one supermassive black hole.
Emerging Tech

Quantum-based accelerometer can locate objects without GPS

Researchers have created a quantum "compass" that allows navigation without satellites. The instrument, technically called a standalone quantum accelerometer, is small enough to be transportable and has a very high level of accuracy.
Emerging Tech

Ancient continent discovered beneath the ice of Antarctica

Antarctica could be hiding the remains of a long-lost continent. Scientists created a 3D map of the crust beneath the Antarctic ice sheet which shows a similarity to the crust in Australia and India, suggesting they used to be joined.
Emerging Tech

Rocket Lab steps into spotlight with its first commercial rocket launch

Rocket Lab has deployed multiple small satellites into orbit in its first notable commercial launch. Its New Zealand-born boss said the success means "rapid and reliable access to space is now a reality for small satellites."
Emerging Tech

Alibaba’s Singles’ Day sale smashes online shopping records

The annual online shopping frenzy that is Singles' Day this year raked in $30.8 billion, up from $25 billion last time around. The Alibaba-organized event generates more in sales than Black Friday and Cyber Monday combined.
Emerging Tech

Watch this lab-grown heart tissue beat just like the real thing

A team of researchers in Germany have used stem cells to create a lab-grown human heart tissue which actually beats, as well as responding to drugs in the same way as the real thing.