Snake in Optimal Space and Time

Authors Philip Bille , Martín Farach-Colton , Inge Li Gørtz , Ivor van der Hoog



PDF
Thumbnail PDF

File

LIPIcs.FUN.2024.3.pdf
  • Filesize: 0.92 MB
  • 15 pages

Document Identifiers

Author Details

Philip Bille
  • Department of Applied Mathematics and Computer Science, Technical University of Denmark, Lyngby, Denmark
Martín Farach-Colton
  • New York University, NY, USA
Inge Li Gørtz
  • Department of Applied Mathematics and Computer Science, Technical University of Denmark, Lyngby, Denmark
Ivor van der Hoog
  • Department of Applied Mathematics and Computer Science, Technical University of Denmark, Lyngby, Denmark

Cite AsGet BibTex

Philip Bille, Martín Farach-Colton, Inge Li Gørtz, and Ivor van der Hoog. Snake in Optimal Space and Time. In 12th International Conference on Fun with Algorithms (FUN 2024). Leibniz International Proceedings in Informatics (LIPIcs), Volume 291, pp. 3:1-3:15, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2024)
https://doi.org/10.4230/LIPIcs.FUN.2024.3

Abstract

We revisit the classic game of Snake and ask the basic data structural question: how many bits does it take to represent the state of a snake game so that it can be updated in constant time? Our main result is a data structure that uses optimal space (within constant factors). To achieve our results, we introduce several interesting data structural techniques, including a decomposition technique for the problem, a tabulation scheme for encoding small subproblems, and a dynamic memory allocation scheme.

Subject Classification

ACM Subject Classification
  • Theory of computation → Data structures design and analysis
Keywords
  • Data structure
  • Snake
  • Nokia
  • String Algorithms

Metrics

  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    0
    PDF Downloads

References

  1. Ali Jaber Almalki and Pawel Wocjan. Exploration of reinforcement learning to play Snake game. In Proc. CSCI, pages 377-381, 2019. Google Scholar
  2. Arne Andersson and Mikkel Thorup. Dynamic ordered sets with exponential search trees. J. ACM, 54(3), 2007. Google Scholar
  3. Yuriy Arbitman, Moni Naor, and Gil Segev. Backyard cuckoo hashing: Constant worst-case operations with a succinct representation. In Proc. 51st FOCS, pages 787-796, 2010. Google Scholar
  4. Michael A Bender, Alex Conway, Martín Farach-Colton, William Kuszmaul, and Guido Tagliavini. All-purpose hashing. arXiv preprint arXiv:2109.04548, 2021. Google Scholar
  5. Michael A Bender, Martín Farach-Colton, John Kuszmaul, and William Kuszmaul. Modern hashing made simple. In Proc. 7th SOSA, pages 363-373. SIAM, 2024. Google Scholar
  6. Michael A Bender, Martín Farach-Colton, John Kuszmaul, William Kuszmaul, and Mingmou Liu. On the optimal time/space tradeoff for hash tables. In STOC, pages 1284-1297, 2022. Google Scholar
  7. Ioana O Bercea and Guy Even. Dynamic dictionaries for multisets and counting filters with constant time operations. Algorithmica, 85(6):1786-1804, 2023. Google Scholar
  8. Russell Sammut Bonnici, Chantelle Saliba, Giulia Elena Caligari, and Mark Bugeja. Exploring reinforcement learning: A case study applied to the popular Snake game. In DTMAD, 2022. Google Scholar
  9. Marzio De Biasi and Tim Ophelders. The complexity of snake. In FUN, 2016. Google Scholar
  10. Shubham Sharma, Saurabh Mishra, Nachiket Deodhar, Akshay Katageri, and Parth Sagar. Solving the classic Snake game using AI. In Proc. PuneCon, pages 1-4, 2019. Google Scholar
  11. Wikipedia. URL: https://en.wikipedia.org/wiki/Snake_(video_game_genre).
  12. Wikipedia. URL: https://en.wikipedia.org/wiki/Snake_(video_game).
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail