I programmed an A.I. to DESTROY the game PONG

Sdílet
Vložit
  • čas přidán 24. 11. 2018
  • I have a website: www.thebigcb.com
    by the way don't expect the website to work on your phone, because it wont.
    Check out Sentdex's tutorial: • Intro and Screen readi...
    I also used the coding trains pong processing code: • Coding Challenge #67: ...
    I think thats all the code i stole.
    New videos every Saturday morning (probably)
    Twitter: / code_bullet
    Patreon: / codebullet
    Discord: / discord

Komentáře • 3K

  • @cirdanelensar1608
    @cirdanelensar1608 Před 5 lety +4706

    "I'm just gonna plagiarize that."
    The mark of a true programmer.

    • @TrimutiusToo
      @TrimutiusToo Před 5 lety +166

      I mewn copy paste and deleting unneeded code, are the two best techniques...

    • @franzluggin398
      @franzluggin398 Před 5 lety +58

      YOINK!!!

    • @theinspirationalshow9713
      @theinspirationalshow9713 Před 5 lety +14

      This made me laugh way too much

    • @osolomons
      @osolomons Před 5 lety +37

      What do stackoverflow programmers do when the stackoverflow server crashes?

    • @Thatonefuckinguy
      @Thatonefuckinguy Před 5 lety +11

      99 percent of my code is like largely helped by my friend who goes to collage. xD Because educational system works. I'm too stupid to graduate highschool, but I've understood basic programming since I was like about 13. Yep, that makes perfect sense to me.

  • @Velociapcior
    @Velociapcior Před 5 lety +5068

    *CB copies some code from internet* - "That's how coding is done"
    Literally my whole developer career described

    • @nanajosh
      @nanajosh Před 5 lety +145

      Don't you love open source

    • @xanderprice9981
      @xanderprice9981 Před 5 lety +7

      Nice

    • @bastian_5975
      @bastian_5975 Před 5 lety +84

      I would like to thank google and SO for my entire career.

    • @albertoduits5895
      @albertoduits5895 Před 5 lety +31

      Velociapcior i felt this comment inside my bones

    • @lmaoroflcopter
      @lmaoroflcopter Před 4 lety +21

      import stackoverflow;
      so = new stackoverflow('python');
      so.do("play pong");

  • @tokra1000
    @tokra1000 Před 5 lety +699

    Copy and paste code: “that’s how coding is done”
    Much truer than most realise.

    • @josephdavison4189
      @josephdavison4189 Před 3 lety +3

      Anthony Bailey it’s called copypasta (yes that’s the real name)

    • @proloycodes
      @proloycodes Před 3 lety

      the ultimate truth

    • @amitir22
      @amitir22 Před 3 lety +9

      we are being paid to know what to copy and how to change it to fit our assignment

    • @eueumesmo345
      @eueumesmo345 Před 3 lety +6

      Copy, paste, adapt, overcome

  • @antideadmeme8057
    @antideadmeme8057 Před 5 lety +1936

    Program an A.I that can code an A.I that can code an A.I that can play pong

    • @spacebear4742
      @spacebear4742 Před 5 lety +35

      Anti dead meme Organization machine learning is a thing.

    • @RAFMnBgaming
      @RAFMnBgaming Před 5 lety +38

      So a genetic algorithm for genetic algorithms.

    • @maxwellhunt3732
      @maxwellhunt3732 Před 5 lety +24

      There's actually a technique that does that sort of thing called HyperNEAT

    • @aaronking2020
      @aaronking2020 Před 4 lety +8

      Skynet: :D

    • @billyma6
      @billyma6 Před 4 lety +5

      Anti Dead Meme **Horizon Zero Dawn intensifies**

  • @senjugold6977
    @senjugold6977 Před 5 lety +3338

    Pong players HATE him for this simple trick

  • @westboundnut9241
    @westboundnut9241 Před 5 lety +3837

    An AI that creates its own CZcams channel with regular uploads

    • @1996Pinocchio
      @1996Pinocchio Před 5 lety +18

      What kind of videos are you thinking about?

    • @lem2004
      @lem2004 Před 5 lety +58

      0001 0111
      Turn it into decimal and count it on alphabet
      A I

    • @charleseanman6649
      @charleseanman6649 Před 5 lety +168

      You mean five minute crafts

    • @brimstoneludovico1605
      @brimstoneludovico1605 Před 5 lety +16

      WEBDRIVER TORSO is one of them, I'm not joking, visit that channel, is creepy af

    • @fyshlearnstoskate
      @fyshlearnstoskate Před 5 lety +10

      C'mon everyone knows that is an upload quality test bot.

  • @f0ld920
    @f0ld920 Před 5 lety +1121

    Just discovered this channel
    So basically the concept is "I'm pretty shitty at games, but I'm pretty good at coding, so let's make AI that are good at games in my place", isn't it ?

    • @Malenrick
      @Malenrick Před 4 lety +188

      Close.
      It's watch me TRY to make an AI and only occasionally succeed at making a good one

    • @notahotshot
      @notahotshot Před 4 lety +40

      Wow! You're like Christopher Columbus, you discovered something a lot of people already knew about. Good job! We should name a holiday in your honor.

    • @HaraldHardraade1066
      @HaraldHardraade1066 Před 4 lety +64

      It’s more like “I’m pretty shit at coding, but I’m even more shit at games”

    • @sparecreeper1580
      @sparecreeper1580 Před 4 lety +6

      Yup

    • @spacechase9705
      @spacechase9705 Před 4 lety +22

      exactly, except it's "I'm pretty shitty at games, but I'm -pretty good- below decent at coding, but I can code, so let's make AI that are good at games in my place."

  • @ProPupperPetter
    @ProPupperPetter Před 5 lety +173

    When you spend 20 seconds every video to pause it exactly when the subliminal message is displayed.

    • @alphag4mer909
      @alphag4mer909 Před 4 lety +14

      @Fredd Colour Green better tip use the ">" and "

    • @priyanshugoel3030
      @priyanshugoel3030 Před 3 lety +7

      *Stops time to see the text*

    • @vishesh0512
      @vishesh0512 Před 3 lety +5

      @@alphag4mer909 OMG! This has saved countless man-hours and truly changed my life...

    • @puppergump4117
      @puppergump4117 Před 2 lety +1

      @@alphag4mer909 isn't it just ',' and '.' since you're not holding shift

  • @TempestKrimps
    @TempestKrimps Před 5 lety +1937

    >programs an ai to destroy pong
    >losing the game in thumbnail

  • @nicholasnguyen4564
    @nicholasnguyen4564 Před 5 lety +8169

    Next up: *I programmed an AI to print money*

    • @KT.325
      @KT.325 Před 5 lety +37

      I wish.

    • @mattd.2932
      @mattd.2932 Před 5 lety +213

      FBI OPEN UP!

    • @jess-xt1nm
      @jess-xt1nm Před 5 lety +40

      @@bleeve9425 it's a joke

    • @Rosiewao
      @Rosiewao Před 5 lety +49

      Bleeve 942 wooosh

    • @MCkrisoka
      @MCkrisoka Před 5 lety +53

      You meant "I plagerized money printer AI"?

  • @cpt.honklerof3rdkekistania400

    Next up: i programed an ai to topple the cambodian government

    • @accomplisheddiplomat4091
      @accomplisheddiplomat4091 Před 5 lety +47

      Implying they have a government to topple.

    • @Blasted2Oblivion
      @Blasted2Oblivion Před 5 lety +6

      Thats easy. Just shift wage gap and class outrage from upper to middle class and destabilize the local economy. Use some chem trails to speed up the process.

    • @4.0.4
      @4.0.4 Před 4 lety +11

      @@Blasted2Oblivion The wage gap _and_ chemtrails on a single comment? What else, the earth is flat?

    • @Blasted2Oblivion
      @Blasted2Oblivion Před 4 lety +16

      @@4.0.4 No. Just secretly ruled by Squirrels.

    • @TTobiTobi_11
      @TTobiTobi_11 Před 4 lety +1

      Im cambodian-

  • @cyzerraze6829
    @cyzerraze6829 Před 5 lety +464

    Pong players : playing 24/7 to be a god
    CB: makes an AI

    • @cyzerraze6829
      @cyzerraze6829 Před 4 lety +3

      @akusti boi yeah! It's always nice seeing a Terraria player in the wild :)

    • @ramytf
      @ramytf Před 3 lety +2

      terrarriaaaaaaaa

    • @ramytf
      @ramytf Před 3 lety

      1.4

    • @maxdukhovskoy1406
      @maxdukhovskoy1406 Před 3 lety +1

      CB: coding 24/7 to make an AI

  • @josephwodarczyk977
    @josephwodarczyk977 Před 5 lety +1778

    This is by far the most accurate and realistic coding video I've ever seen.

    • @TiaKatt
      @TiaKatt Před 5 lety +219

      The swearing, the way a "3 hour project" took days, the...adaptation of existing code from external sources.
      It speaks to our souls.

    • @dancorps1388
      @dancorps1388 Před 5 lety +84

      Programming nee new project Day 1) I'm glad to be on this assignment.
      Day 7) oh God, just delete this monstrosity. It hideous. It works for 30 seconds, and then the computer catches on fire.
      the next day) ah, glad that over. Oh look, a new coding project up for grabs. I try it out.

    • @JorgetePanete
      @JorgetePanete Před 5 lety +2

      @@dancorps1388 nee?

    • @JorgetePanete
      @JorgetePanete Před 5 lety

      @@dancorps1388 It hideous?

    • @JorgetePanete
      @JorgetePanete Před 5 lety

      @@dancorps1388 that over?

  • @finmin2k
    @finmin2k Před 5 lety +497

    *AI learns to cyberbully*

    • @acerbicgeoff7821
      @acerbicgeoff7821 Před 5 lety +9

      We already had Tai.AI, and she was beautiful

    • @imperialwatch380
      @imperialwatch380 Před 5 lety +11

      beep boop fuck yourself beep boop

    • @hectornonayurbusiness2631
      @hectornonayurbusiness2631 Před 5 lety +3

      My kind of AI

    • @jacencade4019
      @jacencade4019 Před 5 lety +1

      You can buy those on Twitter

    • @taureon_
      @taureon_ Před 5 lety +7

      badtexts==[you suck,you are shit,fuck you,N00B, go eat crap]
      forever{
      badtext#==ran(1-5)
      if (commentexist?==1){
      reply ("item (badtext#) (badtext)")
      }
      }end

  • @youthdiamonds6472
    @youthdiamonds6472 Před 5 lety +615

    Next:I created an AI which make AI

  • @MuchWhittering
    @MuchWhittering Před 4 lety +172

    I feel like the title "Python Plays GTA V" is promising more than it can possibly deliver.

    • @CrypticConsole
      @CrypticConsole Před 3 lety +9

      It was pretty good actually.

    • @lextatertotsfromhell7673
      @lextatertotsfromhell7673 Před 3 lety

      Oh it’s you, the guy who wanted them to refilm zero one so Izu didn’t die

    • @MuchWhittering
      @MuchWhittering Před 3 lety +3

      @@lextatertotsfromhell7673 What the fuck are you talking about?

    • @lextatertotsfromhell7673
      @lextatertotsfromhell7673 Před 3 lety +1

      @@MuchWhittering your old pfp and name or something were the same as someone else, so I got you confused for them

    • @WinterNox
      @WinterNox Před 2 lety

      @@MuchWhittering Fun fact: Pong was very popular in early days!!

  • @willisval7973
    @willisval7973 Před 5 lety +867

    Next up: I programmed an AI to hack into military databases

  • @bach_yr
    @bach_yr Před 5 lety +308

    Who would win? : a smart ass machine able to make complex calculations faster than the conviced human speed
    or one prime boy

  • @lukiverse
    @lukiverse Před 3 lety +18

    Code Bullet's resumé -
    Special Skills:
    I can copy and paste code from the internet!

  • @infiniteplanes5775
    @infiniteplanes5775 Před 3 lety +19

    Looking though the comments, I’m beginning to wonder how better would my coding be if I just took pieces off the internet instead of trying endlessly until I even consider looking up the problem.

    • @baronvonbeandip
      @baronvonbeandip Před 2 lety +2

      You get really good at walking when you stop thinking about it like it's QWOP

    • @friedsputnik2710
      @friedsputnik2710 Před 2 lety +1

      Dont know what CWOP is but yeah that mindset of “looking it up is cheating” is only gonna hurt you, at least at first. Instead, plagiarize code so hard that you learn how it actually works. Do that enough times with the same command and you’ll figure it out eventually.

  • @sentdex
    @sentdex Před 5 lety +61

    If you're having an issue where something like a number is in a spot that causes trouble...etc, you can just use opencv to just over it up with a black box or something. The ball will also disappear under it, but it's less likely to confuse the AI. When we play a shooter game in 3rd person, we also just cover up the main character so we don't keep trying to aim at ourselves, for example.

    • @EEEEEEEE
      @EEEEEEEE Před 10 měsíci +2

      E

    • @Newfsters
      @Newfsters Před 10 měsíci

      @@EEEEEEEE How are you everywhere. I thought maybe CB would be a safe space. I was wrong.

  • @ryanwargo989
    @ryanwargo989 Před 5 lety +1496

    Do tetris please

  • @Thunda8
    @Thunda8 Před 5 lety +80

    *Does 1 move in chess game*
    *Explorer crashed*
    AI won I guess

  • @DownloadedPixelz
    @DownloadedPixelz Před 5 lety +58

    Ive actually programmed pong and and following AI in JavaScript... I didnt know I could get views for this damnit

  • @snozzmcberry2366
    @snozzmcberry2366 Před 5 lety +378

    "Thaaaank yooou, taking thiiis" - the method of programming responsible for 90% of projects since the inception of the online search engine and Q&A style forum.
    ...those sped up parts of writing code are making me itch to build something. It's been years. Code is just.. beautiful. A concisely written, well formatted, well structured & cleanly executed sheet of code is nothing short of a work of art.
    Any tips on getting into Python without sitting through an article on Hello World with 20 paragraphs on the intricacies of printing text (I may or may not have attempted & promptly given up on learning one too many new languages, putting me through a few too many "back to basic" tutorials)

    • @droidBasher
      @droidBasher Před 5 lety +2

      My advice is to grab IDLE from the python.org and start trying things out in the interpreter. Make something that solves a simple but real problem for you, or solves a simple and fake problem, or unsolves a problem. Just make something and learn from it.
      If you want a minimal guide I like this one:
      www.stavros.io/tutorials/python/

    • @JobsSharp
      @JobsSharp Před 5 lety +24

      Aah programming. 10% inspiration, 90% *borrowing without permission*

    • @four-en-tee
      @four-en-tee Před 5 lety +24

      JobsSharp Its funny because we're all mostly plagerists and reverse engineers. God bless open source.

    • @mr.destructive8554
      @mr.destructive8554 Před 5 lety +1

      Use Derek Banas' learn to python tutorial... that's how I learned. He explains everything really well!

    • @hyperupcall
      @hyperupcall Před 5 lety +4

      Don't get IDLE, it's complete trash. You can use PyCharm community which is pretty good or any other besides IDLE such as Sublime Text, Visual Studio Code, or Atom should work well!

  • @Happyface45678
    @Happyface45678 Před 5 lety +312

    This man's dedication. Actually doing work on the same day as his exams. Props man!

    • @5amg1
      @5amg1 Před 5 lety +4

      Was probably just putting off revision

    • @savouryarc5___873
      @savouryarc5___873 Před 5 lety +2

      He just finished his chunin exams

  • @mazingdaddid
    @mazingdaddid Před 4 lety +14

    CB: says he's gonna be more consistent, upload every week
    Me: was good to hear from you a month ago...

  • @thenonfurry
    @thenonfurry Před 4 lety +25

    Something says:
    *Evan respects his audience and is grateful for every single one of you*

  • @croatiaboy11
    @croatiaboy11 Před 5 lety +371

    AI DESTROYS Pong game with LOGIC and FACTS

    • @four-en-tee
      @four-en-tee Před 5 lety +4

      Not even facts, just only logic. xd

    • @Its_Koala
      @Its_Koala Před 5 lety +5

      HEY KID, WANT SOME HIGH QUALITY FACTS? Well check out India.super.facts on Instagram. (lol not my account just hillariously wrong facts)

    • @ZeRandomizor
      @ZeRandomizor Před rokem

      @@owengrimm1370 First generation of ai's be like

    • @RandomRothbardian
      @RandomRothbardian Před 11 měsíci

      AI: facts don’t care about your feelings, OK folks?

  • @pierrehanlet7536
    @pierrehanlet7536 Před 5 lety +327

    Next video - do this on an online Tetris game and beat real people with a perfect AI

    • @larsdeboer3599
      @larsdeboer3599 Před 5 lety +5

      Yes. Just yes

    • @guillep6639
      @guillep6639 Před 5 lety +9

      tetris is complicated, but it could work

    • @AVerySexuallyDeviantOrange
      @AVerySexuallyDeviantOrange Před 5 lety +7

      Tetris is incredibly hard, since the AI cannot adapt past what it is told to do. It won’t stack to allow for combos or to conserve space, but to set down lines and clear space quickly. No AI can beat a pro at Tetris, and none will until someone figures out a way to make it think ahead.
      WHICH SUCKS BECAUSE PUYO PUYO TETRIS PRO NEEDS TO BE STOPPED.

    • @guillep6639
      @guillep6639 Před 5 lety +3

      @@AVerySexuallyDeviantOrange it can be hard. But its not imposible. Just tell the ai to build space for a tetris until it gets a line pice.

    • @AVerySexuallyDeviantOrange
      @AVerySexuallyDeviantOrange Před 5 lety

      Guille p Having it decide where to stack pieces effectively to allow for combos is the hard part, I mean. Like, getting a full 4 lines (excluding a spot for the I beam) prepped up is exceptionally hard when you can’t use foresight on whether to fill a spot (such as using a T to fill in a single step on the left side of the matrix while a Z is in the coming blocks, rather than storing it and using the Z to fill the step and placing a T on top of it if an S is in the coming pieces) or if you should just keep building in the middle and wait for a more preferable piece to come along.

  • @ryanyang3347
    @ryanyang3347 Před 5 lety +1

    For the wall bounce problem, you can reflect the entire thing over the bottom boundary, and have another paddle that mirrors the real paddle. You can then allow the ball to go past the bottom wall and try to hit it in the mirror world

  • @tpuggles
    @tpuggles Před 2 lety +4

    10:32, “I’m gonna try putting a video every week” said code bullet on November 25, 2018

  • @phantomderp834
    @phantomderp834 Před 5 lety +1499

    Ben Shapiro DESTROYS Marxist pong game

    • @ELMiLiCrAcK
      @ELMiLiCrAcK Před 5 lety +25

      "Im going home, i am home"
      God 2071
      Also
      "want some impresive AI FUCK YOU!"

    • @juanps2721
      @juanps2721 Před 5 lety +21

      With LOGIC and FACTS

    • @wakaziar9373
      @wakaziar9373 Před 5 lety +4

      Damn commies, better dead than red

    • @palebluedot7435
      @palebluedot7435 Před 5 lety +5

      That like how they title every right video lol
      I stopped trusting ben when he tried to disprove global warming and he started stating fact i knew were used to manipulate instead of educate
      Like saying antartic sea ice is growing
      But he does not explain why

    • @Rangernewb5550
      @Rangernewb5550 Před 5 lety +1

      I've been getting too many similar recommendations on my feed

  • @mr.ballstone1914
    @mr.ballstone1914 Před 5 lety +1412

    Python: I made an AI that play gta 5.
    CB: I made an AI that plays pong.
    Python: *face palm*

    • @1996Pinocchio
      @1996Pinocchio Před 5 lety +20

      Why? That's how one learns.

    • @mr.ballstone1914
      @mr.ballstone1914 Před 5 lety +32

      Punocchio just a joke

    • @YT7mc
      @YT7mc Před 5 lety +111

      Python is the programming language...

    • @YT7mc
      @YT7mc Před 5 lety +39

      MR. ballstone Sentdex made the GTA 5 AI

    • @cb7394
      @cb7394 Před 5 lety +21

      I don't get this. Sendex made the GTA5 AI

  • @toast_bath5937
    @toast_bath5937 Před 3 lety +2

    Code Bullet: Making an A.I. to play pong
    Me: Struggles to make pong

  • @asherael
    @asherael Před 5 lety +10

    never heard anhyone call the paddle a "pong" before
    Kinda dig it

  • @JamesAllenQuinn
    @JamesAllenQuinn Před 5 lety +306

    you should have programmed the ball to hit the edge of the paddle so that you can actually score points instead of just hitting it back and forth.

    • @sbsftw4232
      @sbsftw4232 Před 5 lety +34

      I know this is way late, but exactly. He didn't program it to win, just to never lose. Not exactly the same. Maybe he could redo this challenge but tie neat into it with points scored in least amount of time as a measure of fitness.

    • @fuwameanssoft
      @fuwameanssoft Před 4 lety +12

      If he did he’d probably have to use Q learning, to give a proper incentive for the AI to score points

    • @shmepdoesthings4856
      @shmepdoesthings4856 Před 4 lety

      This is a late comment because i can

    • @spacechase9705
      @spacechase9705 Před 4 lety

      do you even KNOW the sheer amount of bugs that would cause?

    • @lordspotato5032
      @lordspotato5032 Před 3 lety +6

      Space Chase literally no project never had bugs. Just because it might make bugs isnt a reason for him not to try it.

  • @ILiekFishes
    @ILiekFishes Před 5 lety +233

    AI Learns to play Tetris

    • @tfpcjp
      @tfpcjp Před 5 lety +1

      ILiekFishes yes

    • @D.KlWA-aG
      @D.KlWA-aG Před 5 lety +3

      Oh boi a nightmare

    • @ansh6370
      @ansh6370 Před 5 lety +1

      I remember there being an AI designed to play Tetris but when it was playing it paused the game because the only way to win that game is to not play and it froze forever.

  • @lewddrip5383
    @lewddrip5383 Před 5 lety +10

    Make an AI to make AIs, so you're making AIs without doing anything.

    • @DoctorNemmo
      @DoctorNemmo Před 4 lety +1

      That's how Skynet becomes self aware you dolt

  • @Kalbr0shorts
    @Kalbr0shorts Před 4 lety +5

    Me: Mommy, The Pong Cartridge Is Broken
    Mom: Oh, sorry, the CB mice must've gotten to it again. Sorry.

  • @ChristOfSteel
    @ChristOfSteel Před 5 lety +46

    Hey , just in case you want revisit the Pong game, or want to follow an object on screen in the future, have a look at kalman filters, they are quite mathmatical, but once you understand them, they are not that hard. They are used to track all sorts of things and are very fast ;)
    On another note, your idea to extrapolate the position of the ball, based on its velocity was a good start, but can still be improved.
    * For one, the angle the ball moves never changes, unless it collides with something.
    * You do not need to search the whole screen for the ball. You have a rough estimate, where the ball should be, just look there. If it is not there, then you can search other places
    * Just ignore the area, where the points are shown. The ball is not often there, and in the case it is really there, your tracking with the kalman filter should be exact enought.
    Hope that can help you (and others, who read this) out.

  • @czpiaor
    @czpiaor Před 5 lety +82

    Next up: “I programmed my AI to do my homework”

    • @filippodhorec1955
      @filippodhorec1955 Před 5 lety

      How much for that

    • @dizknots9357
      @dizknots9357 Před 5 lety +1

      Next up, I learn how to make an original comment

    • @ruby_dragon4034
      @ruby_dragon4034 Před 5 lety

      You expected a name, but it was me, DIO!
      You expected a name, but it was me, DIO!

  • @PixlPlayer
    @PixlPlayer Před rokem +1

    5:40 thank you for introducing me to this song. Fantastic

  • @jellyesquivel537
    @jellyesquivel537 Před 5 lety +2

    “If you “blow” the enemies pong go up,” nice phrasing

  • @bobbypage9982
    @bobbypage9982 Před 5 lety +202

    Oh dear god, pong is back...

    • @nicholasnguyen4564
      @nicholasnguyen4564 Před 5 lety +2

      Angrywolf 378 idot...hm

    • @joeygenna4801
      @joeygenna4801 Před 5 lety +2

      On the next episode: CodeBullet builds an AI that can beat any enemy from the dark souls series withought taking any damage.

    • @bobbypage9982
      @bobbypage9982 Před 5 lety +1

      MrLeft Hand if he can build an AI that can best dark souls then there is no hope for humanity

    • @joeygenna4801
      @joeygenna4801 Před 5 lety

      @@bobbypage9982 lol

  • @rainsparks29
    @rainsparks29 Před 5 lety +73

    I see 'AI', 'Destroy', and 'Pong' in the same title and I click. Simple as.

  • @Helladamnleet
    @Helladamnleet Před 2 lety +2

    >Copying code from tutorials and kind of piecing it together
    Yep, I can 100% confirm this is how coding works

  • @napoleon2564
    @napoleon2564 Před 3 lety +2

    I would have just used the delta between two frames to interpolate a line. If the line crosses any of the pixels on the right side of the screen, the ai has to go to that position.

  • @failedkirby618
    @failedkirby618 Před 5 lety +93

    I love code bullet

  • @isaiahdahler8933
    @isaiahdahler8933 Před 5 lety +18

    8:37
    "I'm going home. I am home."

  • @vt1-vince15
    @vt1-vince15 Před 5 lety +52

    Next; *I programmed the AI to program the AI*

    • @Minutemenofficial2
      @Minutemenofficial2 Před 5 lety

      To program the ai to program the ai to program the ai to program the ai to program the ai

    • @vt1-vince15
      @vt1-vince15 Před 5 lety

      Hypersonicracing422 3 that would be good

    • @yafi22
      @yafi22 Před 5 lety

      Lololololololololololololololololololol

    • @foxwhite25
      @foxwhite25 Před 4 lety

      MATRIX

    • @jacopoparenti9939
      @jacopoparenti9939 Před 4 lety

      I used the AI to use the AI

  • @ThatUnknownDude_
    @ThatUnknownDude_ Před 3 lety +4

    Next: "I code an AI which codes and AI smarter than their creator"

  • @vladkrstevski1482
    @vladkrstevski1482 Před 5 lety +69

    “I am just gonna plagiarize that”
    The real reason why he’s not in uni

  • @TheCodGamer-pr9pe
    @TheCodGamer-pr9pe Před 5 lety +41

    Next up you should create an AI that creates an AI that creates an AI that creates an AI that creates an AI that creates an AI that creates an AI that creates an AI that creates an AI that creates an AI that creates an AI that creates an AI that creates an AI that plays Mario maker

  • @sheemy637
    @sheemy637 Před 5 lety

    Honestly can't help but love your voice, you sound so happy all the time wtf

  • @lukegarvey6668
    @lukegarvey6668 Před 2 lety

    2:20 Wow Code Bullet, You have really grown since than in your programming skills!!

  • @TrimutiusToo
    @TrimutiusToo Před 5 lety +71

    Yeah... I am software engineer myself (that is how i earn money)... Question why not copy it from the site never even occurred to me, because i knew how hard it is to begin with... It is literally easier to create my own knock off from scratch than worry about reading someone else's game... I might have considered it for open source, but even then idk...

    • @eclipsex1
      @eclipsex1 Před 5 lety +1

      That's cool I want to be a software designer when I grow up or animate a show or video game

    • @beelal6407
      @beelal6407 Před 5 lety +1

      Do you devlop games? If so i just wanted advice as where to learn c# because i like to make incremental clicker games with unity

    • @TrimutiusToo
      @TrimutiusToo Před 5 lety +12

      @@beelal6407 no i work in finance world. But if you want to learn unity, then free courses that are available on unity website are pretty good. They will give you basics of c# needed too, and then if you want to do something not so basic just google "how to do x in c#"... CB copy pasting someone else's code wasn't a joke that is how it is usually done, because you don't want to invent a wheel...

    • @nutcrugger5123
      @nutcrugger5123 Před 5 lety +1

      Wait do professional software engineers use scratch?

    • @TrimutiusToo
      @TrimutiusToo Před 5 lety +1

      @@nutcrugger5123 no... Why would we? But a lot of things you do there still apply. It is just not generic enough...

  • @jinx12373
    @jinx12373 Před 5 lety +36

    Hey, I didnt look too closely at how you got python to "see" the ball, but some advice that made a huge difference for me:
    Taking a sum total of a screenshot value will allow you to quickly recognize whether or not the ball in in an image, or if it is a base image. What I would have done in this situation is take screenshots in halves until I had reduced the ball into a square space that is the same size as the length of the paddle. It's not important to know exactly where the ball is, only that it is inside the paddle area. So by having a prebuilt library of what the screen looks like without the ball, and summing those colors number value in comparison to what it currently is, and working in big chunks into a smaller square would quickly allow the program to give "good enough" data, and perhaps even make the wins more common, as the best way to win is to actually have the paddle hit the ball closer to the edge.
    If any of that makes sense.

  • @TanmaiKhanna
    @TanmaiKhanna Před 3 lety +1

    Right now it's still trying to defend each time which is prolly why it's taking so much time but it'll be interesting if instead of just defending it tries to see where the enemy paddle is and then hit it such that the enemy wont be able to reach it.

  • @lxtrx
    @lxtrx Před 3 lety

    Thank you so much for the vids I watch them all the time at like 1 in the morning and love them. You probably won't see this cuz it's an old vid but still.. thank you!

  • @themoosayscow
    @themoosayscow Před 5 lety +20

    You know it’s intense from the pong ball on fire

  • @felixjanetzki7364
    @felixjanetzki7364 Před 5 lety +21

    Program an AI that programs an AI which repliactes itself

    • @felixjanetzki7364
      @felixjanetzki7364 Před 5 lety +3

      Omar G worm to be precise, i think

    • @davidwuhrer6704
      @davidwuhrer6704 Před 5 lety +7

      Technically, a program that replicates itself is bacterium. If it does nothing but replicate itself, it is a Quine.
      If it copies itself over a network, it is a worm.
      If it injects itself into another program, it is a virus.
      If it cracks someone else's code, it's a logic bomb.

    • @TylerLawlawsy02
      @TylerLawlawsy02 Před 5 lety +1

      Isn't that how Terminator started? But it had robots too?

  • @iuppiterzeus9663
    @iuppiterzeus9663 Před 5 lety

    i'd like to see more about your coding like how your class structure looks like, what methods those have etc.

  • @xqiuvmah
    @xqiuvmah Před 5 lety

    I no absolutely nothing about coding or anything about computers more advanced then what you learn about in high school. Yet I still enjoy watching you struggle to create these a.i.

  • @gamingbutnotreally6077
    @gamingbutnotreally6077 Před 5 lety +13

    Breaking News: Local Programmer and Content Creator gone missing. If you see him, please do not provoke him with a computer and keyboard.

  • @ParoxyDM
    @ParoxyDM Před 5 lety +3

    Only on this channel do I get excited when the host starts with “This video is going to be a bit of a mess”. I immediately think “Oh, this is going to be good!”

  • @conradstaple5594
    @conradstaple5594 Před 4 lety

    First off, nice work on the video even if it didn't go as planned, it's still better than what I would have tried. I am a beginner coder and was caught off guard on the website. The website really caught my eye because it looked like a similar layout to what my website class had us make. I was curious if you took the same class and by chance know the grade it got. keep up the interesting content and have a nice day.

  • @caleborg5688
    @caleborg5688 Před 4 lety +1

    I like how cb doesn't even try to convince us that he doesn't procrastinate making videos

  • @adorable_yangire
    @adorable_yangire Před 5 lety +36

    i bet you can't do this: program ai to learn to play trials fusion.

    • @kallyanrostiell3367
      @kallyanrostiell3367 Před 5 lety +2

      OH MY GAWD.... yes please

    • @DgkYogi
      @DgkYogi Před 5 lety +1

      Oh god

    • @Pheatan
      @Pheatan Před 5 lety +1

      While not an ai. You can use a TASbot. (Tool. Assisted. Speedrun. Bot) using this you can get a programmed robot to do the inputs making a perfect race

  • @Metaknightkirby2
    @Metaknightkirby2 Před 5 lety +44

    Regarding the intro: You gotta remember, the people who complained ARE cinemasins fans, so they're not the brightest bunch.

    • @bluestonethe2nd
      @bluestonethe2nd Před 5 lety

      how would you know its cinemasins if you didn't watch them? i didn't recognize it so

    • @Metaknightkirby2
      @Metaknightkirby2 Před 5 lety

      @@bluestonethe2nd Either you know CinemaSins, know their intro, and then go on to complain he ripped it off, or you don't and you wouldn't. No real grey area here.

  • @Lord_Drakostar
    @Lord_Drakostar Před 4 lety +1

    I saw this video today when I was searching pong, and then played pong on that site you were using. On my computer on Microsoft Edge. I'm in CZcams on my phone. Nice.

  • @CuddleCuttlefish
    @CuddleCuttlefish Před 5 lety +97

    I'm currently in a depressive episode. I woke up at 8 and I've been in my bed without motivation to do literally anything other than watch videoes on CZcams since (it's now 10;45 AM). I'm hungry but don't have the energy to make food. I feel nothing, no emotion, no motivation to do anything. However, the 'I'm going home. I *am* home, Fuck you' part. Somehow actually made me laugh and smile. Thank you

    • @chall-us6de
      @chall-us6de Před 5 lety +5

      Stay strong. :)

    • @somerandomstickboy150
      @somerandomstickboy150 Před 5 lety +13

      Am I invited to your pity party?

    • @CuddleCuttlefish
      @CuddleCuttlefish Před 5 lety +1

      @@somerandomstickboy150 thanks for that.

    • @Nederlance
      @Nederlance Před 5 lety +6

      OK mate don't care

    • @obligatoryusername7239
      @obligatoryusername7239 Před 5 lety +3

      @@CuddleCuttlefish Please don't listen to those asses. Stay strong. Psychcentral.com has forums where you can talk with people suffering from depression. Click on community, scroll down to Depression under Mental Health Support, then you can make a thread, or join one (I have not seen any rules about interposing on another's thread, but please ask a moderator just in case.) All you need is a free account. There are other forums like it as well that may suit you better.

  • @Tr1ckyRicky
    @Tr1ckyRicky Před 5 lety +11

    ty code bullet for the effort i love your conetnt and would love to learn to this when im older so i can redo some of your AI

  • @williamcoberly3755
    @williamcoberly3755 Před 5 lety +123

    The fact that you don't excessively add comments to your code scares me...

    • @CapnSurvivalist
      @CapnSurvivalist Před 5 lety +26

      William Coberly makes me feel better because I do not use comments... like ever.

    • @arya6085
      @arya6085 Před 5 lety +10

      I guess his code is for his eyes only

    • @beelal6407
      @beelal6407 Před 5 lety +1

      @@TheEclecticDyslexic i agree with you when i was learning python my teacher told me always type out the code so you can memorise it/learn it that way when you get a job in programing you wont need a reference sheet with 24/7

    • @derekegolf1474
      @derekegolf1474 Před 5 lety +4

      @@arya6085 Which is fine until you're working on a new project and remember something from an old project might be helpful and then you look at the code from the old project and wonder what the hell your brain was doing when you wrote it

    • @KuraIthys
      @KuraIthys Před 5 lety +2

      @@derekegolf1474 Yeah, and if you're a hobbyist you might have projects that you work on for 2 months, forget about for a year, then come back to...
      Without copious amounts of comments, the typical reaction to that is 'wtf is this shit!?'.
      And that's when it's YOUR OWN code...
      Yeah...
      There are of course people that think excessive commenting is bad.
      And they do have a point in that if you're commenting stuff that should be obvious from the code itself that's kind of a waste of time, but also the more comments there are the more likely it becomes that the comments and code become out of sync.
      A comment that tells you something contradictory to the code itself is probably worse than no comment at all I suppose.
      But nonetheless I err on the side of excessive commenting, personally...
      Easier than trying to guess what bizarre logic I was using a year ago. XD

  • @bart7782
    @bart7782 Před 5 lety +81

    Ehm... Your already playing against an ai

    • @een3162
      @een3162 Před 5 lety +17

      Bart R The Ai he played against is programmed into the game, so it can practically teleport around the screen, the Ai he made has to use the same resources as a player.

    • @pipduck2478
      @pipduck2478 Před 5 lety +4

      It's not really an ai since it's basically following the ball everywhere even when it's not necessary.

    • @legdarytruenightsedge9718
      @legdarytruenightsedge9718 Před 5 lety +1

      Ya but his ai is smarter

    • @Liggliluff
      @Liggliluff Před 4 lety +6

      Sad that he didn't point that out. The reason why he makes his own games, is so he can read the in-game values, just like that AI is doing. This video proves his point more than he thought, he just didn't realise that.

    • @dallen3000
      @dallen3000 Před 4 lety

      @@legdarytruenightsedge9718 it's "his ai are smartest"

  • @Oxmond
    @Oxmond Před 4 lety +1

    My AI opponent was not happy with my serve - he kept returning it! 😜

  • @EchoBuildsThings
    @EchoBuildsThings Před 5 lety +25

    I love your vids. This one was no different!

  • @jr_kulik
    @jr_kulik Před 5 lety +256

    AI is just a bunch of If statements change my mind.

    • @birddaddydetta
      @birddaddydetta Před 5 lety +44

      *injects AI into your mind*

    • @elizabethp.7354
      @elizabethp.7354 Před 5 lety +2

      René Kulik if or if then lol sometimes it's "to" like "to go"

    • @marioisawesome8218
      @marioisawesome8218 Před 5 lety +85

      No no no no no no its just a bunch of command blocks and invisible Armor stands

    • @norrix5122
      @norrix5122 Před 5 lety

      If than statements

    • @eamartig
      @eamartig Před 5 lety +3

      Norrix he uses python so if else

  • @Jig_up
    @Jig_up Před 2 lety

    Thanks for that “Have a good day” at the end of the video- I know you didn’t mean me in particular, but I still genuinely appreciate it

  • @Liggliluff
    @Liggliluff Před 4 lety +1

    (4:20) Logically, the ball should be about where it last was, so you have a much much smaller array to check. If the ball can't be found inside this array (aka someone scored), then check the middle column.

  • @wrld.jayce999
    @wrld.jayce999 Před 5 lety +481

    create an ai to make an ai that teaches that ai
    (edit) omg thanks for the likes , it's the most I've ever gotten !!
    also if you want u should sub to me :)

    • @wrld.jayce999
      @wrld.jayce999 Před 5 lety +18

      @N8WulfCommander honestly my guy. i know nothing about ai. I just watch these videos bc i think there cool. and made this comment bc i thought it was funny

    • @Greatsword585
      @Greatsword585 Před 5 lety +3

      So basically, amiibo?

    • @christopher-vj4hn
      @christopher-vj4hn Před 5 lety +23

      Do you want killer robots? Because thats how you get killer robots

    • @thatonewaguy7841
      @thatonewaguy7841 Před 5 lety +14

      *Skynet wants to know your location*

    • @primeddesign
      @primeddesign Před 5 lety +5

      *_create the singularity_*

  • @revooshnoj4078
    @revooshnoj4078 Před 5 lety +16

    In the description, "I think thats all the code i stole" LOL XD

  • @FrostyAUT
    @FrostyAUT Před 5 lety +9

    Can you make an AI that doesn't suck at Civilization VI?

  • @henryy.4878
    @henryy.4878 Před 3 lety +1

    If you want a more interesting pong experience, I would suggest making an A.I. for *Bennett Foddy’s “Flop”* .

  • @b0xm2n
    @b0xm2n Před 5 lety +25

    Love you code bullet

    • @ecogreen123
      @ecogreen123 Před 5 lety +3

      WHO DOESN'T LOVE CODE BULLET!!! (don't answer that, i would like to stay believing no one doesn't dislike him lol XD)

  • @scenicjaguar1014
    @scenicjaguar1014 Před 5 lety +21

    *Y O U D U M B M O-*

    • @karltodd2772
      @karltodd2772 Před 5 lety +2

      Ai learns to kill people

    • @mwperk02
      @mwperk02 Před 5 lety

      @@karltodd2772 AI already learned to do that it was the first thing we taught AI.

    • @ansh6370
      @ansh6370 Před 5 lety

      @@karltodd2772
      *SKYNET WANTS TO KNOW YOUR LOCATION!*

  • @alexandrumarzenco6998
    @alexandrumarzenco6998 Před 5 lety

    Another potentially good solution would've been to take a screenshot in the first frame of the game, identify where the ball is and then, dividing the ball location into 9 squares, the 9 squares being equal to the surface area of the ball itself, depending on it's moving direction some squares from this small matrix would become black (unless it's near the score) and this way you could determine it's position way faster. The 9 squares instead of being determined each time from a screenshot, you program them to follow the ball, like a dynamic variable, only in your face type variable.

  • @krzosu
    @krzosu Před 3 lety

    The commentary of this guy is just awesome :P

  • @Its_Koala
    @Its_Koala Před 5 lety +48

    Hey can you do some sort of tutorial/example of using deep learning to do something like hill climb racing but randomized every time so it develops a strategy by reading the screen like how you had it read the screen in this video
    holy shit that made no sense hopefully u understood what i was trying to say

    • @ToadRoasted
      @ToadRoasted Před 5 lety +9

      you mean like an ai that plays randomized levels, trying to develop strategies that work on most randomized levels, trying to beat them?

    • @Its_Koala
      @Its_Koala Před 5 lety

      @@ToadRoasted yes and also using the screen video reading like he used here

    • @huhulili9021
      @huhulili9021 Před 5 lety +1

      Watch the sentdex video that code bullet mentioned, it does exactly what you want to know

    • @Its_Koala
      @Its_Koala Před 5 lety +1

      But codebullet tho...

    • @bonopo
      @bonopo Před 5 lety

      Noise algorithms

  • @karlphoenix3451
    @karlphoenix3451 Před 5 lety +7

    8:37 "Fuq this im going home I am home fuq you" xD funny as hell

  • @DergEnterprises
    @DergEnterprises Před 5 lety

    Love the ending--fade to black.

  • @mariomon1177
    @mariomon1177 Před 5 lety +1

    Congrats on 1 Million Evan

  • @advaitparanjpe5490
    @advaitparanjpe5490 Před 5 lety +3

    Can't you just have the AI pong paddle to follow the y coordinate of the ball?
    _Unbeatable AI_

    • @lixo03
      @lixo03 Před 5 lety

      i dont think this would work because of the time it takes to process the "screenshots" so the paddle thing would be lagging behind

    • @gagewaterhouse4323
      @gagewaterhouse4323 Před 4 lety

      @@lixo03 wtf😂😂

    • @lixo03
      @lixo03 Před 4 lety

      @@gagewaterhouse4323 Sometimes CZcams is kinda buggy

  • @ihavetowait90daystochangem67

    The game could just repair itself with *Flextape*

  • @greatestgrasshopper9210
    @greatestgrasshopper9210 Před 4 lety +1

    watching the first version of pong
    did that ball just hit the side of the screen and reflect back almost the exact way it came in?

  • @larschristianlundstrseth3028

    This channel is what happens when you give an InCel one technical skill. It's quite entertaining.

  • @tszhanglau5747
    @tszhanglau5747 Před 5 lety +3

    Take a shot every time CB swears.
    (I wouldn't take that challenge though...)

  • @tacoman1719
    @tacoman1719 Před 5 lety +3

    @Code Bullet I have a zip file for a javascript version of Tetris if u want the game and not have to recreate it urself

  • @squakkattack1111
    @squakkattack1111 Před 4 lety

    The game of pong that you chose was actually really difficult to me, because when you scored the pong spawned a little bit underneath the middle of the screen on your side which meant that if you were at the top of the screen you lost a point every time. because you couldn't get there fast enough.

  • @thelukerator6724
    @thelukerator6724 Před 3 lety

    3:03
    Control our keyboard with our program - Code Bullet