DeepMind has created an artificial intelligence system called AlphaCode that it says "writes computer programs at a competitive level." The system was tested against the coding challenges used in human competition and found to be among the top 54% of the program.
This is a significant step forward for offline coding according to DeepMind, although AlphaCode skills are not necessarily representative of the programming tasks that the average coder faces.
Oriol Vinyals, chief scientist at DeepMind, notes that the research is still in its early stages, but its findings have moved the company closer to building flexible AI to solve complex coding problems. "We're excited about AlphaCode's potential to help programmers and non-programmers write code, improve productivity, or create new ways to build software," Vinyals said.
In one example problem where AlphaCode was tested, participants were asked to find a way to convert a single string of random repeated letters s and t using a limited set of inputs:
“You are given two strings s and t, each of which consists of lowercase Latin letters. You are going to print the string s character, starting with the first character and ending with the last.
When you are about to type a character, instead of pressing the button that prints that character, you can press the "Backspace" button. Pressing this button deletes the last typed character that has not yet been deleted (or does nothing if all the characters already printed have been deleted or you have not typed any characters yet). For example, if the string s is "abcbd" and you press the Backspace button instead of printing the first and fourth characters, the result will be the string "bd" (the first press of Backspace will not delete any characters, and the second press of this button will delete the character "c" ). Another example: if s is "abcaa" and you press Backspace instead of the last two letters, it's "a".
You have to determine if you can get the string t if you try to type the string s by pressing Backspace instead of pressing the buttons corresponding to some (possibly none) of the letters in the string s."
AlphaCode generated more possible answers and weeded them out by running the code and checking the output, just like a human competitor would.
The system was tested on 10 problems, which were solved by 5000 users on the Codeforces website. On average, she ranks in the top 54.3% of responses.
DeepMind notes that AlphaCode's current skill set is currently only applicable to the field of competitive programming, but its capabilities open the door to creating future tools that will make programming more accessible.
Many other companies are working on similar applications. For example, in August 2021, OpenAI released Codex, a new system that automatically converts simple English phrases into code. Codex is based on GPT-3.
So far, however, systems are far from simply taking over the work of human programmers. They produce is often buggy, and because the algorithms are usually trained on public code libraries, they sometimes reproduce copyrighted material.
So, in June 2021, Microsoft and GitHub introduced the Copilot programmer assistant based on the Codex neural network from Open AI. The system is trained to work with various frameworks and programming languages. In August, an improved version of the Codex was released, which translates English phrases into program code.
The developers have noticed that the neural network assistant generates lines from open source projects, not obeying the original license. They also complained that Copilot generated dozens of lines of quotes and comments from open source projects instead of just a few lines of code. GitHub clarified that Copilot does not typically reproduce exact code snippets, but creates derivative works from previously received inputs. The company claims that this happens only 0.1% of the time.
GitHub then admitted that when training Copilot, the developers used all the public code available in the service's repositories, regardless of the type of license.
It also turned out that about 40% of the code produced by Copilot contains errors and vulnerabilities.
bbabo.Net