Correction to: Nature https://doi.org/10.1038/s41586-023-06941-5 Published online 13 December 2023

In the version of the article originally published, there was an error in the “Single-action sequence reinforcement” section of Methods regarding the duration of sessions 2 and 3 of single-action reinforcement: “A total of 90 min of closed-loop reinforcement...” should have said 60 min. In addition, the following sentence was missing at the end of the Methods section: “All materials, methods, code and software used are available at Zenodo (https://zenodo.org/records/13249956)”. The errors have been corrected in the HTML and PDF versions of the article.