Enter AlphaCode!The programming version of AlphaGo quietly entered the contest, beating out half the programmers

2022-04-26 0 By

Xiao check from concave qubits | public QbitAI today, the temple DeepMind “Alpha” family added a new member: brush programming contest questions AlphaCode come!AlphaCode had been sneaking into the village for months without anyone noticing.It quietly entered 10 recent programming competitions held by Codeforces, a popular website, and scored more than half of all humans.DeepMind didn’t release the final results until today: AlphaCode finished in the top 54.3% of the 10 matches, with an Elo score of 1,238.What’s more, in a programming contest that tests algorithmic creativity, AI is finally coming out on top, something it has lacked in the past.If you look at AlphaCode’s score over the last six months, AlphaCode’s performance is even better because it’s been in the top 28% of users for just 10 weeks.Codeforces is a programming contest site started by Russian programmer Mikhail Mirzayanov that holds roughly weekly programming Rounds called Codeforces Rounds.Codeforces’ Elo score can be used to measure a programmer’s programming level.Even Codeforces founder Mikhail Mirzayanov was surprised when he saw AlphaCode’s results.He was skeptical of AI because programming competitions test the ability to invent algorithms, which is the most difficult, but AlphaCode’s results completely exceeded his expectations.DeepMind’s message has been retweeted more than 2,000 times and liked more than 5,000 times on Twitter in just half a day.With all that said, let’s take a look at how AlphaCode has become a programming problem solver.Here are the 1553 d problem on the Codeforces: (link: https://codeforces.com/problemset/problem/1553/D) has two strings s and t, consists only of lowercase letters.For the string S, we scan the entire string from front to back.If you press the Backspace key, all characters between the cursor and the last undeleted character are deleted.For example, if the string S is “abCBD”, you press Backspace in the first position and in the fourth position, and you get the string “bd”.Because there are no characters before the first cursor position, there is no action the first time.The fourth character before the cursor position is C, and the last undeleted character is a, so pressing Backspace removes the first three characters “bd”.Ok, now the question is: can we scan the s string from front to back so that s becomes T?If you can print YES, otherwise print NO.AlphaCode gives the code like this: t=int(input()) for I in range(t): s=input() t=input() a=[] b=[] for j in s: a.append(j) for j in t: b.append(j) a.reverse() b.reverse() c=[] while len(b)!=0 and len(a)!=0: if a[0]==b[0]: c.append(b.pop(0)) a.pop(0) elif a[0]!=b[0] and len(a)!=1: a.pop(0) a.pop(0) elif a[0]!=b[0] and len(a)==1: a.pop(0) if len(b)==0: print(“YES”) else: Print (“NO”) input 4 strings to the above program: 4 ababa ba ababa bb aaa aaaa aababa ababaNot only does it solve the problem successfully, but it also shows where the code and attention are highlighted.”Since AI can see so much, it would be nice to add comments at the end of the code,” said one user.For more examples, visit AlphaCode.DeepMind says the problem solving required in Codeforces matches is beyond the capabilities of existing AI systems.The entire AlphaCode model flows as follows: pre-train a Transformer based language model on GitHub code with standard language modeling goals.This model can reasonably represent the space in which humans write code, greatly reducing the search space for problems.Fine-tuning the model on competitive programming data sets, using GOLD and Tempering as training targets further reduced the search space and compensated for the small amount of competitive programming data with pre-training.Generate a very large number of samples from the model for each problem.The samples are filtered to obtain a small number of candidate submissions (up to 10) and evaluated on hidden test cases by using case tests and clustering to pick samples based on program behavior.All in all, by combining the large-scale Transformer model with large-scale sampling and filtering, DeepMind has made significant progress in the number of problems it can solve, an order of magnitude higher than previous work.As the Codeforces founders say, inventing algorithms is the hardest part of programming problems.Petr Mitrichev, a Google engineer and perennial top scorer on the world’s coding contest website, said: “It’s very difficult to solve the coding contest problem.It requires both good coding skills and human problem-solving creativity.AlphaCode isn’t the first programming tool, Codex and GitHub Copilot are both impressive.But DeepMind believes AlphaCode is very different from its predecessors: recent large-scale language models have demonstrated an amazing ability to generate code that can now perform simple programming tasks.However, these models still perform poorly when evaluating more complex, unseen problems that require problem-solving skills, not just translating instructions into code.In contrast to Twitter, Codeforces pros are more resistant.”This AI is really a rookie,” one programmer thought.Because AlphaCode only has 1238 points, it is only at the level of a student, a middle school student who participated in the Informatics Olympiad could have achieved that level.DeepMind claims that AlphaCode is meant to help humans, but some programmers are worried that the world is being taken over by AI, and that AI should stop playing games with other programmers.Reference links:[1]https://deepmind.com/blog/article/Competitive-programming-with-AlphaCode[2]https://alphacode.deepmind.com/[3]https://storage.googleapis.com/deepmind-media/AlphaCode/competition_level_code_generation_with_alphacode.pdf[4]https://github.com/deepmind/code_contests