AlphaZero implemented Chinese chess. AlphaGo Zero / AlphaZero实践项目,实现中国象棋。
Author chengstone
e-Mail 69558140@163.com
代码详解请参见文内jupyter notebook和↓↓↓
知乎专栏:https://zhuanlan.zhihu.com/p/34433581
博客:http://blog.csdn.net/chengcheng1394/article/details/79526474
欢迎转发扩散 ^_^
这是一个AlphaZero的实践项目,实现了一个中国象棋程序,使用TensorFlow1.0和Python 3.5开发,还要安装uvloop。
因为我的模型训练的不充分,只训练了不到4K次,模型刚刚学会用象和士防守,总之仍然下棋很烂。
如果您有条件可以再多训练试试,我自从收到信用卡扣款400美元通知以后就把aws下线了:D 贫穷限制了我的想象力O(∩_∩)O
我训练的模型文件下载地址:https://pan.baidu.com/s/1dLvxFFpeWZK-aZ2Koewrvg
解压后放到项目根目录下即可,文件夹名叫做gpu_models
现在介绍下命令如何使用:
命令分为两类,一类是训练,一类是下棋。
训练专用:
下棋专用:
训练命令举例:
python main.py --mode train --train_playout 1200 --batch_size 512 --search_threads 16 --processor gpu --num_gpus 2 --res_block_nums 7
下棋命令举例:
python main.py --mode play --ai_count 1 --ai_function mcts --play_playout 1200 --human_color w
Licensed under the MIT License with the 996ICU License
.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。