All Projects → xtrp → jupiter

xtrp / jupiter

Licence: MIT license
A Monte-Carlo based AI to beat 2048

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to jupiter

2048-game
2048 Game implementation based on Preact+Redux
Stars: ✭ 17 (-63.83%)
Mutual labels:  2048
AlphaZero Gobang
Deep Learning big homework of UCAS
Stars: ✭ 29 (-38.3%)
Mutual labels:  mcts
Hypernets
A General Automated Machine Learning framework to simplify the development of End-to-end AutoML toolkits in specific domains.
Stars: ✭ 221 (+370.21%)
Mutual labels:  mcts
pyDLGO
基於深度學習的 GTP 圍棋(围棋)引擎,KGS 指引文件以及演算法教學。
Stars: ✭ 33 (-29.79%)
Mutual labels:  mcts
MCTS-agent-python
Monte Carlo Tree Search (MCTS) is a method for finding optimal decisions in a given domain by taking random samples in the decision space and building a search tree accordingly. It has already had a profound impact on Artificial Intelligence (AI) approaches for domains that can be represented as trees of sequential decisions, particularly games …
Stars: ✭ 22 (-53.19%)
Mutual labels:  mcts
quoridor-ai
Quoridor AI based on Monte Carlo tree search
Stars: ✭ 23 (-51.06%)
Mutual labels:  mcts
2048-Gym
This projects aims to use reinforcement learning algorithms to play the game 2048.
Stars: ✭ 68 (+44.68%)
Mutual labels:  2048
v2048
A simple game of 2048, written in V.
Stars: ✭ 19 (-59.57%)
Mutual labels:  2048
Deep RL with pytorch
A pytorch tutorial for DRL(Deep Reinforcement Learning)
Stars: ✭ 160 (+240.43%)
Mutual labels:  mcts
rr-2048
2048 game in Reason React
Stars: ✭ 15 (-68.09%)
Mutual labels:  2048
muzero
A clean implementation of MuZero and AlphaZero following the AlphaZero General framework. Train and Pit both algorithms against each other, and investigate reliability of learned MuZero MDP models.
Stars: ✭ 126 (+168.09%)
Mutual labels:  mcts
UCThello
UCThello - a board game demonstrator (Othello variant) with computer AI using Monte Carlo Tree Search (MCTS) with UCB (Upper Confidence Bounds) applied to trees (UCT in short)
Stars: ✭ 26 (-44.68%)
Mutual labels:  mcts
Alpha Zero General
A clean implementation based on AlphaZero for any game in any framework + tutorial + Othello/Gobang/TicTacToe/Connect4 and more
Stars: ✭ 2,617 (+5468.09%)
Mutual labels:  mcts
2048.cpp
🎮 Fully featured terminal version of the game "2048" written in C++
Stars: ✭ 1,886 (+3912.77%)
Mutual labels:  2048
2048-in-terminal
Animated console version of the 2048 game
Stars: ✭ 128 (+172.34%)
Mutual labels:  2048
Twenty48
A modified clone of the puzzle game 2048, built in react/typescript!
Stars: ✭ 31 (-34.04%)
Mutual labels:  2048
alpha-zero
AlphaZero implementation for Othello, Connect-Four and Tic-Tac-Toe based on "Mastering the game of Go without human knowledge" and "Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithm" by DeepMind.
Stars: ✭ 68 (+44.68%)
Mutual labels:  mcts
MI-MVI 2016
Semestral project for the subject Methods of computational inteligence @ fit.cvut.cz
Stars: ✭ 24 (-48.94%)
Mutual labels:  2048
react-native-2048
React Native 2048 Game
Stars: ✭ 77 (+63.83%)
Mutual labels:  2048
Alphazero gomoku
An implementation of the AlphaZero algorithm for Gomoku (also called Gobang or Five in a Row)
Stars: ✭ 2,570 (+5368.09%)
Mutual labels:  mcts

Jupiter

a Monte-Carlo based AI to beat 2048

Description

Jupiter an AI that uses a Monte Carlo Tree Search (MCTS) algorithm to beat the popular online game 2048. Jupiter is run on the web, and can consistently win (achieve the 2048 tile) given a sufficient number of simulations, a number which can be easily changed on the site.

Demo Image

Algorithm

For every position, or game state, there are a certain set of possible moves: typically left, right, up, and down. For each possible move (referred to as N), the algorithm creates S (number of simulations) new games starting at the current game state, and plays N (the current possible move) as the first move in each simulation.

For example, in case where S = 50, there would be 200 simulations starting at a particular game state, where 50 play left as the first move, 50 play right, 50 play up, and 50 play down. After playing the first move in each simulation, all simulations play completely random games until the games are over.

After all simulations are run for the current game state, the algorithm calculates the average final game score for each starting move by averaging all of the S simulations for that move. Note: game score is calculated by adding the values of all tiles on the board.

The algorithm then finds the starting move whose simulations had the highest average score. This is the move to be played in the current game score.

For example, if the average final score for the move up was 1000, and the average final score for the move down was 1400, then down is, in general, a better move than up, at least in the simulations played. Therefore, the AI would play the move down in this situation, and then the entire process would start over again.

The number of simulations can be changed in the AI console, allowing users to increase AI performance by increasing the amount of simulations per move. However, as AI performance increases, AI speed decreases as there are more calculations being performed.

The default number of simulations per move is 50, and with this amount, Jupiter consistently achieves at least a 1024 and 512 tile, with a high (~60%) chance of a 2048 tile.

Jupiter is written in JavaScript to run on the web, meaning it can run seamlessly on almost all devices and browsers. Jupiter also takes advantage of JavaScript Web Workers, allowing the CPU work in algorithm and Monte Carlo simulations to be divided equally among multiple threads.

Contributing

If you'd like to add a new feature to Jupiter, make it faster, or even fix a mistake in the documentation, please feel free to contribute and add pull request! I would love to have more contributors to Jupiter.

If you find a bug, also please feel free to submit an issue.

License & Credits

Jupiter was built by web developer and student Gabriel Romualdo.

Jupiter is licensed under the MIT License. Please refer to LICENSE.txt for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].