Hacker News new | comments | show | ask | jobs | submit login
The Mathematics of 2048: Counting States by Exhaustive Enumeration (jdlm.info)
150 points by jdleesmiller 11 months ago | hide | past | web | favorite | 22 comments



This is neat. I wonder whether there is a faster approach using binary decision diagrams or a variant thereof. If the state transition were represented by a binary function, BDDs could allow for counting states without actually enumerating. The question would be, how to actually find all the fixed points of that function.


I'd also think that working backwards from all possible winning states would offer some insight and potential for speed. At the expense of being somewhat more difficult (at first glance anyway) to ascertain validity of the predecessor state.


(Author here.) That would indeed be interesting, thanks --- I don't think it's trivial to generate all of the possible predecessor states, but it seems like it should be possible. One to think about.


Would be interesting to see alpha zero trained on 2048, conv nets seem well suited for this kind of game.


Here’s a very simple but clever 2048 game playing AI: https://ronzil.github.io/2048-AI/


This is likely to be a piece of cake for alpha zero given the number of states are lot less than Go.


I would like to see how high it could get to, how much higher than 2048 could it go?


I assume you are talking about the highest tile value, I think in 4x4 game the highest possible tile value should be 2^16 or 2^(16+1)

I got this from here - https://puzzling.stackexchange.com/questions/48/what-is-the-...


Neat. Seems a lot harder than the work I did to enumerate towers of Hanoi back in 2004:

https://www.cs.carleton.ca/sites/default/files/tr/TR-04-10.p...


That URL spooks Firefox - invalid HTTPS cert.

Warning-free URL: https://service.scs.carleton.ca/sites/default/files/tr/TR-04...


Whats the network/gra[h library you used to draw those nice diagrams ?


Most of them are done with the `dot` tool from https://www.graphviz.org/ . A ruby script generates the dot file, e.g. https://github.com/jdleesmiller/jdleesmiller.github.io/blob/..., and then dot generates the SVG.


Oh,I misread this title and thought it was going to be about maths in the year 2048.


Me too. I kind of expected a dystopian article where people in 2048 are so badly educated that the most advanced math they can do is count U.S. states one by one!

Kind of disappointed it's not that, to be honest :)


I was expecting a maths where quantum computation had taken over analytic number theory and theorems could be proved using brute force enumeration.Or something


Quantum computers can't do that. Not even in principle. :p


If you take just one piece of information from this blog: Quantum computers would not solve hard search problems instantaneously by simply trying all the possible solutions at once

(The subtitle of Aaronson's blog.)

https://www.scottaaronson.com/blog/


And that they were counting (US) states by exaustive enumeration. Well, yeah, how are you going to count them?


First, capture, tag, and release a number of US senators. 15 or so should work. Then, reset your traps and capture some more. Count how many of the second capture set were tagged in the first group. This tells you what proportion of the population of Senators you captured the first time, and by dividing the number of senators you tagged by this proportion you can estimate the total population of senators. Divide that number by two to obtain the number of states.


Knowing that a bijection exists between states and stars on the US flag, first obtain a US flag. Observe that the stars in the top left corner fall in a rectangular n x m grid with stars located at every node, and also in the rows and columns in between, forming a smaller (n-1) x (m-1) rectangle, so the number of stars is nm + (n-1)(m-1). Then you can just count n and m - 6 and 5 respectively - and substitute to obtain 30+20=50 stars.


Yeah sorry working on that one now. Stay tuned though!


I don't think it needs to be changed. It's actually really interesting to wonder what Mathematics is going to be like in 2048.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: