AI Plays Space Invaders. Which machine learning algorithm will learn to play first?
HTML-код
- Опубликовано: 21 сен 2024
- Reinforcement learning is used to train bots using two different algorithms. Playing a simple space shooter-style game.
Custom gym to use with OpenAI algorithms. Showing how you can create more test environments for your custom algorithms. Once you get your environment set up in the OpenAI Gym format it is super easy to switch between different test algorithms.
github.com/Cla...
Want to chat with me and other programmers join our discord!
/ discord - Наука
Please do more machine learning projects and tutorials. Your explanations are so easy to follow !! Tysm
Thanks your comments really mean a lot. Feel free to jump in our discord if you like chatting about programming and such!
Definitely some of the most concise and logically thought out videos I've seen on programming in Python. Unfortunately it seems like the growth rate of RUclips videos channels are more linear than exponential but you'll get there. Just keep making videos and getting people to interact with them via comments thumbs up subscription etc sharing them what have you.
Appreciate the comment and the views! I don't over think it to much it's a hobby for me so I just keep trying to make valuable videos for my viewers. If a few people keep watching I'll keep making them!
cool and awesome vidio very cool interesting. your transition noise is intrusive, everything else ROCKS keep it up thx
Awesome thanks for the feedback! I agree not sure what I was doing with the noise I've improved on my newer videos haha.
From my experience of my phd in robotics i would try the following: give an agent-centered image to the network. Therefore the complexity of the image recognition task is greatly reduced, since most movements onky rely on relative information. If you give the image in absolute coordinates the policy has to learn each avtion for each position in the image individually.
More thoughts (I did not check the code)
- Color code ship, bullet, enimy and wall
- Use image augmentation, mostly random cropping
- Initialize policy with human play.
Centered meaning the ship is always in the center?
@@ClarityCoders yes. Ship in the center. Therefore the position of the ship in the image is always constant. If you need more info, please let me know.
Also, train it with curriculum learning may help (start with simple episodes, then increase the difficulty)
Great Great Videos. One of the best educational Videos
Thanks means a lot. I really enjoyed this video actually!
Awesome video!
Thanks! Appreciate it!
Great content and a timely one for beginners like me!!!
I have 2 questions arising from this demo:
1) During training of DQN/PPO, are you aware of any methods such that pygame ONLY renders the GUI when we call it? Like during model evaluation only?
2) Can you help to elaborate more as to why 18 actions are needed for the player's spaceship? Here, I am assuming 4 Actions be sufficient - (Left, Right, Up, Down)?
Thanks in advance.
display.update() renders the gui!
action space is bigger than 4 because I accounted for doing two things in one turn. for example moving up is and action and moving up while shooting is another.
join discord if you would like to chat about this more! Thanks for watching.
how did you calcuate loss for the DQN? Im aware that MSE has flaws such as minimizing the loss for all of the neural network's output nodes, and is sensitive to outliers.
thanks for the video
You bet! Thanks for watching more coming soon!
There are algorithms I can use?
The first time I learned about Reinforcement learning I build an AI from scratch in C# in Unity :/
Yeah! Very useful to compare your from scratch algorithm against library is called stable baselines.
please can you make an AI tutorial for MOBA games like Thetan arena
i think losing the game should actually NOT be punished, since the bot will lose sooner or later
Yeah it's sort of pointless. I don't think it hurts anything but really no reason to punish it.
what operating system you are using?
Windows.
@@ClarityCoders yess but which version?
You need to try to see if you can make a funny python does something funny video and that might go more viral
I got some in the works after my tutorial series is over!