Beat Asteroids Game Using a Neural Network – JavaScript Tutorial



This complete JavaScript tutorial shows how to automate an asteroids game using a neural network.

This tutorial keeps the complex theory to a minimum and demonstrates how to use a neural network in a real-world situation.

The tutorial builds off of a previous JavaScript tutorial that shows how to build an astroids game from scratch. However, viewing that tutorial first is not required.

🎥Original Asteroids Game Tutorial: https://youtu.be/H9CSWMxJx84

⭐️Game Resources ⭐️
💻Asteroids Game in Javascript / HTML: https://drive.google.com/file/d/1tmjvMKxCcJeyTpi5pI6A8cgVxwWnyPXn/view
🔈Sound Files: https://drive.google.com/file/d/1iSykdpBCc7xafRFHrdH0mH4TeR5ansAc/view

⭐️Course Contents and Code ⭐️
⌨️(0:00) Part 1: Setup and Matrix Functions
💻Code – Setup and Matrices: https://drive.google.com/file/d/1G7HtRB1OFDBirwqkjWnBRfb4veaJ6QNr/view
💻Code – Matrix Functions: https://drive.google.com/file/d/10io7bEQFxQNyMfdhTkEKqpLLUCAfP7sr/view

⌨️(35:24) Part 2: Neural Network
💻Code – Neural Network: https://drive.google.com/file/d/1_0rYsKM9XW8TOPVyFK8uM5Q9_1OzRY7A/view
💻Code – NeuralNetwork class: https://drive.google.com/file/d/1ROSjAEHAGMTN6MDP1LDAln7xaZD0aCsV/view

⌨️(1:10:45) Part 3: Automate the Ship
💻Code – Automate the Ship: https://drive.google.com/file/d/1MtFKUGdK7KRVIc1Xc1agcbUb29fB7Oo3/view
💻Code – Error Logging: https://drive.google.com/file/d/1Dd3EPkXIjmvoUioxq-bR0XQ5fsE0gwJp/view

Tutorial from Mt. Ford Studios. Check out their channel for more great tutorials: https://www.youtube.com/channel/UCYGcMtRTLWQHgLq4V3bP3sA

Learn to code for free and get a developer job: https://www.freecodecamp.com

Read hundreds of articles on programming: https://medium.freecodecamp.com

And subscribe for new videos on technology every day: https://youtube.com/subscription_center?add_user=freecodecamp

source

This Post Has 17 Comments

  1. Nøva

    Which is better to learn Python or JavaScript please tell ,

    👍If JavaScript
    Comment if Python

    And please do it fast I'm waiting

  2. Sun Kim

    No priority to preservation of the ship? I didn't see it turning around to defend itself from imminent collision. The Asteroids game does allow thrust. And in the arcade version, you have shooting UFOs that'd certainly kill the ship staying in a stationary position.

  3. Jayaram

    Can you make a python tutorial for neural network for this simple game called "2048 game"

  4. Herbert K

    Thks nice tutorial, i have checked your channel it has alot of cool staff and i have subscribed

  5. Firas Nizam

    Hi,
    Why you are putting the rotating algorithm and rules of playing and neural network together, if you are putting the rules of playing then there is no need for neural network.
    And I don't see the benefit for AI here in this example

  6. 3StepsAhead

    I think watching Standords' Machine Learning course + this tutorial should be standar AI training for any developer. Thank you very much c:

  7. Business Opportunity in Ruvol

    I have invented a Board Game [still unpublished and not yet out in the market] that I believe is guaranteed to be as challenging and exciting as CHESS. I called it “RUVOL.”

    It is my hope that one day Ruvol may surpass chess as the “Number One Board Game in the World.”

    The weakness of chess is it always starts in fixed positions that the opening moves become “memorizable.” In fact, not a few have so mastered the moves that they can play against their opponents “blindfolded.” It is for this very reason that the great Bobby Fischer introduced his so-called “Fischer Random Chess,” where the starting position of the pieces is “randomized” to make the memorization of openings impracticable. Fortunately, it is also for this reason that I invented Ruvol where “every game” has been calculated to be a challenging one to play.

    HOW IS RUVOL PLAYED and HOW YOU CAN MONETIZE IT?

    I detailed everything in my YouTube video. Here is the link: https://www.youtube.com/watch?v=jcqth0m3-R0

    BIG MONEY POTENTIAL IN RUVOL!

    It is worthwhile to note that the people who play chess will be the same people who will play Ruvol. In my Google search, I learned there are around 800 million chess players in the world. Even just a small percentage of these 800 million is good enough to earn big money from Ruvol either as an ONLINE GAME BUSINESS or as a PHYSICAL PRODUCT DISTRIBUTOR.

    You may contact me at: rodolfovitangcol@gmail.com.

    Thanks and God bless!

    RODOLFO MARTIN VITANGCOL

    The Ruvol Inventor

  8. Business Opportunity in Ruvol

    I have invented a Board Game [still unpublished and not yet out in the market] that I believe is guaranteed to be as challenging and exciting as CHESS. I called it “RUVOL.”

    It is my hope that one day Ruvol may surpass chess as the “Number One Board Game in the World.”

    The weakness of chess is it always starts in fixed positions that the opening moves become “memorizable.” In fact, not a few have so mastered the moves that they can play against their opponents “blindfolded.” It is for this very reason that the great Bobby Fischer introduced his so-called “Fischer Random Chess,” where the starting position of the pieces is “randomized” to make the memorization of openings impracticable. Fortunately, it is also for this reason that I invented Ruvol where “every game” has been calculated to be a challenging one to play.

    HOW IS RUVOL PLAYED and HOW YOU CAN MONETIZE IT?

    I detailed everything in my YouTube video. Here is the link: https://www.youtube.com/watch?v=jcqth0m3-R0

    BIG MONEY POTENTIAL IN RUVOL!

    It is worthwhile to note that the people who play chess will be the same people who will play Ruvol. In my Google search, I learned there are around 800 million chess players in the world. Even just a small percentage of these 800 million is good enough to earn big money from Ruvol either as an ONLINE GAME BUSINESS or as a PHYSICAL PRODUCT DISTRIBUTOR.

    You may contact me at: rodolfovitangcol@gmail.com.

    Thanks and God bless!

    RODOLFO MARTIN VITANGCOL
    The Ruvol Inventor

  9. PixelZYX

    THIS IS EXACTLY WHAT I NEEDED IVE BEEN SEARCHING FOR SOMETHING LIKR THIS FOR AGES THANK YOU SO MUCH

Leave a Reply