
The Mathematics of 2048: Counting States by Exhaustive Enumeration - jdleesmiller
http://jdlm.info/articles/2017/12/10/counting-states-enumeration-2048.html
======
maweki
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.

~~~
ballenf
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.

~~~
jdleesmiller
(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.

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

~~~
TimTheTinker
Here’s a very simple but clever 2048 game playing AI:
[https://ronzil.github.io/2048-AI/](https://ronzil.github.io/2048-AI/)

------
bhouston
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...](https://www.cs.carleton.ca/sites/default/files/tr/TR-04-10.pdf)

~~~
MaxBarraclough
That URL spooks Firefox - invalid HTTPS cert.

Warning-free URL:
[https://service.scs.carleton.ca/sites/default/files/tr/TR-04...](https://service.scs.carleton.ca/sites/default/files/tr/TR-04-10.pdf)

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

~~~
jdleesmiller
Most of them are done with the `dot` tool from
[https://www.graphviz.org/](https://www.graphviz.org/) . A ruby script
generates the dot file, e.g.
[https://github.com/jdleesmiller/jdleesmiller.github.io/blob/...](https://github.com/jdleesmiller/jdleesmiller.github.io/blob/master/assets/2048/enumeration_2x2_grouped.dot),
and then dot generates the SVG.

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

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

~~~
jameshart
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.

