Flappy Bird RL
reinforcement-learningq-learninggame-aijavascript
Abstraction: Q-learning agent trained to play Flappy Bird in JavaScript
Key points:
- State space discretized over: vertical distance from lower pipe, horizontal distance from next pipe pair, and alive/dead status
- Reward structure: +1 per tick alive, -1000 on death; Q-array initialized to zeros, tie-breaking favors "Do Nothing"
- Q-learning update rule: Q[s,a] <- Q[s,a] + alpha (r + gamma V(s') - Q[s,a]); alpha=0.7, discount=1.0
- Chose model-free Q-learning to avoid explicitly modeling Flappy Bird's physics (rise, fall, click response)
- Training took ~6-7 hours to reach score of 150; suggests parallelizing multiple birds sharing one Q-array to speed up
- Built on top of mrspeaker's Omega500 JavaScript game engine with typing component removed
Connections: Github · Reinforcement Learning · Q Learning · Game Playing AI