Originally published here at xtrp.io, my blog about computer science and just about anything programming.
Today I'm proud to release my online 2048 AI, Jupiter. Jupiter uses a machine learning method called the Monte Carlo Tree Search (MCTS) algorithm.
Check it out:
I've released an article detailing the algorithm and implementation used in Jupiter: Using the Monte Carlo Tree Search (MCTS) Algorithm in an AI to Beat 2048 (and other games).
This is a snippet of some of what you'll see when you go to the Jupiter website.
- Jupiter (Website) — run the AI on your browser and see realtime AI statistics.
- Jupiter GitHub Repo and Source Code — check out the code and feel free to submit a PR or issue.
- My Article on Jupiter's Algorithm — all you might want to know about the algorithm and how it works.
Jupiter (formerly known as Jacob) started as a small AI project in January 2018. I got the idea of using Monte Carlo simulations and search trees as a method to play 2048 from this StackOverflow answer.
With the numerous updates to the project in 2020, Jupiter was now able to run ~2650 simulations of possible games per second. Running the game at 200 simulations per move gave around 13 moves per second. This indicated that performance had more than tripled with the new updates. Moreover, a new addition to the code allowed for performance to grow and scale horizontally by adding Web Workers and threads as general computing speed increases over time.
All in all, the two year gap in which I learned invaluable frontend development and programming skills allowed me to improve the AI drastically in many areas while maintaining the original, extremely effective Monte Carlo based algorithm which stayed the same throughout the development process.
I hope you find this project interesting and take the time to check it out!
If you liked this post, consider following me on DEV.
Thanks for scrolling.
This post is originally from my blog at xtrp.io.
— Gabriel Romualdo, September 12, 2020