2048 Simulator

Spring 2023 - https://github.com/isaac1000000/2048simulator

I loved the 2048 game in high school. I never really paid attention to my high score, but it was fun to press some buttons in a pattern and see what would come of it. There was a lot of not-so-accurate mythology to it: never go down, never go the same direction twice, etc. I tried it all, and never found success. This is my answer - a test framework for 2048 strategies. It's portable and easy to write patterns for, especially if you're like me and never looked at the board anyways. The best I found was left-up-right-up, which doubled the average of the next highest pattern. If you ever find a repetitive strategy that gets to 2048, let me know. I've not managed it yet.

I built the framework in pure Java, and the test results and playable version of the game run on the command line. It's very malleable and supports "aware" strategies, meaning a pattern could make decisions based on the state of the board. The patterns I wrote are just samples and aren't meant to be optimal - I truly have no idea what a strategy for the game would even begin to look like. Maybe when I have some time I'll go back and take a look to see what I can do. Maybe it's an exercise left to the reader. Either way, this was a great experiment for writing tests and playing a bit with data manipulation that I hope to come back to sometime soon with the experience I have now.