0

t's been weeks (months?) since the 2048 game--by Gabriele Cirulli--took Internet by storm. I have an explicit integer $X$ which is greater or equal than any score of this game. Possibly my $X$ is the actual maximal score, I don't know, it may go either way. Thus my question: what is the maximal possible score for game 2048? (I'll provide $X$ in an answer below, as a SPOILER; it was quite straightforward to get $X$, and similar upper bounds for a way larger family of similar games). If $X$ is not sharp than sharper bounds are welcome too.

BTW, have anybody published an upper bound for 2048 on Internet or elsewere? (If there is a respective link then I'd like to see the article).


REMARK: While the earlier nice post:

  Expected halting time for "The 2^n Game" (aka 2048) -- with random moves

is related to the game 2048, this post and my question and my answer below are otherwise not related. It's nice to know about both posts, but that's all.

The other two posts mentioned provided a construction but not a proof that it provides maximum, and there is no other proof of a specific lower bound there. Their style seems to be of the type: I cannot do it better (without even attempting a mathematical proof of a bound). Please, show me in those posts that it's otherwise (a feeling that a construction is the best is not a proof).

PS:   I'd like to see a quote of an essential moment of a rigorous proof of an upper bound for a maximal tile.

I'll clarify the simple issue of an upper bound for the total sum:

Since I have my bound for the maximal tile, let me follow it with an upper bound for the total sum. Actually, it is obtained as corollary to a maximal configuration (even if such a configuration can be fictitious--nevertheless, all tiles have values not exceeding the respective tiles of the fictitious configuration).

Once again, it will be easier to consider the general templates (see the answer below) and the logarithmic notation.

Consider $\ A=A_0=A_1=\ldots$ and $\ \forall_{n=0\ 1\ \ldots}\ |A_n|=b\ $ be finite (the playing board is finite so-to-speak). Consider an arbitrary non-negative integer $n$. For each $\ x\in A_n\ $ consider one of its oldest ancestors. By permuting sets $\ A_n\ $ we may assume that $\ x\ $ itself is always its ancestor whenever there is an ancestor for $\ x.\ $ Now let $\ \xi\ $ be the set of all $\ y\in A_n\,\ $ different from $\ x,\ $ for which there is an ancestor at least as old as the one for $\ x.\ $. Then $\ x\ $ has all its ancestors in $\ A(x) := A\setminus\xi.\ $ Observe that functions (moves) preserve $\ A(x).\ $ Thus we can consider the induced template for $\ A(x)\ $ and the respective bound:

$$h_n(x)\ =\ (b-|\xi|) + S - 1$$

That's all.

REMARK The permutation argument is obvious in the context of templates while it feels messy in the special case of the game 2048.

REMARK Let me repeat what I said from the start, that the whole thing is straightforward. A simple proof when it appears in a result+proof combination can still have a value (when the theorem is significant). @Pietro's above comment is too sketchy. The @David's post math.stackexchange.com/a/902535/448 still doesn't mention some points, as simple as the whole thing is (see my comment over there at stackexchange). But anyway, a complete proof, with all essential moments was already provided by me below (and also above for the total sum), and in an extended generality. David's post simply repeats my obvious main idea--anyway, there is perhaps but one sensible way, but for details.

  • I have obtained many down-votes but this time under a thirty seconds. I deserve a special badge! – Włodzimierz Holsztyński Aug 19 '14 at 00:08
  • 5
    http://math.stackexchange.com/questions/716469/maximum-board-position-in-2048-game – NAME_IN_CAPS Aug 19 '14 at 00:51
  • I used to teach Finite Mathematics, a section about Markov chains. I prepared a special game which would illustrate the topic--and, why not, would be entertaining. Instantly a student objected. He wanted serious things... I could present an $n\times x\ $ game. (and I will). Would it make it research? Do I have to say suchn things explicitly that a generalization should be expected? A lowering the upper case may present obstacles (don't confuse them with my Archimedes obstructions in dimension 6 :-) which are worthwhile to address; both in general and in the popular case, as an illustration. – Włodzimierz Holsztyński Aug 19 '14 at 00:55
  • 3
    http://www.reddit.com/r/2048/comments/214njx/highest_possible_score_for_2048_warning_math – Daniel Soltész Aug 19 '14 at 00:59
  • CAPS and Daniel, thank you for the links. I have certain difficulties to read them with full understanding (my fault). I'll present a clean proof for the upper bound $X$, while the construction of the maximal game perhaps must be at least a bit messy (I'll not plan to do it at this time). – Włodzimierz Holsztyński Aug 19 '14 at 01:07
  • 2
    See also http://mathoverflow.net/questions/160703/expected-halting-time-for-the-2n-game-aka-2048-with-random-moves – Gerry Myerson Aug 19 '14 at 01:36
  • TYPO: read above upper case may... as upper bound may.... – Włodzimierz Holsztyński Aug 19 '14 at 03:31
  • Douglas Zare's answer at http://mathoverflow.net/questions/160703/expected-halting-time-for-the-2n-game-aka-2048-with-random-moves makes this question superfluous. – S. Carnahan Aug 19 '14 at 07:31
  • @S.Carnahan: That answer merely gives the trivial upper bound and is certainly not a complete solution. This question is neither an actual duplicate of the older question, nor does Douglas Zare's answer completely answer this question. – Eric Wofsey Aug 19 '14 at 07:37
  • 4
    I think it is quite obvious that no power higher than $2^{17}$ can appear, because to create it, all lower powers of 2 must be there together at some moment, starting by a 4, plus an additional 4 as a last entry to start the doubling process. On the other hand, a bustrophedon sequence of increasing powers may actually be done, if one is lucky enough, allowing to reach $2^{17}$. – Pietro Majer Aug 19 '14 at 07:43
  • Never mind, I see that the trivial upper bound was shown to be sharp in the MSE post linked in the second comment. Strictly speaking I would say this post should be closed as a duplicate of that MSE question, but I assume that is not possible. – Eric Wofsey Aug 19 '14 at 07:43
  • @EricWofsey To be more precise, Douglas Zare mentioned the magic words "binary expansion" which, when invoked, make the question rather trivial. – S. Carnahan Aug 19 '14 at 10:40
  • @Pietro: if it's quite obvious then prove it. – Włodzimierz Holsztyński Aug 19 '14 at 15:09
  • @S.Carnahan: there is a difference between magic and illusion, as well as between a *proof* and an impression. – Włodzimierz Holsztyński Aug 19 '14 at 15:33
  • I put up a quick proof that $2^{16}$ is an upper bound on the math.SE with only $2$'s on the math.SE thread. Similarly, $2^{17}$ is an upper bound with $2$'s and $4$'s. I agree that the state of that thread is a little embarrassing; I'm not sure that anyone has given a proof that $2^{17}$ is achievable. – David E Speyer Aug 19 '14 at 15:49
  • @David: could you provide a link to your upper bound proof? – Włodzimierz Holsztyński Aug 19 '14 at 15:59
  • http://math.stackexchange.com/a/902535/448 – David E Speyer Aug 19 '14 at 16:13
  • @Pietro and some others: the bound on the total sum of tiles as given by the consecutive powers of 2: $\ 4+8+\ldots+2^17 =2^18-4\ $ can naturally obtained AFTER one proves the upper bound on the maximal tile. Can you prove the bound on the total sum at the same time and before you get a bound on the maximal tile? – Włodzimierz Holsztyński Aug 19 '14 at 16:47
  • 1
    Maybe just proving by induction: "in the process to create $2^n$, at some moment, at least $n-1$ cells must be occupied". Thus $2^{18}$ is not possible. Since two $2^n$'s are needed to create $2^{n+1}$ the induction seems to work. – Pietro Majer Aug 19 '14 at 18:07
  • 1
    however, I agree that making everything rigorous leads to considerations similar to those in your proof. Apologies. – Pietro Majer Aug 20 '14 at 15:07
  • @Pietro, thank you (no problem :-). You and others are right that the problem was easy to solve. On the other hand the generalizations of the game 2048 are mathematically appealing (to me). I am even thinking about other games which are based on sliding and merging. This time they would have a strong number theory flavor. (Would they be still fun to play by the *general* public, like 2048?--I doubt it :-) – Włodzimierz Holsztyński Aug 21 '14 at 03:37

1 Answers1

1

 |
 |
 |
 v   SPOILER
 |
 |
 |
 |
 v   SPOILER
 |

The game 2048 is played on a 4x4 board. At each turn a tile which has value 2 or 4 is set on an empty square (by a random program or by a Player 0); then an Internaut (Player 1) uses one of the directional buttons to merge some pairs of tiles of equal value $2^k$ (within each proper pair) so that such a pair is replaced by a new tile of value $2^{k+1}$. The exact description is easily obtained on Internet. The goal is to obtain a tile which has a maximal value (the sum of tiles is considered too as a tie-break; I'll ignore here this auxiliary goal).

We assume here that the two players 0 and 1 cooperate(!) as best as possible.

Thus each tile has a value which is a power of 2 which makes sense psychologically but I will use a logarithmic scale. Thus in the logarithmic version I'll talk about checkers (instead of tiles), and about their degree or height (instead of value). Then the height of the merging checkers will increase by 1 (instead of tiles being multiplied by 2). And there will be no checkerboard :-) -- see the details just below.

I'll introduce a notion of template which can be associated with many similar games, and which easily provides an explicit bound on the maximal score (possibly not sharp). Let $S\in\mathbb R$ be an arbitrary fixed real. A template is a pair of two sequences (of moves and heights):

$$m_k : A_k\rightarrow A_{k+1},\quad h_k : A_k \rightarrow \mathbb R\quad(k=0\ 1\ ...)$$

such that:

  • $\ \sup(h_0)\ \le\ S$
  • $\ \forall_{k>0}\forall_{x\in A_k}\ (m_{k-1}^{-1}(x)=\emptyset\ \Rightarrow\ h_k(x) \le S)$
  • $\ \forall_{k>0}\forall_{x\in A_k}\ \left(\ m_k^{-1}\left(x\right)\ne\emptyset\ \Rightarrow\ h_k\left(x\right) \le \sup \left(h_{k-1}|\,\,m_{k-1}^{-1}\left(x\right)\right)\ +\ \min\!\left(2,\ \left|m_{k-1}^{-1}(x)\right|\right) - 1\ \right)$

When $\ 0\le k\le n\ $ and $\ x\in A_n$, let's introduce the ancestors:

$$p_k(x) := (m_{n-1}\circ\ \ldots\ \circ\ m_k)^{-1}(x)$$

In particular, $\ p_n(x) = \{x\}\ $ for every $\ x\in A_n$. An upper bound for games similar to 2048 follows immediately from the following simple observation about the maximal size of a generation of ancestors, defined as follows:

$$\forall_{x\in A_n}\ \pi(x)\ :=\ \max_{0\le k\le n} |p_k(x)|$$

Of course $\ \pi(x) \ge 1$.

Theorem: $$\forall_{n=0\ 1\ \ldots}\forall_{x\in A_n}\quad h_n(x)\ \le\ \pi(x) - 1 + S$$

or equivalently:

$$\forall_{n=0\ 1\ \ldots}\forall_{x\in A_n}\quad \pi(x)\ \ge\ h_n(x) + 1 - S$$

Proof (by induction on $n$):   The theorem holds when $\ h_n(x)\le S$ Now assume that the theorem holds whenever $\ h_n(t)\le S+n-1,\ $ where $n$ is a positive integer. Thus let's consider an arbitrary $x$ such that $\ h_n(x) \le S+n,\ $ where $n$ is still an arbitrary positive integer. If necessary we may go down the line of single ancestors so that we end with an ancestor $x'$ for which $\ h_n(x')=h_n(x) \le S+n\ $ for which has at least to different parents $\ y\ z\in A_k\ $ in the respective previous set. Looking still at older generations, one of the parents, say $y$, has ancestors at least as old as the other one, $z$. Thus:

$$\pi(x)\ \ge\ 1 + \pi(z) \ge 1 + (h_n(z) + 1 - S)\ \ge\ 1 + (h_n(x) - S)\ =\ h_n(x) + 1 - S$$

End of the proof.

Now we get the promised upper bound:

Corollary Let b be a non-negative integer (a finite cardinality) such that $\ \forall_{n=0\ 1\ \ldots}\ |A_n| = b$. Then:

$$\forall_{n=0\ 1\ \ldots}\forall_{x\in A_n}\quad h_n(x)\ \le\ b-1+S$$

Application to the game 2048:   We may set $\ S := 2 =\log_2(4)\ $ and $\ b:=16.\ $ Then the logarithmic bound is $16 - 1 + 2\ =\ 17$ or the standard (exponential) game-2048 upper bound for any single (maximal) tile is $\ 2^{17}$.

One could discuss a bit how and when a game ends but this answer is already long enough.

  • 1
    An associattion. In the early days of Internet I have posted my original proof of the Euclid theorem of the infinitude of primes. On each of the mentioned fora people immediately reacted that my proof was not new. Each time it turned out that they vaguely recalled the proof which shows that Fermat numbers $2^{2^n}+1$ are relatively prime while my proof was based on Mersenne primes--an essentially different type of an argument. – Włodzimierz Holsztyński Aug 19 '14 at 15:42