Google discovers faster sorting algorithm using deep reinforcement learning

A team of engineers from Google's AI lab DeepMind published a paper on Nature's official website , saying they discovered a faster sorting algorithm using deep reinforcement learning.

Basic algorithms like sorting or hashing can be used trillions of times in a day, and as computing needs grow, it's critical to make these algorithms as efficient as possible. Basic sorting algorithms have made remarkable progress in the past, but further improving the efficiency of these algorithmic routines has been challenging for both human scientists and known computational methods.

And DeepMind made a single-player game called AssemblyGame by formulating the task of "finding a better sequencing program". In this game, players need to select a series of low-level CPU instructions (assembly instructions), and then combine them to produce a new and efficient sorting algorithm.

Then DeepMind trained a new deep reinforcement learning agent "AlphaDev" to play this game. AlphaDev's main learning algorithm is an extension of the AlphaZero agent and uses a deep neural network to guide the Monte Carlo Tree Search (MCTS) planning process.

(The complete training process and detailed analysis can be read carefully in deepmind's paper )

Ultimately, AlphaDev discovered from scratch several new small sorting algorithms for sorting lists of sizes 3, 4, and 5 that outperformed known human benchmarks .

At present, these algorithms have been integrated into the LLVM standard C++ sorting library   , and the original  LLVM libc++ standard sorting 3, sorting 4, and sorting 5 algorithms are replaced by new algorithms using reinforcement learning. These basic algorithms are the basic components of the C++ sorting library . Usually Called multiple times by larger sort algorithms.

It's worth mentioning that DeepMind's commit is the first change to the LLVM libc+ sorting algorithm subroutine in over a decade  .

Guess you like

Origin www.oschina.net/news/244274/google-finds-faste-sorting-algorithm