github链接:
(两个项目均可运行成功,推荐第二个,只有200多行,好入门)
https://github.com/songrotek/DRL-FlappyBird
https://github.com/yenchenlin/DeepLearningFlappyBird
安装环境(新建虚拟环境python2.7)
conda create -n python27 python=2.7(2.7、3.6...)
pip install opencv-python==3.x(可以先乱输入一个,选一个合适版本)
pip install tensorflow==1.1.0
pip install pygame=1.9.3
然后直接运行即可
'''数据流:80*80*4
conv1(8*8*4*32, Stride=4)+pool(Stride=2)->10*10*32(height=width=80/4=20/2=10)
conv2(4*4*32*64,Stride=2)->5*5*64+pool(Stride=2)->3*3*64
conv3(3*3*64*64,Stride=1)->3*3*64=576
576在定义h_conv3_flat变量大小时需要用到,以使进行FC全连接操作'''