GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.
DQN Play Flappy-bird and MountainCar. Contribute to xiaohuiduan/flappy-bird-dqn development by creating an account on GitHub.
于是找到网上牛人放出的山寨版《flappy bird》之clumsy-bird,来简单研究一下源码吧,顺便从零学习一下canvas和Js一些东西,作为记录。 clumsy-bird的github地址为:https://github.com/ellisonleao/clumsy-bird 在线试玩地址:http://ellisonleao.github.io/clumsy-bird/(保证你的浏览器支持html5哟) 一、源码框架介绍 ...
下面,我们分析一下 PARL 中的 DQN 部分的源码,并实现 Flappy-Bird 的游戏智能。 代码实现 依次分析 env、model、algorithm、agent、replay_memory、train 等模块。 1. BirdEnv.py,环境;上文已经分析过了。 2. BirdModel.py,神经网络模型;使用三层 CNN+两层 FC,CNN 的 padding 方式都是 valid,最后输出状态-...
Flappy bird AI使用的CGP设计 笔者首先利用pygame编写了基本的flappy bird游戏,本过程参考了FlappyLearning这一项目的Javascript实现。与GitHub上其它的flappy brid AI项目相比,笔者的游戏更具有挑战性,因为柱子间的水平距离和上下两根柱子间的距离均是随机而非固定的。鉴于此,本文中控制小鸟的模型也需要三个状态输入量而...
本篇就针对学习的几个样例,自己动手实践,做了个FlappyBird,源码共享在度盘;也可以参考github,里面有更多的游戏样例。 游戏截图 HTML5之Canvas Canvas是Html5中用于绘图的元素,它可以绘制各种图形,比如长方形,多边形,圆形等等。如果想要了解Canvas的使用可以参考: ...
废话不多说,我们赶紧试试 PARL 的官方 DQN 算法,玩一玩 Flappy-Bird。 模拟环境 相信大家对于这个游戏并不陌生,我们需要控制一只小鸟向前飞行,只有飞翔、下落两种操作,小鸟每穿过一根柱子,总分就会增加。由于柱子是高低不平的,所以需要想尽办法躲避它们。一旦碰到了柱子,或者碰到了上、下边缘,都会导致 game-over。
git地址:https://github.com/MrLawrence1990/canvas-flappy-bird 思路 Bird类 (实现中为简化贴图工作,使用圆形代替),在canvas中具有位置属性,具有绘制方法;实现中为简化贴图工作,使用球类Ball代替小鸟 constG=9.8const SPEED_LEVEL=80const TANXINGXISHU=0.7export default classBall{constructor(r,color){this.radius...
GitHub地址: ReDeepLearningFlappyBird https://github.com/ZhangRui111/ReDeepLearningFlappyBird Using Deep Q-Network to Learn How To Play Flappy Bird Based onDeepLearningFlappyBird Overview This project follows the description of the Deep Q Learning algorithm described in Playing Atari with Deep Reinfor...
git clone https://github.com/yenchenlin1994/DeepLearningFlappyBird.git cd DeepLearningFlappyBird python deep_q_network.py What is Deep Q-Network? It is a convolutional neural network, trained with a variant of Q-learning, whose input is raw pixels and whose output is a value function estim...