Closed f000bar closed 10 years ago
Well, it may be a fun little challenge to cut your teeth on! Basically, you have to modify the code to support the eight different moves, and update the heuristics appropriately so they work for the 4D case (though I imagine an AI with only the free-space heuristic will still work pretty well for the 4D game).
It sounds daunting, but it will certainly improve your coding skills to try!
Sure, but there are also a lot of other issues, like the bit manipulation stuff, and getting the python script it to read the board from the page. I might give it a try, but can't get to it for a bit, and figured you'd have a much easier time of it if you had the inclination - not to mention the ability to make a better heuristic.
I'm guessing this is a 'no', then? :(
I don't think I will be able to get to this anytime soon. On Apr 3, 2014 2:55 PM, "f000bar" notifications@github.com wrote:
I'm guessing this is a 'no', then? :(
— Reply to this email directly or view it on GitHubhttps://github.com/nneonneo/2048-ai/issues/4#issuecomment-39490488 .
FYI: I added support for the 4D game in a branch, if you're still interested.
I've got a working 4D solver here.
I'm still working on optimizing the heuristics, but so far in internal tests the best results I have managed to achieve are as follows:
Performance stats for 200 games: Got to 2^11 (2048) 200 times (100.00%) Got to 2^12 (4096) 200 times (100.00%) Got to 2^13 (8192) 190 times (95.00%) Got to 2^14 (16384) 124 times (62.00%) Got to 2^15 (32768) 7 times (3.50%)
I have also developed a solver for 2048-4D here
Performance observed over 100 games: | Tile | Proportion of games tile achieved |
---|---|---|
2048 | 100% | |
4096 | 98% | |
8192 | 98% | |
16384 | 96% | |
32768 | 87% | |
65536 | 15% |
Min Score: 36924, Median Score: 845132.0, Max Score: 2212500
Coefficient of the heuristics and model parameters were tuned by hand so there is still room for improvement in this despite its high performance.
This is amazing, thanks! Do you have any interest in modifying it/making a version that could do the 4D version? http://huonw.github.io/2048-4D/? I'd try it myself, but my coding abilities are extremely limited.