Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  AI Challenge: '2048'  (Read 8587 times)
0 Members and 1 Guest are viewing this topic.
Offline HeroesGraveDev

JGO Kernel


Medals: 238
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Posted 2014-03-12 07:41:28 »

Found this extremely addicting puzzle.

Anyone want to have a go at creating a solver?

Bonus points if the algorithm is able to be performed by a human.

Source code, if needed

Online Rayvolution

JGO Kernel


Medals: 141
Projects: 2
Exp: 1 year


Resident Crazyman


« Reply #1 - Posted 2014-03-12 08:00:11 »

fun little game, I got all the was to a score of 6932, with a 512 block and a 256 block on the board. Tongue

Was well on my way to a 1024 block but everything fell apart on me. Sad

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Survival Sim/Builder/Roguelike!
LIVE-STREAMING DEVELOPMENT: http://www.twitch.tv/SG_Rayvolution
Offline Grunnt

JGO Wizard


Medals: 64
Projects: 8
Exp: 5 years


Complex != complicated


« Reply #2 - Posted 2014-03-12 08:29:40 »

Yeah its an awesome game concept, I love it. Could not get very high, though.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline LiquidNitrogen
« Reply #3 - Posted 2014-03-12 09:24:34 »

"This Precious Land" is a similar concept which was more enjoyable to play
http://ishisoft.com/archives/884
Offline digdugdiggy

Senior Newbie





« Reply #4 - Posted 2014-03-12 10:03:39 »

I'm finding it very hard to even understand how to solve the puzzle, let alone program something to do it for me.

There seems to be a somewhat random element in that after every move, a random block is chosen (of all blocks, including those with 2's already and excluding those with 4 and above), then a 2 is placed there.
Sometimes this will make it look like a 4 was spawned.

Currently, my bot would spam WASDWASDWASDWASD. I have gotten over 5000 points with that method, though sometimes its as low as 2000.
Offline kpars

JGO Wizard


Medals: 75
Projects: 4
Exp: 3 years


Radirius Software Developer


« Reply #5 - Posted 2014-03-12 10:24:22 »

I don't need a bot, I can just mash WASD and the Arrow Keys to get a score of 3000  Cool

Seems like a hackers' version of QWOP Grin
But the game seems really interesting. I may give the AI a try here in a few.

- Jev

Check out #JGO on EsperNet IRC! | Check out the MERCury 2D Java Game Library! | Also, Check out My Site
Online princec

JGO Kernel


Medals: 339
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #6 - Posted 2014-03-12 10:42:13 »

Great little game.

Cas Smiley

Offline Agro
« Reply #7 - Posted 2014-03-12 18:07:47 »

Looks like some guy already solved it on Hacker News http://ov3y.github.io/2048-AI/

Online Drenius
« Reply #8 - Posted 2014-03-12 18:33:11 »

@Agro: It got 1024 for me...
Offline opiop65

JGO Kernel


Medals: 153
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #9 - Posted 2014-03-12 18:49:51 »

I only managed to get 1480 without a bot :/ Oh well!

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline trollwarrior1
« Reply #10 - Posted 2014-03-12 18:50:56 »

I only managed to get 1480 without a bot :/ Oh well!

mmm how do you get such tile? I mean, only multiples of 2 are possible..
Offline opiop65

JGO Kernel


Medals: 153
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #11 - Posted 2014-03-12 18:51:56 »

No, I meant as a score! My highest tile value was 128... Sad

Offline matheus23

JGO Kernel


Medals: 106
Projects: 3


You think about my Avatar right now!


« Reply #12 - Posted 2014-03-12 19:02:47 »

@Agro: It got 1024 for me...

Well, a 'pure' AI is not possible anyways. You need to have luck, since the game is not deterministic.
(remember, the new tiles are placed randomly, therefore you can't know what happens next)

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Offline Agro
« Reply #13 - Posted 2014-03-12 19:03:56 »

this looks like a pretty fun ML problem though

Offline trollwarrior1
« Reply #14 - Posted 2014-03-12 19:24:29 »

No, I meant as a score! My highest tile value was 128... Sad

ow.. I got only 512 and things started to go down hill Cheesy Still got a long way to go.
Offline HeroesGraveDev

JGO Kernel


Medals: 238
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #15 - Posted 2014-03-12 19:43:02 »

If you play carefully, and only ever use three directions (eg: never press up) you can get to 1024 without much trouble. It might even work up to 2048, but I accidentally pressed up while trying and things exploded.

I don't think the AI needs to determine where the tile will be placed in order to get the best result. The game is for the most part quite forgiving.

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 742
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #16 - Posted 2014-03-12 21:13:45 »

High score: 15672, one 1024 tile + one 512 tile adjecent + one 128 tile near. Emo

You actually need all 4 directions, just be careful, and lucky.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Online Drenius
« Reply #17 - Posted 2014-03-12 21:15:54 »

The three directions method is quite effective, but sometimes you get stuck and need to use the fourth.
Offline kpars

JGO Wizard


Medals: 75
Projects: 4
Exp: 3 years


Radirius Software Developer


« Reply #18 - Posted 2014-03-13 01:51:33 »



I would spam LEFT + DOWN and A + S at the same time for a few seconds, then I would spam RIGHT + DOWN and D + S at the same time for a few seconds.

It sort of worked?  Undecided

- Jev

Check out #JGO on EsperNet IRC! | Check out the MERCury 2D Java Game Library! | Also, Check out My Site
Offline HeroesGraveDev

JGO Kernel


Medals: 238
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #19 - Posted 2014-03-13 04:43:55 »

11980. Can't seem to get any further.

Had a 1024, a 512, a 256, and a 128.

Trying to think of algorithms to solve it...

Offline Grunnt

JGO Wizard


Medals: 64
Projects: 8
Exp: 5 years


Complex != complicated


« Reply #20 - Posted 2014-03-13 09:25:47 »

High score: 15672

It is fitting that our Overlord gets the highest score.

Offline kpars

JGO Wizard


Medals: 75
Projects: 4
Exp: 3 years


Radirius Software Developer


« Reply #21 - Posted 2014-03-13 09:40:20 »

Praise Riven.

- Jev

Check out #JGO on EsperNet IRC! | Check out the MERCury 2D Java Game Library! | Also, Check out My Site
Offline deathpat
« Reply #22 - Posted 2014-03-13 14:01:58 »

I love this game !!!

And I'm happy to beat Riven Cheesy


work in progress : D A E D A L U S
Offline HeroesGraveDev

JGO Kernel


Medals: 238
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #23 - Posted 2014-03-13 22:18:22 »

YYYYYEEEEEEAAAAAAHHHHHHH!



Never pressed up.

Offline opiop65

JGO Kernel


Medals: 153
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #24 - Posted 2014-03-13 22:20:30 »

Damn you! I downloaded an app for my phone to play it and the highest score I've managed to get is 512. Sad Sad

Online BurntPizza
« Reply #25 - Posted 2014-03-13 22:40:47 »

Ah, nice. Highest I've got so far was 13,084, in a similar situation as Riven.
Offline Slyth2727
« Reply #26 - Posted 2014-03-13 23:34:52 »

Oh cool, I found this a couple days ago, happy to see a thread on it here Smiley
Highest I got was around 6500. It's actually a very mental game, but there is definitely luck involved. I'm off to create an algorithm, all hail Lua Cheesy

Was I before Chuang Tzu who dreamt about being a butterfly, or am I now a butterfly who dreams about being Chuang Tzu?
Offline JVallius
« Reply #27 - Posted 2014-03-14 08:14:14 »

I do not have Artificial nor Natural Intelligence to solve this.
Still a very addictive and fun game.
Offline Regenuluz
« Reply #28 - Posted 2014-03-14 12:18:53 »

Alright, here's my result:



Offline Damocles
« Reply #29 - Posted 2014-03-14 14:55:24 »

If the random component would be deterministic (ok, only needs a seeded Random), you could implement an AI that at least
can brute force a few rounds ahead, to see a favorable current move. (ending up with the highest card collection, not beeing locked, and having high cards adjacent)
Then repeat it for every move.

Pages: [1] 2
  ignore  |  Print  
 
 

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

ctomni231 (39 views)
2014-07-18 06:55:21

Zero Volt (36 views)
2014-07-17 23:47:54

danieldean (29 views)
2014-07-17 23:41:23

MustardPeter (32 views)
2014-07-16 23:30:00

Cero (47 views)
2014-07-16 00:42:17

Riven (48 views)
2014-07-14 18:02:53

OpenGLShaders (38 views)
2014-07-14 16:23:47

Riven (37 views)
2014-07-14 11:51:35

quew8 (33 views)
2014-07-13 13:57:52

SHC (70 views)
2014-07-12 17:50:04
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!