Windows环境下搭建机器学习玩flappy bird(1)

来源:互联网 发布:foxit pdf editor mac 编辑:程序博客网 时间:2024/06/07 16:20

Windows环境下搭建机器学习玩flappy bird(1)

flyfish
环境 win10

安装依赖

Python3
Anaconda3(python3版+64位)
Keras
pygame
scikit-image

为了简便安装需要先安装Anaconda3
Anaconda已经集成了很多python库

Keras是一个高层神经网络库,Keras是基于Tensorflow或Theano,纯Python编写而成。
TensorFlow是一个采用数据流图(data flow graphs),用于数值计算的开源软件库。

Theano is a Python library that allows you to define, optimize, and evaluate

mathematical expressions involving multi-dimensional arrays efficiently.
Theano是一个Python库,用来定义、优化和计算数学表达式,用于高效的解决多维数组

的计算问题。可以在CPU或GPU上运行快速数值计算。

Pygame 是一组用来开发游戏软件的 Python库。

scikit-image 一组用于图像处理的算法的集合

一种方式是直接使用Anaconda3中的python
如果使用自安装的python,需要将Anaconda3目录的site-packages中库拷贝到Python的安

装目录的site-packages中

关于源代码目录
https://github.com/yanpanlau/Keras-FlappyBird
以控制台的方式进入源代码目录执行

python qlearn.py -m "Run"

If you want to train the network from beginning, delete the model.h5 and run qlearn.py -m “Train”
如果你想从头开始训练网络,请删除”model.h5”文件后运行

python  qlearn.py -m "Train"

其他说明看该源码中的README.md文件
程序已经在win10下调试通过

0 0
原创粉丝点击