homehome Home chatchat Notifications


AI can write new code by borrowing lines from other programs

So it begins.

Alexandru Micu
February 23, 2017 @ 4:27 pm

share Share

DeepCoder, a system put together by researchers at Microsoft and the University of Cambridge, can now allow machines to write their own programs. It’s currently limited in scope, such as those seen at programming competitions. The tool could make it much easier for people who don’t know how to write code to create simple programs.

Image credits: Pexels.

In a world run more and more via a screen, knowing how to code — and code fast — is a good skill to have. Still, it’s not a very common one. With this in mind, Microsoft researchers have teamed up with their UoC counterparts to produce a system that allows machines to build simple programs from a basic set of instructions.

“All of a sudden people could be so much more productive,” says Armando Solar-Lezama at the Massachusetts Institute of Technology, New Scientist reports.

“They could build systems that it [would be] impossible to build before.”

DeepCoder relies on a method called program synthesis, which allows the software to create programs by ‘stealing’ lines of code from existing programs — just like many human programmers do it. Initially given a list of inputs and outputs for each fragment of code, DeepCoder learned which bits do what, and how they can fit together to reach the required result.

It uses machine learning to search databases of source code for building blocks, which it then sorts according to their probable usefulness. One advantage it has over humans is that DeepCode’s AI can search for code much faster and more thoroughly than a programmer could. In the end, this can allow the system to make unexpected combinations of source code to solve various tasks.

 

Ultimately, the researchers hope DeepCode will give non-coders a tool which can start from a simple idea and build software around it says Marc Brockschmidt, one of DeepCoder’s creators at Microsoft Research in Cambridge, UK.

“It could allow non-coders to simply describe an idea for a program and let the system build it,” he said.

Researchers have dabbled in automated code-writing software in the past, but nothing on the level DeepCoder can achieve. In 2015 for example, MIT researchers created a program which could automatically fix bugs in software by replacing faulty lines of code with material from other programs. DeepCoder, by contrast, doesn’t need a pre-written piece of code to work with, it builds its own.

It’s also much faster than previous programs. DeepCoder takes fractions of a second to create working programs where older systems needed several minutes of trial and error before reaching a workable solution. Because DeepCoder learns which combinations of source code work and which ones don’t as it goes along, it improves its speed every time it tackles a new problem.

At the moment, DeepCoder can only handle tasks that can be solved in around five lines of code — but in the right language, five lines are enough to make a pretty complex program, the team says. Brockschmidt hopes that future versions of DeepCoder will make it very easy to build basic programs that scrape information from websites for example, without a programmer having to devote time to the task.

“The potential for automation that this kind of technology offers could really signify an enormous [reduction] in the amount of effort it takes to develop code,” says Solar-Lezama.

Brockschmidt is positive that DeepCode won’t put programmers out of a job, however. WBut with the program taking over some of the most tedious parts of the job, he says, coders will be free to handle more complex tasks.

 

share Share

Archaeologists Find Neanderthal Stone Tool Technology in China

A surprising cache of stone tools unearthed in China closely resembles Neanderthal tech from Ice Age Europe.

A Software Engineer Created a PDF Bigger Than the Universe and Yes It's Real

Forget country-sized PDFs — someone just made one bigger than the universe.

The World's Tiniest Pacemaker is Smaller Than a Grain of Rice. It's Injected with a Syringe and Works using Light

This new pacemaker is so small doctors could inject it directly into your heart.

Scientists Just Made Cement 17x Tougher — By Looking at Seashells

Cement is a carbon monster — but scientists are taking a cue from seashells to make it tougher, safer, and greener.

Three Secret Russian Satellites Moved Strangely in Orbit and Then Dropped an Unidentified Object

We may be witnessing a glimpse into space warfare.

Researchers Say They’ve Solved One of the Most Annoying Flaws in AI Art

A new method that could finally fix the bizarre distortions in AI-generated images when they're anything but square.

The small town in Germany where both the car and the bicycle were invented

In the quiet German town of Mannheim, two radical inventions—the bicycle and the automobile—took their first wobbly rides and forever changed how the world moves.

Scientists Created a Chymeric Mouse Using Billion-Year-Old Genes That Predate Animals

A mouse was born using prehistoric genes and the results could transform regenerative medicine.

Americans Will Spend 6.5 Billion Hours on Filing Taxes This Year and It’s Costing Them Big

The hidden cost of filing taxes is worse than you think.

Underwater Tool Use: These Rainbow-Colored Fish Smash Shells With Rocks

Wrasse fish crack open shells with rocks in behavior once thought exclusive to mammals and birds.