News
DeepMind AI Sorting Algorithm Sorts Data Faster Than Other Algorithms
Google Deep Mind has developed an artificial intelligence algorithm that can play games like chess and Go. Yeah, ok, this isn’t new info. We’ve been battling AI in complex abstract strategy games for years, beginning famously with Deep Blue vs. Gary Kasperov back in the mid-90s.
However, the gaming part isn’t the talking point here – that’s not the only thing Deep Mind does. As recently discovered during development it can also perform sorting which, when translated to traditional C++ code, outperforms previous sorting algorithms developed by humans throughout the development of computer science. You read that right – Deep Mind developed its own sorting algorithm, and it’s faster than anything we’ve created ourselves.
DeepMind AI’s self-developed sorting algorithm could potentially offer new insights into sorting algorithms which can outperform traditional computer algorithms like Quick sort.
Sorting algorithms have been a focus for computer scientists for decades. From bubble sort and selection sort to more advanced programs like merge and quick sort. An improved sorting algorithm means not only faster data sorting, but also more efficient use of resources, ultimately allowing greater capacity for other tasks. But, with rapid development of Google DeepMind AI based in London, traditional sorting algorithms may soon be retired.
The new algorithm, known as AlphaDev, allowed DeepMind to test new ways of sorting elements. The team built the algorithm on top of the technology used for its AI algorithm AlphaZero which has shown success in mastering games of chess, shogi and Go.
The new experiment, featured in a research paper published in Nature, is already part of two C++ libraries and is already being used by developers all over the world.
Sorting Numbers
Initially, DeepMind AI sorting algorithm was used to sort simple numbers by their size.
Initially, the program was only tasked with sorting 3 to 5 numbers at a time. This is important because AlphaDev operates at an assembly level of instructions.
That means that the code is generated by automated compilers of code humans write such as C++ and is then translated into machine language – 1s and 0s.
AlphaDev is more successful at sorting quick sequences of number as it achieves 70% increased efficiency.
It is also 1.7% more efficient for sequences that surpass 250,000 elements as opposed to sorting algorithms that are part of the C++ standard libraries.
In other words, when a user submits a sorting query, DeepMind AI sorting algorithm will conduct a faster sorting process, which can save both time and resources once it’s employed on large scale projects.
Reinforcement Learning
AlphaDev can compare values, move values between different locations or jump to a different instruction of a program.
Every time the algorithm takes a new step, it will try to sort a set of list and for each successful sort, it’ll be rewarded, thanks to the machine learning algorithm known as reinforcement learning.
The system will play this game with rewards until all elements are sorted correctly, or the program length limit has been reached. In case of the latter, the game is restarted and the algorithm starts sorting again.
DeepMind AI sorting algorithm also tried to solve algorithms that are not related to sorting.
It was also used on hash data structures, and tested to convert data from one format into bytes which took 67% less time compared to a human-written version of the algorithm.
The researchers believe that DeepMind AI sorting algorithm could be applied to more problems, even into the hardware design code, Daniel Mankowitz, a computer scientist at DeepMind who led the research said in a statement to Nature. “We really want to be tackling the whole stack.”


