AI learns to write code for themselves

Is it possible for machines to write their own software and occupy the programmer's jobs?

At the very least, they can bring automation to many different areas: Eliminate boring, boring jobs so that developers can do more creative work.

According to InfoWorld, a recent study report published by Microsoft and Cambridge University researchers discussed how a machine called DeepCoder can learn to write small programs by How to use habits from other programs as raw materials.

DeepCoder starts from very humble things. It uses a small piece of code, each with only a few lines, written in a custom - DSL (specialized language for specialized problem domains) to make it easy to analyze input and output of each piece of code more. A piece of code is supposed to be better when it solves a specific problem, and it will likely end as part of the solution. Over time, with the training of new code, the speed and accuracy of DeepCoder is improved.

Picture 1 of AI learns to write code for themselves
Over time, with the training of new code, the speed and accuracy of DeepCoder is improved.

This type of approach can make it easier for those who don't know about coding to build simple programs.

"Suddenly people can become more productive," said Armando Solar-Lezama of the Massachusetts Institute of Technology (MIT - USA), who is not involved in the study. "They can build systems that they might not have done before."

In summary, this method can allow non-coder people to simply describe an idea for a program and let the system build it, says Marc Brockschmidt, one of the DeepCoder creators at Microsoft. Research in Cambridge said.

DeepCoder uses a technique called program synthesis : creating new programs by combining lines of code from existing software - just like a programmer can do. Given a list of inputs and outputs for each piece of code, DeepCoder learns which code is needed to achieve the overall desired result.

One advantage of letting "loose" an AI in this way is that it can search more thoroughly and more widely than a flesh-and-skin coder, so it is possible to pair the code together in a way that people probably don't think. And yet, DeepCoder uses machine learning to filter the source code database and arrange the code snippets according to it is most useful.

Picture 2 of AI learns to write code for themselves
DeepCoder uses machine learning to filter the source code database and arrange the code snippets to be most useful.

All of this makes DeepCoder faster than its predecessors. DeepCoder creates programs that work in fractions of a second, while older systems take several minutes to try different combinations of code lines before pairing certain pieces of code with each other to get can do the job. And because the DeepCoder learns what combination of source code works and which source code doesn't work together, every time it tries to solve a new problem every time it improves itself.

This technology may have many applications. In 2015, MIT researchers created an automated program to patch software bugs by replacing lines of error code from other programs. Mr. Brockschmidt said that future versions can make building programs repetitively get information from websites much easier, such as automatically classifying Facebook photos that human coder does. have to touch a finger.

However, experts say such systems will cause developers to lose their jobs. There is a synthesis program that automates some of the most tedious parts of programming, the coder will be able to focus time on more complex tasks.