AI teaches itself to play flappy bird huge thanks to Brilliant.org for sponsoring this video check them out: www.brilliant.org/codebullet Twitter: / code_bullet Patreon: / codebullet Discord: / discord
"I'm gonna make an AI that can play a particular video game well in 24 hours!" "Sounds like an impressive time-" "So step 1 is to reinvent the entire game." "... what."
@@petelee2477 Yeah the programming could be done in one day, if it didn't exist you'd have to think of everything, the mechanics, the graphics, he just had to copy.
I like how you went to all that trouble to make sure the bird could see a bunch of different things... and then, literally the only input it make use of was the distance to the bottom pipe. lmao
That's how training AI is about you don't know what it'll do at the start. We can see that the bird basically jumpted to the level of the bottom pipe and tried to be stationary there.
Guess it makes sense. The size of the gap is always the same so as long as you have the position of either the top or bottom of the gap, the other position is redundant information.
In programming, if you increment a variable too much, it wraps around to its lowest value. Some variables end up wrapping around to negative numbers. CB just incremented the world speed so high that time started going in reverse. Simple, right?
Actually this is a phenomenon known as aliasing. It's caused by a lack of sampling to create an undesirable effect. ie. A wheel spins at 24 rps and is captured at a framerate of 24 fps, then the wheel looks stationary. This also appears in games (thus the anti-aliasing graphical options) for when a pixel is looking at the edge of an object. ie. Looking at an infinite checkerboard floor, far away, it will be a mess of black and white pixels.
I implemented it with TensorFlow.js AI Flappy Bird Bot Using TensorFlow.js, Phaser3.js and Reinforcement Learning | Full Code Provided ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-SNg4a5V5xWA.html
If you look at the neural net in the corner of the screen you can see that it only uses 1 input, presumably the distance to the lower pipe. It basically does nothing (ie, falls) until that distance approaches 0, then flaps. All other inputs are ignored! 😆
Disclaimer: the following message is not related to the comment or the video CodeBullet, I'd like you to know that people want to be entertained, with your content it's the progress what makes it entertaining. Your video 'AI learns to play google chrome dinosaur game || Can you beat it??' is an example of that. That video focusses on the progress. You show the parts where the AI learns from it mistakes and makes changes. The more you focus on progress, the more views you'll get. Another example is the game 'getting over it'. In this video Bennet Foddy says that 40% doesn't come passed the climb with the lights ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-DYjbCJXxWLg.html
I truly love your channel. Keep doing the best work. Such creative videos you’ve on this channel. Just subscribed! Officially the first viewer of any video on this channel. I’ve never witnessed such awesome editing as this one. Following your channel from the last two years, interesting content! You’re working so hard, may all your wishes come true. Congratulations on your first 10K followers, may you reach 100K soon. Whoever is reading this, never give up. God is with you. When watching your videos, I accidentally hit ‘like’ and never knew when. The moment you came here is at 05:17. Love this video, I think I’ve watched it four times.
@@locococo8961 Google it. As sampling rate becomes let's than half of the frequency, the direction can appear changed. The reason why fast propellers of aeroplanes or fast spinning wheels can appear to move in the opposite direction
You haven’t taken into account the increase in speed as the game goes on; and it probably makes the variability of the heights of the gaps even harder to maneuver with, and that’s another level of difficulty for a machine-learning algorithm that emulates the rational aspect of human learning; There should be an algorithm that “randomly” chooses the following pipes to put, as well as the different speed at which the screen moves (so all in all how much curve balls are going to be thrown at the machine-learning algorithm), according to the objective & narrow criteria of how many possible paths, between the pipe that’s just been crossed and the one right after it, can the bird take; or rather it should calculate for how many times/way can the bird mess up between those 2 pipes and still be physically able to pass through those pipes
I watched ur videos like 2 years ago thinking what you were doing was magic, now I recreate small games like this and add ML to them for fun. Thanks for the inspo bro
Madara uchiha yeah cuz there’s no reference point in the background, it’s only a still picture, if there was a tree he passed every now and then we could tell
well, there was once a tetris ai which 1 frame before game over did the only move left which prevented it from losing.. pause the game forever :D guess thats close enough
The AI only had one synapse, all it did was flap if it was below or at the level of the bottom pipe, the whole AI could just be one looped if statement
CB: gives birds hats Game: “THE BIRDS HAVE HATS, ACTIVATE IMPOSSIBLE PTSD MODE” CB: “I tried to make it Christmasy but it all broke 😕“ Game: “Well done boys we did it we beat the birds with hats”
They have models which can generate code which looks entirely real and is syntactically correct, but the problem is that when you go line by line it doesn't really make much sense. We need a method which can create code and make sense of it at the same time.