IDEAS home Printed from https://ideas.repec.org/a/nat/nature/v618y2023i7964d10.1038_s41586-023-06004-9.html
   My bibliography  Save this article

Faster sorting algorithms discovered using deep reinforcement learning

Author

Listed:
  • Daniel J. Mankowitz

    (Deepmind)

  • Andrea Michi

    (Deepmind)

  • Anton Zhernov

    (Deepmind)

  • Marco Gelmi

    (Deepmind)

  • Marco Selvi

    (Deepmind)

  • Cosmin Paduraru

    (Deepmind)

  • Edouard Leurent

    (Deepmind)

  • Shariq Iqbal

    (Deepmind)

  • Jean-Baptiste Lespiau

    (Deepmind)

  • Alex Ahern

    (Deepmind)

  • Thomas Köppe

    (Deepmind)

  • Kevin Millikin

    (Deepmind)

  • Stephen Gaffney

    (Deepmind)

  • Sophie Elster

    (Deepmind)

  • Jackson Broshear

    (Deepmind)

  • Chris Gamble

    (Deepmind)

  • Kieran Milan

    (Deepmind)

  • Robert Tung

    (Deepmind)

  • Minjae Hwang

    (Google)

  • Taylan Cemgil

    (Deepmind)

  • Mohammadamin Barekatain

    (Deepmind)

  • Yujia Li

    (Deepmind)

  • Amol Mandhane

    (Deepmind)

  • Thomas Hubert

    (Deepmind)

  • Julian Schrittwieser

    (Deepmind)

  • Demis Hassabis

    (Deepmind)

  • Pushmeet Kohli

    (Deepmind)

  • Martin Riedmiller

    (Deepmind)

  • Oriol Vinyals

    (Deepmind)

  • David Silver

    (Deepmind)

Abstract

Fundamental algorithms such as sorting or hashing are used trillions of times on any given day1. As demand for computation grows, it has become critical for these algorithms to be as performant as possible. Whereas remarkable progress has been achieved in the past2, making further improvements on the efficiency of these routines has proved challenging for both human scientists and computational approaches. Here we show how artificial intelligence can go beyond the current state of the art by discovering hitherto unknown routines. To realize this, we formulated the task of finding a better sorting routine as a single-player game. We then trained a new deep reinforcement learning agent, AlphaDev, to play this game. AlphaDev discovered small sorting algorithms from scratch that outperformed previously known human benchmarks. These algorithms have been integrated into the LLVM standard C++ sort library3. This change to this part of the sort library represents the replacement of a component with an algorithm that has been automatically discovered using reinforcement learning. We also present results in extra domains, showcasing the generality of the approach.

Suggested Citation

  • Daniel J. Mankowitz & Andrea Michi & Anton Zhernov & Marco Gelmi & Marco Selvi & Cosmin Paduraru & Edouard Leurent & Shariq Iqbal & Jean-Baptiste Lespiau & Alex Ahern & Thomas Köppe & Kevin Millikin &, 2023. "Faster sorting algorithms discovered using deep reinforcement learning," Nature, Nature, vol. 618(7964), pages 257-263, June.
  • Handle: RePEc:nat:nature:v:618:y:2023:i:7964:d:10.1038_s41586-023-06004-9
    DOI: 10.1038/s41586-023-06004-9
    as

    Download full text from publisher

    File URL: https://www.nature.com/articles/s41586-023-06004-9
    File Function: Abstract
    Download Restriction: Access to the full text of the articles in this series is restricted.

    File URL: https://libkey.io/10.1038/s41586-023-06004-9?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    As the access to this document is restricted, you may want to search for a different version of it.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:nat:nature:v:618:y:2023:i:7964:d:10.1038_s41586-023-06004-9. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Sonal Shukla or Springer Nature Abstracting and Indexing (email available below). General contact details of provider: http://www.nature.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.