Coding as a game

Google’s DeepMind team recently introduced AlphaDev, the next version of their artificial intelligence model following AlphaZero, and its achievements in Nature. As the name suggests, AlphaDev is a reinforcement learning model designed for programming. Similar to the accomplishments of AlphaGo and AlphaZero in board games, the goal of AlphaDev is to win the game of algorithm design. In the training process, the model is rewarded for achieving improvements, which means surpassing the existing methods through optimization. Using this approach, AlphaDev achieved a 70% faster optimization than the previous methods for sorting a list with five parameters during the assembly language stage, and the corresponding algorithm was added to C++.

Viewing the execution of code or the accomplishment of program objectives from the perspective of winning a game through optimization is a new and interesting approach. Programming shares many common stages with games, such as strategy design, learning from experience and failures, and modifying strategies. Peter Sanders, a professor at Karlsruhe Institute of Technology, equates the commands generated by AlphaDev to moves in a board game. In fact, new strategies developed in various games can be framed as optimization problems. For example, even after 25 years since its release, the video game StarCraft continues to see the development of new strategies that optimize existing approaches down to fractions of a second.

However, in the computer science community, there is currently a heated debate about the achievements and limitations of AlphaDev. Firstly, AlphaDev has limited the types of assembly language instructions that can be used to reduce the number of possibilities. Therefore, some argue that the current model would be difficult to use for general-purpose optimization search. Additionally, the sorting algorithm submitted by AlphaDev to C++ has been found to be easily reproducible with GPT-4. However, there is still room for improvement in terms of performance aspects such as command type restrictions, and the general-purpose nature of existing large-scale language models and the distinct purpose of AlphaDev differ. In the current era where Moore’s Law has reached its limits, the development of AlphaDev is expected to contribute to overall performance improvements in programming environments and software.

전일 구글의 딥마인드팀이 알파제로의 다음 버전의 인공지능 모델인 알파데브(AlphaDev)와 알파데브를 이용한 성과를 네이처에 소개하였다. 이름에서 알 수 있듯이 알파데브는 프로그래밍을 위한 강화학습 모델이다. 알파데브는 과거 모델인 알파고와 알파제로가 보드게임에서 보여줬던 것과 마찬가지로 알고리즘 작성이라는 게임에서 승리하는 것을 목표로 한다. 학습상에서 모델에게 보상되는 승리의 조건은 성능의 향상, 즉 기존의 방식을 뛰어넘는 최적화이다. 이러한 방식으로 알파데브는 과거에 어셈블러 언어 단계에서 5개의 인자를 가진 리스트를 정렬하는 속도를 기존의 방식보다 70\%빠르게 최적화되었고 해당 알고리즘은 C++에 추가되었다.

코드의 실행이나 프로그램의 목적 달성을 게임의 승리 조건으로 보는 것이 아닌 최적화 관점으로 보는 것은 새롭고 흥미롭고 관점이다. 프로그래밍은 게임과 매우 유사하다. 전략 설계, 경험, 실패로부터의 학습, 전략 수정 등의 공통된 단계들이 그러하다. 카를스루에 공과대학교 피터 센더스 교수는 알파데브가 만들어 내는 명령을 보드 게임의 한 수와 같게 보았다. 실제로 여러 게임에서 만들어지는 새로운 전략들은 최적화 문제로 치환이 가능하다. 예시로 25년전 출시된 비디오 게임인 스타크래프트에서는 아직까지도 새로운 전략들이 개발되고 있고 이러한 전략들은 기존의 방식들을 초 단위로 최적화하는 새로운 방식들이다.

반면에 컴퓨터 과학 커뮤니티에서는 알파데브의 성과와 한계점에 대해 뜨거운 토론이 한창이다. 먼저, 알파데브는 경우의 수를 줄이기 위해 사용할 수 있는 어셈블러 명령 종류를 제한하였다. 따라서, 지금의 모델은 범용적인 최적화 탐색으로 사용이 힘들 것이라는 의견이다. 또한, 알파데브가 C++에 제출한 정렬 알고리즘은 GPT-4로 쉽게 재현이 가능한 것으로 밝혀졌다. 하지만 명령 종류 제한 등의 성능적인 측면은 개선될 여지가 있고 기존의 대형 언어 모델의 범용적 용도와 알파데브의 제한적이지만 뚜렷한 용도는 다르다. 무어의 법칙이 깨진 현재에 알파데브의 발전이 프로그래밍 환경과 소프트웨어의 전반적인 성능 향상에 기여하는 것을 기대해 본다.