Python + PyTorch + Pygame Reinforcement Learning – Train an AI to Play Snake

preview_player
Показать описание
In this Python Reinforcement Learning course you will learn how to teach an AI to play Snake! We build everything from scratch using Pygame and PyTorch.

⭐️ Course Contents ⭐️
⌨️ (0:00:00) Part 1: Basics of Reinforcement Learning and Deep Q Learning
⌨️ (0:17:22) Part 2: Setup environment and implement snake game
⌨️ (0:40:07) Part 3: Implement agent to control game
⌨️ (1:10:59) Part 4: Create and train neural network

🎉 Thanks to our Champion and Sponsor supporters:
👾 Raymond Odero
👾 Agustín Kussrow
👾 aldo ferretti
👾 Otis Morgan
👾 DeezMaster

--

Рекомендации по теме
Комментарии
Автор

Thanks for the awesome video! Really fun to see agent improving during the games.

edwintjoa
Автор

Thank you so much for this tutorial. I have always wanted to introduce snake with ML. and now looking forward to learning more about pytorch

HRDmonk
Автор

I’ve always wanted to do this, thanks alot for the tutorial

willchantemduang
Автор

Always very high quality videos when I just need it :) Thanks a lot! Looking forward to finish the video  😎

Автор

Awesome, so hard to find that type of explanation of dqn. All clear, great balance between theory and coding part for beginners in rl.

adrian
Автор

A video as valuable as a playbook👍🏻👍🏻👍🏻

deojxwu
Автор

Thanks for this video, I have solved all my doubts

sergiomollo
Автор

Watched the first 4 mins and the game and the learning process is fantastic! 🎉 Will go on it with the rest hopefully soon.

khalidelgazzar
Автор

Super great video! I run it and after more than 2000 games it seems that the average score reached a plateau of 30. It Avoids boundaries very well. But it hit itself when the tail is too long. But this movement should be predicted before.

dabyttamusic
Автор

Lot of the code needs more explanation. There is a disconnect from theory and implementation. We copy all the parameters to this and to that without understanding why. The memory part is not well explained.

yavarjn
Автор

Thanks for freeCodeCamp for making this possible.

pactube
Автор

Very interesting tutorial. I was familiar with Snake code implementations, Tensorflow basics and RL principles and I could follow along. For some reason the plot doesn't appear, and I only get a small blank window where the plot should be. Probably some bug while typing the code down.
Other than that everything works for me.
Thank you very much!

Hiyori___
Автор

how to perform UCB, optimal initial values and dynamic programming approaches in this model?

vikramganesan
Автор

Perfect video!!Congrats! Is there any implementation with DDPG, PPO or SAC?

johnpap
Автор

A nice video. My only critique is that the presenter kept writing code for almost an hour without running it. That's not giving a good example.

mihailmihaylov
Автор

Incredible work, thank you Patrick! PS: It is very funny to spot the typos/bugs before you do :)

devnull
Автор

nice algo, but how to solve a problem with self destroy, when the closest cell to move is "inside body circle". I think a state must be all field with each body part, head, food etc, but its endless states and all of them unique and it will never learns or may be i wrong?

kevas
Автор

Thanks for the video it was great but I have only one question if u can help after I run the agent and after a few try like 3rd game the game stuck and in the console suddenly start to count the number of game without the game really play

pythontutorial
Автор

Following this since I wanna make a pygame project of mine that I poured a lot of time into and have no idea what to make the game about play itself. Wish me luck.

Frnk
Автор

Nice effort and seems like the convergence is achieved upto some extent!

pyshine_official