Live data from Hacker News

2048 AI

ov3y.github.io

101–110 of 197 posts

Re: 2048 AI

#102
post #17

Is this game always guaranteed to be winnable, or is it like Solitaire?

I would go with Solitaire sine mine just lost. Did reach 1024 though.

That just means that this particular AI isn't capable of winning all the time. It doesn't tell us weather a theoretical perfect player could always win.

Re: 2048 AI

#103

I'm running some trials here and keeping track of the results with this AI. I'll edit this when I have the data to provide the information. Something that occurred to me is that "score" and "winning" can have different optimizations. Score is based upon combining blocks, where as winning is based upon reaching the 2048 block. This means the game can be optimzed in two different ways: 1) To maximize score, wherein you…

Looks like I can't edit this anymore, but here are the results of a few trials.

http://i.imgur.com/4rqdhQQ.jpg

3/10 games were won. Of these three, the lowest score was 12268, with only 8, 4, and 2 tiles left on the board (aside from the 2048 tile, obviously). The highest score of all was also the first game to be won with a score of 13404. This was also the least "efficient" game to be won, with 10 other tiles left on the board aside from 2048.

Re: 2048 AI

#104
I'm consistently scoring higher than 2,500, and frequently as high as 3,500 with a tile of 512, by doing this:

1. Up

2. Right

3. Down

4. Left

5. Go to 1.

That loop scores better than my trying.

Re: 2048 AI

#105
post #104

I'm consistently scoring higher than 2,500, and frequently as high as 3,500 with a tile of 512, by doing this: 1. Up 2. Right 3. Down 4. Left 5. Go to 1. That loop scores better than my trying.

I got up to 9,000 with:

left, down, right, down, (repeat)

Re: 2048 AI

#106
post #82
post #53

Earlier quoted context omitted.

When playing against a random opponent, sometimes it will "accidentally" make the best possible move. In chess, this might be extremely unlikely, as there are so many possible moves: the probability that, of all the pieces on the board, with all of the positions it could have made, that it would stumble upon a move that devastates your position--especially considering that often multiple correct moves must be perform…

My impression is that you don't understand how these things work, so I'll start from the basics; apologies if wrong. First off, the chess counter-example was in response to something general ovolve said about 'all minimax algos'. More broadly, in practice the issue is that you only have computational resources to search a fraction of possible game states. So where do you direct your limited resources? Some candidate…

I am having a difficult time figuring out how to respond to this comment given that the assumption going into this conversation is that you are wrong and we are only interested in figuring out why you are wrong. For avoidance of doubt, we are assuming you are wrong because ovolve claimed to have implemented an algorithm matching your description, that implementation was available for your perusal (it is only commented out, not deleted), and it didn't actually work better. Your comments, however, seem to continue to operate from the assumption that you are correct.

Also, while I do not have the background you do with search functions, I didn't feel like my comment (which I saw as offering an idea more than a proof: a comment about intuitions based on having wasted way way too much time playing 2048 yesterday and from being in the chess club at a different time in my life) warranted the "let me teach you the basics" paragraph, especially under the "we are working together to figure out why you are wrong" assumption. I am sufficiently confused by these differing approaches to the conversation as to not be certain how to proceed.

Like, "huh, ok, if you had a different idea for why you are wrong, what would it be?" is all I can come up with, but I don't think that fits your side of this interaction. (Maybe, if you simply feel you aren't wrong, you could look at ovolve's code and find something "wrong"/suboptimal with his algorithm? I assumed you had already done this, given the context, but maybe not? Clearly my assumptions are failing here.) I think I will just bow out, actually get some work done, and maybe ask my friends (whom have much more experience in this space than, to my belief, either of us) to explain this to me later ;P.

Re: 2048 AI

#109
post #104

I'm consistently scoring higher than 2,500, and frequently as high as 3,500 with a tile of 512, by doing this: 1. Up 2. Right 3. Down 4. Left 5. Go to 1. That loop scores better than my trying.

Easy to implement in an AI as well. Could try various permutations and see which works best fairly trivially then too, eg up down left right / up left down right / up left right down etc...

Re: 2048 AI

#110

Is this game always guaranteed to be winnable, or is it like Solitaire?

The game isn't a stacked deck in that the outcome can be determined but there is a specific point in the game where you are guaranteed to only have a few tiles available (ex: 1024 + 512 + 256 + 128 + 64 + 32 + 16 + 8 yields half the board) and you may or may not need a 2 to continue when the random selects a 4 locking your 2 in a corner or other similar manner.

I can't speak on statistics but I had best luck when following a set of heuristic rules that minimized the chances of locking valuable tiles in an unreachable location. If you stack the higher value blocks to a corner you're less likely to trap them with lower value blocks that are almost impossible to reach.

Ultimately I think the game is a better comparison to minesweeper where there are rules that will help you progress but at some point you're forced to guess and hope the outcome is in your favor.

Post reply on HN