OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 11:01 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: 2048
PostPosted: Sat May 31, 2014 4:49 am 
Offline
Member
Member
User avatar

Joined: Wed Aug 21, 2013 3:53 am
Posts: 449
Location: Asia, Singapore
Hi,
I wonder if you guys have seen this little game: http://gabrielecirulli.github.io/2048/
It's quite popular nowadays.

The main focus of the game is to get to the 2048 tile. It involves moving the entire 4x4 tileset left, right, up or down. Each tile in the tileset holds a number which is a power of 2. Say we have: (E stands for empty square)
Code:
2 4 2 8
E 2 2 E
8 2 4 E
E E E E

Now you've got 4 options as previously mentioned, up, left, right, down. Note that when you will push two similar numbers together on the same side they join together and sum up and a random tile (2 or 4) will spawn.
So if I move the tileset up,
Code:
2 4 4 8
8 4 4 E
E 2 E E
E E E 2 --> Random tile

The maximum I could get was 1024, with a score of 11188.
Have fun. :)

_________________
"In a time of universal deceit - telling the truth is a revolutionary act." -- George Orwell
(R3X Runtime VM)(CHIP8 Interpreter OS)


Top
 Profile  
 
 Post subject: Re: 2048
PostPosted: Tue Jun 03, 2014 2:32 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
Turns out there's a decent strategy for this game - managed to hit the 2048 twice in the last four games. (no spoilers on how to do that one yet :wink:)

_________________
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]


Top
 Profile  
 
 Post subject: Re: 2048
PostPosted: Tue Jun 03, 2014 6:51 am 
Offline
Member
Member
User avatar

Joined: Fri Mar 07, 2008 5:36 pm
Posts: 2111
Location: Bucharest, Romania
I didn't try putting my combinatorics hat on but I did play the game several times and won the last few, even managing a 4096 piece twice in a row. I won't go into tactics here (there are a few useful tricks, I've found) but my general startegy was to try to have the blocks in increasing order and always work on the smallest. Whenever forced to screw up the order (say, 256, 512, 256), I would work on the out-of-order block, to eventually unite it with its smallest neighbour. I would pretty much never go in one direction (say, up) and if I was forced to, I would then try to clean up the mess. The nice thing about this strategy is the "cascade" effect you get every now and then, when one merger leads to another.

There are probably better ways but this seemed simple and effective.

_________________
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]


Top
 Profile  
 
 Post subject: Re: 2048
PostPosted: Tue Jun 10, 2014 1:30 pm 
Offline
Member
Member
User avatar

Joined: Fri Mar 07, 2008 5:36 pm
Posts: 2111
Location: Bucharest, Romania
I am happy to report that this technique is good up to at least 8192. :)

On a related note, I also came across Evil 2048, which creates blocks in unfortunate places (managed to score 1024 after a few games), and 2048 - 3D, that I only played once and sucked at but will try again at some point (someone suggested it gets easier than the regular 2048 once you get used to it).

_________________
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]


Top
 Profile  
 
 Post subject: Re: 2048
PostPosted: Fri Jun 20, 2014 9:45 pm 
Offline
Member
Member
User avatar

Joined: Sun May 29, 2011 5:16 pm
Posts: 25
Location: Inside A Computer
Damn.. I am terrible at that game :lol:
Best I got was 1024 :(


Top
 Profile  
 
 Post subject: Re: 2048
PostPosted: Wed Jul 30, 2014 3:20 pm 
Offline
Member
Member

Joined: Fri Jan 04, 2013 6:56 pm
Posts: 98
Damn, it's so hard! I always get a nice pattern that increases, with the highest in a corner, until one lower block gets there, then it all goes to hell :P


Top
 Profile  
 
 Post subject: Re: 2048
PostPosted: Mon Sep 08, 2014 10:49 am 
Offline
Member
Member

Joined: Sat Mar 01, 2014 2:59 pm
Posts: 1146
I tried this recently - I particularly like the Android app version because I can play it on my phone but it is rather difficult once and the furthest that I got was 1024. How come is everyone going beyond 2048? Does the game not automatically end when you get to 2048?

Anyway I'm open to suggestions and hits and tips because I'm really battling with this game! (Although I have got some quite good scores a few times though, although not often though...)

_________________
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.

Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Majestic-12 [Bot] and 38 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group