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
  • НаукаНаука

Комментарии • 31

  • @daddyofalltrades
    @daddyofalltrades 3 года назад +5

    Please do more machine learning projects and tutorials. Your explanations are so easy to follow !! Tysm

    • @ClarityCoders
      @ClarityCoders  3 года назад +2

      Thanks your comments really mean a lot. Feel free to jump in our discord if you like chatting about programming and such!

  • @levipack3835
    @levipack3835 3 года назад +6

    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.

    • @ClarityCoders
      @ClarityCoders  3 года назад +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!

  • @Timmysthirdbirthday
    @Timmysthirdbirthday 3 года назад +3

    cool and awesome vidio very cool interesting. your transition noise is intrusive, everything else ROCKS keep it up thx

    • @ClarityCoders
      @ClarityCoders  3 года назад

      Awesome thanks for the feedback! I agree not sure what I was doing with the noise I've improved on my newer videos haha.

  • @MrVersion21
    @MrVersion21 3 года назад +1

    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  3 года назад

      Centered meaning the ship is always in the center?

    • @MrVersion21
      @MrVersion21 3 года назад

      @@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 года назад +1

      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 года назад +1

      Thanks means a lot. I really enjoyed this video actually!

  • @sholomschonbuch5946
    @sholomschonbuch5946 4 года назад +1

    Awesome video!

  • @kevin5k2008
    @kevin5k2008 4 года назад +1

    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  4 года назад

      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.

  • @okay730
    @okay730 Год назад

    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.

  • @DrWho2008t101
    @DrWho2008t101 3 года назад

    thanks for the video

    • @ClarityCoders
      @ClarityCoders  3 года назад

      You bet! Thanks for watching more coming soon!

  • @bluegru
    @bluegru 3 года назад +1

    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  3 года назад +1

      Yeah! Very useful to compare your from scratch algorithm against library is called stable baselines.

  • @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.

  • @muhammad_talha
    @muhammad_talha 3 года назад

    what operating system you are using?

  • @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 года назад +1

      I got some in the works after my tutorial series is over!