Let's play 2048 with reinforcement learning!
Current status: not better than the random agent
Install Python 3 and all its dependencies:
pip3 install -t requirements.txt
- numpy
- tensorflow
- keras
- h5py
python3 --agent=[TYPE] --model_path=[MODEL] --train --test
from gym2048 import Gym2048
gym = Gym2048()
env = gym.make()
env.reset()
while True:
action = env.action_space.sample()
obervation, reward, done, info = env.step(action)
env.render()
if done: break
You can play 2048 with arrow keys:
python3 play.py
from py2048 import Console
console = Console()
console.start()
- Build a 2048 game with Python
- Wrap 2048 into an OpenAI Gym like environment
- Perform reinforcement learning methods on 2048
- Improve the existing RL methods
- Analyse the training progress of each method