AI Plays Space Invaders. Which machine learning algorithm will learn to play first?

  Рет қаралды 26,256

ClarityCoders

ClarityCoders

3 жыл бұрын

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/ClarityCoders/Spac...
Want to chat with me and other programmers join our discord!
/ discord

Пікірлер: 31
@daddyofalltrades
@daddyofalltrades 2 жыл бұрын
Please do more machine learning projects and tutorials. Your explanations are so easy to follow !! Tysm
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thanks your comments really mean a lot. Feel free to jump in our discord if you like chatting about programming and such!
@Timmysthirdbirthday
@Timmysthirdbirthday 2 жыл бұрын
cool and awesome vidio very cool interesting. your transition noise is intrusive, everything else ROCKS keep it up thx
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Awesome thanks for the feedback! I agree not sure what I was doing with the noise I've improved on my newer videos haha.
@levipack3835
@levipack3835 3 жыл бұрын
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 KZbin 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.
@ClarityCoders
@ClarityCoders 3 жыл бұрын
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!
@okay730
@okay730 9 ай бұрын
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.
@MrVersion21
@MrVersion21 2 жыл бұрын
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.
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Centered meaning the ship is always in the center?
@MrVersion21
@MrVersion21 2 жыл бұрын
@@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.
@marcorosano9384
@marcorosano9384 2 жыл бұрын
Also, train it with curriculum learning may help (start with simple episodes, then increase the difficulty)
@gusinthecloud
@gusinthecloud 2 жыл бұрын
Great Great Videos. One of the best educational Videos
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Thanks means a lot. I really enjoyed this video actually!
@sholomschonbuch5946
@sholomschonbuch5946 3 жыл бұрын
Awesome video!
@ClarityCoders
@ClarityCoders 3 жыл бұрын
Thanks! Appreciate it!
@kevin5k2008
@kevin5k2008 3 жыл бұрын
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.
@ClarityCoders
@ClarityCoders 3 жыл бұрын
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.
@bluegru
@bluegru 2 жыл бұрын
There are algorithms I can use? The first time I learned about Reinforcement learning I build an AI from scratch in C# in Unity :/
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Yeah! Very useful to compare your from scratch algorithm against library is called stable baselines.
@DrWho2008t101
@DrWho2008t101 3 жыл бұрын
thanks for the video
@ClarityCoders
@ClarityCoders 3 жыл бұрын
You bet! Thanks for watching more coming soon!
@muhammad_talha
@muhammad_talha 2 жыл бұрын
what operating system you are using?
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Windows.
@muhammad_talha
@muhammad_talha 2 жыл бұрын
@@ClarityCoders yess but which version?
@mawkuri5496
@mawkuri5496 2 жыл бұрын
please can you make an AI tutorial for MOBA games like Thetan arena
@tctrainconstruct2592
@tctrainconstruct2592 2 жыл бұрын
i think losing the game should actually NOT be punished, since the bot will lose sooner or later
@ClarityCoders
@ClarityCoders 2 жыл бұрын
Yeah it's sort of pointless. I don't think it hurts anything but really no reason to punish it.
@levipack3835
@levipack3835 3 жыл бұрын
You need to try to see if you can make a funny python does something funny video and that might go more viral
@ClarityCoders
@ClarityCoders 3 жыл бұрын
I got some in the works after my tutorial series is over!
Building a simple Instagram Bot in 2020
26:32
ClarityCoders
Рет қаралды 14 М.
I tried to make a Valorant AI using computer vision
19:23
River's Educational Channel
Рет қаралды 1,4 МЛН
Do you have a friend like this? 🤣#shorts
00:12
dednahype
Рет қаралды 50 МЛН
The Worlds Most Powerfull Batteries !
00:48
Woody & Kleiny
Рет қаралды 22 МЛН
100❤️ #shorts #construction #mizumayuuki
00:18
MY💝No War🤝
Рет қаралды 20 МЛН
Why You Should Always Help Others ❤️
00:40
Alan Chikin Chow
Рет қаралды 6 МЛН
AI Learns to steal
17:23
Dingus Labs
Рет қаралды 307 М.
DQN SPACE INVADERS
1:09
Google DeepMind
Рет қаралды 51 М.
A.I.  teaches itself to drive in Trackmania
15:04
Yosh
Рет қаралды 4,8 МЛН
Bot Plays Dino Run! Can our dinosaur bot be stopped?
11:30
ClarityCoders
Рет қаралды 50 М.
AI Learns to Walk (deep reinforcement learning)
8:40
AI Warehouse
Рет қаралды 8 МЛН
AI Learns to Play Wii Sports
29:25
adumb
Рет қаралды 207 М.
Power Machine Learning using Ray.io and Python. Full Tutorial.
34:53
How I Made AI Assistants Do My Work For Me: CrewAI
19:21
Maya Akim
Рет қаралды 691 М.
2D water magic
10:21
Steve Mould
Рет қаралды 554 М.
iPhone 12 socket cleaning #fixit
0:30
Tamar DB (mt)
Рет қаралды 12 МЛН
cool watercooled mobile phone radiator #tech #cooler #ytfeed
0:14
Stark Edition
Рет қаралды 7 МЛН
😱НОУТБУК СОСЕДКИ😱
0:30
OMG DEN
Рет қаралды 2,8 МЛН
AMD больше не конкурент для Intel
0:57
ITMania - Сборка ПК
Рет қаралды 521 М.