https://github.com/opendilab/di-1024
1024 + 深度强化学习(Deep Reinforcement Learning + 1024 Game/ 2048 Game)
https://github.com/opendilab/di-1024
1024-game 2048 2048-game deep-reinforcement-learning javascript python reinforcement-learning
Last synced: about 1 year ago
JSON representation
1024 + 深度强化学习(Deep Reinforcement Learning + 1024 Game/ 2048 Game)
- Host: GitHub
- URL: https://github.com/opendilab/di-1024
- Owner: opendilab
- License: apache-2.0
- Created: 2022-10-24T08:56:22.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-23T10:36:08.000Z (almost 2 years ago)
- Last Synced: 2025-04-13T03:55:44.610Z (about 1 year ago)
- Topics: 1024-game, 2048, 2048-game, deep-reinforcement-learning, javascript, python, reinforcement-learning
- Language: Python
- Homepage: https://opendilab.net/1024
- Size: 1.07 MB
- Stars: 118
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DI-1024:深度强化学习 + 1024游戏
> 1024 游戏有时也被称为 [2048](https://en.wikipedia.org/wiki/2048_(video_game))。
是人机协作共同解密,还是人机对抗捕捉 AI 背后的的种种虫(Bug)。欢迎一起回味二的幂次方,体验极客瞬间~
P.S. 路过记得点个 star  ,持续更新ing。
P.S.S. 想了解更多深度强化学习相关知识?快来 [DI-engine](https://github.com/opendilab/DI-engine) 和 [LightZero](https://github.com/opendilab/LightZero) 训练自己的智能体。
# News
[WeChat] [今日忌加班,宜玩1024](https://opendilab.net/1024)
# 使用指南
- 在线网页版试玩 -> [传送门](https://opendilab.net/1024)
# 训练指南
先用以下命令安装依赖的包:
```bash
pip3 install -r requirements.txt
```
### MuZero 智能体训练
在 1024 环境上快速训练一个 [MuZero](https://github.com/opendilab/LightZero/blob/main/lzero/policy/muzero.py) 智能体:
```bash
cd DI-1024
python3 -u agent/config/muzero_2048_config.py
```
### StochasticMuZero 智能体训练
在 1024 环境上快速训练一个 [StochasticMuZero](https://github.com/opendilab/LightZero/blob/main/lzero/policy/stochastic_muzero.py) 智能体:
```bash
cd DI-1024
python3 -u agent/config/stochastic_muzero_2048_config.py
```
### 训练曲线

# 更新计划
- [x] 网页在线版试玩
- [x] 完整强化学习训练样例
- [x] 结合 Stochastic MuZero 的最强 1024 游戏智能体
- [ ] 提供可供本地试玩的模型权重
- [ ] 设计更有趣的人机对抗算法
# 致谢
- JS 前端部分主要基于 https://github.com/xwjdsh/2048-ai 进行魔改,请大家也多多支持这个 repo
# License
DI-1024 is released under the Apache 2.0 license.
