Artificial intelligence already creates artistic images, swaps people’s faces in videos and even writes like a human. So why not program? THE DeepMind, a division of Alphabet (Google), took this idea seriously. The company developed the AlphaCodea system that can generate code for various programming problems.
The project follows a proposal that is easy to understand, but difficult to implement: receive a problem and present a solution. That makes the AlphaCode have a generalist role. Mechanisms that automatically generate code already exist, but they tend to be targeted at specific problems.
To make the system as universal as possible in problem solving, DeepMind divided the project into two parts. The first “reads” the problem and converts it into a representation that will serve as the basis for the second part. The latter is the one that produces the solution.
AlphaCode training was also divided into two parts. In the first, the system was trained with more than 700 GB of code extracted from GitHub, including comments and instructions in natural language.
In the second, DeepMind created internal programming competitions whose results served to train the artificial intelligence in a more intense way.
Looks like a novice programmer
What makes the project promising is the fact that AlphaCode has solved new problems for it, that is, that were not presented during the training. But this was only possible after completing a few steps.
One of them consisted of making the system filter out bad answers, which were not few. DeepMind researchers report that more than 40% of the presented solutions exhausted memory resources or exceeded a time period considered reasonable.
The next level of filtering consisted of making the system select up to ten solutions to the problem among the hundreds of thousands of generated results. That’s because many of them were similar to each other.
But it worked. The results made AlphaCode among the top 54% in evaluations of programming challenges. And the researchers found no copies of codes used in training.
According to DeepMindartificial intelligence reached this level by participating in competitions that “require a combination of critical thinking, logic, algorithms and natural language understanding”.
It’s an impressive feat. It’s just not possible for the system to be used widely in development work. Not yet. Many results presented consumed more resources than necessary. Others were inconsistent.
Overall, DeepMind researchers found AlphaCode to perform at a level equivalent to that of a “beginner programmer” with no more than a year of experience.
Other AIs who program (or try)
Although AlphaCode has shown satisfactory results for the current phase, it is not time to put it into production. At least not for complex jobs.
Programming is not just an exercise in logic. The programmer’s ability to predict scenarios, study contexts and perform tests counts a lot for good code.

Despite current limitations, the future points to artificial intelligence actively participating in development projects. This is already true with the GitHub Copilotfor example, which suggests code for developers (although there is criticism about possible plagiarism by the tool).
Another example is the ChatGPT, a chatbot capable not only of writing convincing texts, but of programming. Or almost. Careful analysis revealed that many of the codes generated by the tool had errors of logic. In any case, it seems to be a matter of time for this artificial intelligence to get more… intelligent.
The complete study on AlphaCode was published in Science🇧🇷
With information: Gizmodo🇧🇷 Ars Technica🇧🇷
https://tecnoblog.net/noticias/2022/12/09/deepmind-cria-inteligencia-artificial-que-resolve-problemas-de-programacao/