16

Games got me on math. I always want to play best.

I don't know how to answer my question. My question is : How to show that the game 2048 is (always) solvable>? Is there any method other than brute force?

There is a sudko grid and you use arrow keys to move even number, starting near 2, around so that combine to value 2048. Play, it is very fun.

Yiyuan Lee
  • 14,435
yiyi
  • 7,352
  • 1
  • 2
    http://gabrielecirulli.github.io/2048/ – Adriano Mar 21 '14 at 03:40
  • 2
    http://jennypeng.me/2048/ this is always solvable. I assure you. – Guy Mar 21 '14 at 03:55
  • I am not sure why this has unclear what you are asking close votes. The question is very clear. – Guy Mar 21 '14 at 03:57
  • It would be nice though, to have a rigorous and mathematical proof of its solvability. – Yiyuan Lee Mar 21 '14 at 03:58
  • @Sabyasachi Is that the FF IV DS victory fanfare I hear? – Doug Spoonwood Mar 21 '14 at 03:59
  • @YiyuanLee yes exactly. Much like a rubik cube(somewhat). My link is always solvable. Check it. :D – Guy Mar 21 '14 at 03:59
  • Is this a graph theory problem? – Doug Spoonwood Mar 21 '14 at 04:00
  • @DougSpoonwood yes FF IV DS I presume. I have no idea about graph theory. The question is unclear on how to solve it. But again, if that were a prerequisite very few people would ask questions anyway. – Guy Mar 21 '14 at 04:01
  • and just in case you want more, http://doge2048.com at your own risk. – Guy Mar 21 '14 at 04:05
  • @Sabyasachi I think a solution would consist of a sequence of arrow selections which leads to 2048. We'd have to know the pattern of numbers that appear after each move to know if every game can get solved. – Doug Spoonwood Mar 21 '14 at 04:08
  • More than likely, this game is not always winnable. There is probably a random sequence of "2" drops that forces the player into an unwinnable position. – DanielV Mar 21 '14 at 06:10
  • @yiyi Btw I believe you mean "winnable". The game is obviously solvable since it is finite. Whether it can be won is a different question. – DanielV Mar 21 '14 at 06:11
  • @DanielV I am not good at English. Mathematically what is the difference between winnable and solveable? – yiyi Mar 21 '14 at 06:18
  • @Sabyasachi what is FF IV DS I? – yiyi Mar 21 '14 at 06:18
  • Solvable means you can know the winner. Winnable means you can be the winner. – DanielV Mar 21 '14 at 06:24
  • @yiyi I meant "FF IV DS" it is a video game, the music is from that game. "Solvable" means the game can come to an end. Techincally losing counts as solving too. You meant "winnable" of course. – Guy Mar 21 '14 at 06:25
  • @Sabyasachi, oh. Thank you. Is there a method to prove this game is winnable? – yiyi Mar 21 '14 at 06:26
  • @yiyi I don't know. – Guy Mar 21 '14 at 06:26
  • @Sabyasachi I dont too – yiyi Mar 21 '14 at 06:28
  • 4
    Problem can be posed more generally: When the game is won at small values (like 16) it is always winnable, but at some point must become unwinnable, as some numbers are too large to be made on the board. Given a board of dimensions $n \times m$, what is the smallest target value at which the game cannot be won? – Jonny Lomond Mar 21 '14 at 22:20
  • Also, maybe you can get some sense of the answer by playing this: http://sztupy.github.io/2048-Hard/ – Jonny Lomond Mar 21 '14 at 22:23
  • To see all the variants, go to http://get2048.com at your own risk. – Memming Mar 22 '14 at 02:01
  • Certainly the largest number you can get is $2^{17}$, and this assumes pretty much perfect random draws, as you have to end up with a chain $4,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,131072$. – Alex Becker Mar 24 '14 at 04:46
  • 4
    According to Zermelo's theorem, because 2048 is a finite game with perfect information, a winning strategy exists for either the computer or the player (where the computer is said to "win" if the player does not win).

    Zermelo's theorem is constructive, and gives a way to determining who has the winning strategy, but it would be computationally intensive. There are very few general tools that are known for these kinds of problems.

    If you want to see what the game looks like when the computer places tiles intelligently, see: http://sztupy.github.io/2048-Hard/

    – Marcel Besixdouze Apr 06 '14 at 06:27
  • @MarcelT. it isn't perfect information though is it? The tiles are randomly placed with different numbers possible with varying probabilities(4 10% of the time and 2 otherwise). – ruler501 Apr 09 '14 at 19:28
  • To make it a perfect information game, of course you assume the computer is always allowed to place either a 2 tile or a 4 tile and that the computer is allowed to place it anywhere. Perfect information means you are allowed to look at the board before you make your move, and that you know what moves your opponent is allowed to make. – Marcel Besixdouze Apr 14 '14 at 04:12

2 Answers2

8

On the contrary, I think the game is not solvable. You can get convinced of it by taking a look here: http://sztupy.github.io/2048-Hard/ It is the same game, except that randomness is replaced by the worst possible choice for new tiles to appear. It seems obvious after a little practice that this version is impossible, and it just corresponds to being unlucky in the original game. A rigorous proof that this version is impossible will likely be very tedious though...

Denis
  • 6,945
  • 1
  • 21
  • 22
4

It was claimed that the 2048-game is NP-hard in this arXiv preprint: http://arxiv.org/pdf/1501.03837v1.pdf