ONLY CHROME BASED For computer 2048 (https://2048game.com/) as it allows key arrows
Tech Stack:
- Selenium for tracking and moving the website
- Gymnasium environment wraps the Selenium system for training
- PyTorch is where we make the models, that is then trained in the environment
- Numpy uses the 4x4 grids as the 2048
Steps:
- Browser automation connects to 2048 website
- Extract game state from DOM/JavaScript
- Feed state to RL model
- Model outputs action (up/down/left/right)
- Send keyboard command to browser
- Get reward (score increase)
- Repeat
RL models - testing each one to find the best one/performing:
-
Deep Q-Network (DQN) - Q-value function and uses replay buffer to stabilize training
-
Policy Gradient (A2C/PPO) - probability distribution over actions and stable
-
AlphaZero-style (MCTS + Neural Network) - Combines Monte Carlo Tree Search with deep learning