Live data from Hacker News

2048

gabrielecirulli.github.io

191–200 of 423 posts

Re: 2048

#191
Quick and dirty 'dumb' solver (might require manual intervention sometimes):

		var manager = new GameManager(4, KeyboardInputManager, HTMLActuator);

		// Pattern definition (0: Up, 1: Right, 2: Down, 3: Left)
		var pattern = [1, 2, 3, 2];

		// Pattern Repeater
		var i = 0;

		// Interval
		var solverInterval = window.setInterval(function() {

			// Check if game is over
			if (manager.over)
				clearInterval(solverInterval);

			// Repeat pattern
			if (i % pattern.length == 0)
				i = 0;

			// Execute the move
			manager.move(pattern[i]);

			i++;

		}, 200);
Best pattern found so far is "var pattern = [1, 0, 3, 0];" I reached 1024 with it. https://dl.dropboxusercontent.com/u/21387598/1024-Best.png

Re: 2048

#192

Hey, author here! I'm pretty overwhelmed that this made it to the top of HN without me even thinking of posting it here :) I made this game as a fun weekend project, inspired by another game called 1024 ( https://itunes.apple.com/us/app/1024!/id823499224 ) and a spinoff called 2048 ( http://saming.fr/p/2048/ ). I did mine to add animations to the latter, which was a bit hard to play without them. I discovered Threes…

I can't tell if I despise you or admire you, all I know is that there was light outside my window when I first began playing this, and now it's pitch dark.

Upvoted you to show my anger! :)

Re: 2048

#193
While we are throwing around clones of threes, here is my SEXY clone of titled Menage a Threes. Heh. http://www.kongregate.com/games/honkskillet/menage-a-threes

Also, protip: to get high score choose one direction that you will never push towards. You'll end up with a gradient of high value tiles on one side, lower on the other, which desirable.

Re: 2048

#194
I decided to take a look just because I saw this:

    2048 (gabrielecirulli.github.io) 
    1337 points by frederfred 8 hours ago

Re: 2048

#197

Earlier quoted context omitted.

You definitely need to have some kind of counter for how many times someone has reached 2048, and out of how many games played.

Or an expansion on that. Keep track of how many 128s, 256s etc you've ever formed. Show them as big counters directly under the game with an animation when you create any of them.

Log scale histogram?

Edit:

Actually all you need to store is the highest block achieved, and the number of times it's been hit. For instance, if you've only ever generated 2 8's, then you know that you've had 4 4's, and 8 2's...

Edit 2: Does the game allow four 2's to cascade into an 8? If so, maybe you could also store combo stats. It'd be way cooler to smash together four 256's than to smash together two 256's two times.

Not sure how that plays into the histogram.

Re: 2048

#198
post #177
post #82

Earlier quoted context omitted.

I'm gonna call fake on this one.

There's actually a semi-optimal strategy that nearly guarantees winning if you're diligent about it. Just build a stairstep pattern with the highest numbers in the bottom corner of the stairs. Then basically combine sideways and downward and "always" resist the temptation to push up. Its kind of how some tri-diagonal matrix algorithms work. The only problem is you have to be fastidious about never using the one direc…

I was surprised at how well that worked. I was basically blindly cycling between left,down,right (with one accidental up) and got to 1024 on my first try.
Post reply on HN