Abdoelabassi / RL-snake_game

training an agent to play snake gale

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Snake game played by an IA

Implementing and training a RL model to play a snake game using PyTorch

requirements: Python3!

pip install -r requirements.txt

Algorithm :

Q-Learning, from Bellman equation, Q'(s,a)= Q(s,a) + α(R(s,a) + γmax(Q(s',a')))

Q: Q value

R: Reward

α : learning rate

γ : parameter to controle the randomness < 1

Game

developed using Pygame: https://www.pygame.org/contribute.html

Screenshots

alt image 1

alt image 2

Thanks to @Python_engineer , and Thanks a lot to @FreeCodeCamp Community

About

training an agent to play snake gale


Languages

Language:Python 100.0%