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

Dinosaur Teeth Help Scientists Recreate the Air Dinosaurs Once Breathed

Dinosaurs inhaled air with four times more CO2 than today.

Coastal Flooding Is Much Worse Than Official Records Show — and No One’s Measuring It

There were big flaws in how we estimated floods in coastal communities.

Did Columbus Bring Syphilis to Europe? Ancient DNA Suggests So

A new study pinpoints the origin of the STD to South America.

Huge Centuries-Old Human Figures Carved in Sandstone Are Suddenly Visible Again on Hawaii Beach

Beneath the shifting sands of an Oahu beach, ancient carvings — hidden for years — have suddenly reemerged.

A Popular Artificial Sweetener Could Be Making Cancer Treatments Less Effective

Sucralose may weaken immunotherapy by altering gut microbes and starving immune cells

AI Designs Computer Chips We Can't Understand — But They Work Really Well

Can we trust systems we don’t fully understand?

Strength Training Unlocks Anti-Aging Molecules in Your Muscles

Here’s how resistance training can trigger your body’s built-in anti-aging switch.

"Self-termination is most likely." This expert believes our civilization is on a crash course led by narcissistic leaders

Our civilization may be facing a “single gargantuan crash,” but collapse isn’t destiny. It’s a choice.

New DNA Evidence Reveals What Actually Killed Napoleon’s Grand Army in 1812

Napoleon's army was the largest Europe had ever seen, but in just a few months it was obliterated.

Breathing This Common Air Pollution May Raise Your Dementia Risk by 17 Percent

Long-term exposure to common air pollutants like soot and traffic fumes may significantly raise your risk of dementia.