I Made a Neural Network That I Can Teach To Play Games !

Опубликовано: 12 Сентябрь 2026
на канале: MaxMakesGames
2,807
91

I tried making a neural network with no experience and making it play my flappy bird like game. I somehow managed to do it in around 2 days thanks to Sebastian Lague's ( and many others' ) video. The general idea of neural networks is not as complex as it might look.

I was able to get my AI to learn how to play flappy bird from watching me play once up to about 50 score and then training for 10,000 iterations only ( 2-3 seconds ) with that data. Amazing !

A neural network basically uses inputs that it will then multiply by a weight and add a bias to. By using a multiplication and addition, it will modify the input into the output. So, in the case of this video, the inputs at the end are the distance in x and y to the next pole. The AI, while training, will adjust its weights and biases to make it so it will multiply the distance in x and y by the good numbers and add good numbers to them producing an output between 0 and 1 showing how much it should jump.

What's cool is that if I made a normal programmed AI, I'd have to code it like "if the distance in y is greater than 0 or the distance in x is greater than 5 then jump" and I'd have to find the perfect numbers which would take time. Also, if you add more complexity in like things to dodge it becomes harder to program. But, if instead I can just record myself playing and the AI can learn by itself what it needs to do, then it is much easier for me.

However, the problem with learning from watching me play is that the AI can never be better than me. If I had hit poles many times when recording the training data, the AI would also have hit poles. So, in the next part, I'd love to make the AI learn by itself how to play with trial and errors without needing to watch me play and learn from me. This way, it can find the best method instead of copying me.

Here's Sebastian's video if you want to learn more about how it works. His visuals and explanations are amazing:    • I Tried Coding a Neural Network to Identif...  

---------------------------------

Subscribe for game making tutorials, other game-making related content and to follow my projects with the dev logs !

Check out my website for my other socials and if you want to see and try the games I made: https://bit.ly/MaxMakesGames

0:00 Intro
0:35 Understanding vs Copying
1:10 Most Basic Neural Network
2:27 Random Training Data
3:23 Day 2: Backpropagation
4:17 Bird Game
4:50 First Bird AI
5:30 Bird AI 2
6:45 Increasing Speed