Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Once you know the basic strategy/naive algorithm behind winning it becomes easy to get to much higher than 2048.

1) Swipe left until nothing else moves

2) Swipe down until nothing else moves

3) (If an empty space) Swipe up once

4) Repeat from 1.

There will only be a few times that you have to stop this process to get "unstuck".



For what it's worth, that's also what I do. But is it optimal? :)

The source code is leading the blog posts [1], so I think I already have an answer to that question for games on 2x2 and 3x3 boards using Markov Decision Processes, but the approach doesn't scale to the 4x4 board.

[1] https://github.com/jdleesmiller/twenty48


Most likely not optimal but it certainly can be done without looking at the screen while watching Netflix :P




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

Search: