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

Поділитися
Вставка
  • Опубліковано 24 лис 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

КОМЕНТАРІ • 3 тис.

  • @cirdanelensar1608
    @cirdanelensar1608 5 років тому +4706

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

    • @TrimutiusToo
      @TrimutiusToo 5 років тому +166

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

    • @franzluggin398
      @franzluggin398 5 років тому +58

      YOINK!!!

    • @theinspirationalshow9713
      @theinspirationalshow9713 5 років тому +14

      This made me laugh way too much

    • @osolomons
      @osolomons 5 років тому +37

      What do stackoverflow programmers do when the stackoverflow server crashes?

    • @Thatonefuckinguy
      @Thatonefuckinguy 5 років тому +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 5 років тому +5068

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

    • @nanajosh
      @nanajosh 5 років тому +145

      Don't you love open source

    • @xanderprice9981
      @xanderprice9981 5 років тому +7

      Nice

    • @bastian_5975
      @bastian_5975 5 років тому +84

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

    • @albertoduits5895
      @albertoduits5895 5 років тому +31

      Velociapcior i felt this comment inside my bones

    • @lmaoroflcopter
      @lmaoroflcopter 4 роки тому +21

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

  • @tokra1000
    @tokra1000 5 років тому +699

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

    • @josephdavison4189
      @josephdavison4189 3 роки тому +3

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

    • @proloycodes
      @proloycodes 3 роки тому

      the ultimate truth

    • @amitir22
      @amitir22 3 роки тому +9

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

    • @eueumesmo345
      @eueumesmo345 3 роки тому +6

      Copy, paste, adapt, overcome

  • @antideadmeme8057
    @antideadmeme8057 5 років тому +1936

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

    • @spacebear4742
      @spacebear4742 5 років тому +35

      Anti dead meme Organization machine learning is a thing.

    • @RAFMnBgaming
      @RAFMnBgaming 5 років тому +38

      So a genetic algorithm for genetic algorithms.

    • @maxwellhunt3732
      @maxwellhunt3732 5 років тому +24

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

    • @aaronking2020
      @aaronking2020 4 роки тому +8

      Skynet: :D

    • @billyma6
      @billyma6 4 роки тому +5

      Anti Dead Meme **Horizon Zero Dawn intensifies**

  • @senjugold6977
    @senjugold6977 5 років тому +3338

    Pong players HATE him for this simple trick

  • @westboundnut9241
    @westboundnut9241 5 років тому +3836

    An AI that creates its own UA-cam channel with regular uploads

    • @1996Pinocchio
      @1996Pinocchio 5 років тому +18

      What kind of videos are you thinking about?

    • @lem2004
      @lem2004 5 років тому +58

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

    • @charleseanman6649
      @charleseanman6649 5 років тому +168

      You mean five minute crafts

    • @brimstoneludovico1605
      @brimstoneludovico1605 5 років тому +16

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

    • @fyshlearnstoskate
      @fyshlearnstoskate 5 років тому +10

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

  • @f0ld920
    @f0ld920 5 років тому +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 4 роки тому +188

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

    • @notahotshot
      @notahotshot 4 роки тому +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 4 роки тому +64

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

    • @sparecreeper1580
      @sparecreeper1580 4 роки тому +6

      Yup

    • @spacechase9705
      @spacechase9705 4 роки тому +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 5 років тому +173

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

    • @alphag4mer909
      @alphag4mer909 4 роки тому +14

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

    • @priyanshugoel3030
      @priyanshugoel3030 3 роки тому +7

      *Stops time to see the text*

    • @vishesh0512
      @vishesh0512 3 роки тому +5

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

    • @puppergump4117
      @puppergump4117 2 роки тому +1

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

  • @TempestKrimps
    @TempestKrimps 5 років тому +1937

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

    • @redacted159
      @redacted159 5 років тому +4

      Owo

    • @samuelr.6046
      @samuelr.6046 5 років тому +13

      Well you can't say its clickbait

    • @brandpotato3650
      @brandpotato3650 5 років тому +1

      Like number 666 i took a screenshot

    • @muriel5935
      @muriel5935 4 роки тому

      You over here huh

    • @Dinoman972
      @Dinoman972 4 роки тому +3

      @@carloromano3363 Which proves that he's losing, since the score is 9-4.

  • @nicholasnguyen4564
    @nicholasnguyen4564 5 років тому +8169

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

    • @KT.325
      @KT.325 5 років тому +37

      I wish.

    • @mattd.2932
      @mattd.2932 5 років тому +213

      FBI OPEN UP!

    • @jess-xt1nm
      @jess-xt1nm 5 років тому +40

      @@bleeve9425 it's a joke

    • @Rosiewao
      @Rosiewao 5 років тому +49

      Bleeve 942 wooosh

    • @MCkrisoka
      @MCkrisoka 5 років тому +53

      You meant "I plagerized money printer AI"?

  • @cpt.honklerof3rdkekistania400
    @cpt.honklerof3rdkekistania400 5 років тому +785

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

    • @accomplisheddiplomat4091
      @accomplisheddiplomat4091 5 років тому +47

      Implying they have a government to topple.

    • @Blasted2Oblivion
      @Blasted2Oblivion 5 років тому +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 4 роки тому +11

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

    • @Blasted2Oblivion
      @Blasted2Oblivion 4 роки тому +16

      @@4.0.4 No. Just secretly ruled by Squirrels.

    • @TTobiTobi_11
      @TTobiTobi_11 4 роки тому +1

      Im cambodian-

  • @cyzerraze6829
    @cyzerraze6829 5 років тому +464

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

    • @cyzerraze6829
      @cyzerraze6829 4 роки тому +3

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

    • @ramytf
      @ramytf 3 роки тому +2

      terrarriaaaaaaaa

    • @ramytf
      @ramytf 3 роки тому

      1.4

    • @maxdukhovskoy1406
      @maxdukhovskoy1406 3 роки тому +1

      CB: coding 24/7 to make an AI

  • @josephwodarczyk977
    @josephwodarczyk977 5 років тому +1778

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

    • @TiaKatt
      @TiaKatt 5 років тому +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 5 років тому +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 5 років тому +2

      @@dancorps1388 nee?

    • @JorgetePanete
      @JorgetePanete 5 років тому

      @@dancorps1388 It hideous?

    • @JorgetePanete
      @JorgetePanete 5 років тому

      @@dancorps1388 that over?

  • @finmin2k
    @finmin2k 5 років тому +497

    *AI learns to cyberbully*

    • @acerbicgeoff7821
      @acerbicgeoff7821 5 років тому +9

      We already had Tai.AI, and she was beautiful

    • @imperialwatch380
      @imperialwatch380 5 років тому +11

      beep boop fuck yourself beep boop

    • @hectornonayurbusiness2631
      @hectornonayurbusiness2631 5 років тому +3

      My kind of AI

    • @jacencade4019
      @jacencade4019 5 років тому +1

      You can buy those on Twitter

    • @taureon_
      @taureon_ 5 років тому +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 5 років тому +615

    Next:I created an AI which make AI

    • @hi-bl4vq
      @hi-bl4vq 5 років тому

      Don't you mean Cd

    • @Minutemenofficial2
      @Minutemenofficial2 5 років тому

      Wooosh

    • @oceanmantakemebythehandlea5620
      @oceanmantakemebythehandlea5620 5 років тому

      Pls delete your edit.

    • @youthdiamonds6472
      @youthdiamonds6472 5 років тому +3

      ConfuserM22 I deleted it
      Thanks for the opinion

    • @brandpotato3650
      @brandpotato3650 5 років тому +2

      B-bro thats a virus since it will know nothing but its own code so it just copy's it and makes another ai that makes another so it wont stop until all memory is full AND THE CPU WILL SUFFER

  • @MuchWhittering
    @MuchWhittering 4 роки тому +172

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

    • @CrypticConsole
      @CrypticConsole 3 роки тому +9

      It was pretty good actually.

    • @lextatertotsfromhell7673
      @lextatertotsfromhell7673 3 роки тому

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

    • @MuchWhittering
      @MuchWhittering 3 роки тому +3

      @@lextatertotsfromhell7673 What the fuck are you talking about?

    • @lextatertotsfromhell7673
      @lextatertotsfromhell7673 3 роки тому +1

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

    • @WinterNox
      @WinterNox 2 роки тому

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

  • @willisval7973
    @willisval7973 5 років тому +867

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

    • @gilbertbeilschmidt4129
      @gilbertbeilschmidt4129 5 років тому +34

      *ISIS wants to KnOW yOuR lOCaTioN*

    • @NeoCrypt01
      @NeoCrypt01 5 років тому +1

      🤣

    • @dryued6874
      @dryued6874 5 років тому

      Then it turns out it just plays Exapunks.

    • @Mortario
      @Mortario 5 років тому +1

      *FBI wants to know your location*

    • @unoriginal_mp474
      @unoriginal_mp474 5 років тому +2

      I made a ai to hack your toaster checkmate bitch

  • @bach_yr
    @bach_yr 5 років тому +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 3 роки тому +18

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

  • @infiniteplanes5775
    @infiniteplanes5775 3 роки тому +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 2 роки тому +2

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

    • @friedsputnik2710
      @friedsputnik2710 2 роки тому +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 5 років тому +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 10 місяців тому +2

      E

    • @Newfsters
      @Newfsters 10 місяців тому

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

  • @ryanwargo989
    @ryanwargo989 5 років тому +1496

    Do tetris please

    • @CodeBullet
      @CodeBullet  5 років тому +304

      patience, one day

    • @ryanwargo989
      @ryanwargo989 5 років тому +121

      3 years later...

    • @exedeath
      @exedeath 5 років тому +8

      @@CodeBullet People already did with tetris, do with 13x25 board pentris

    • @neaixphos6784
      @neaixphos6784 5 років тому +13

      @@CodeBullet One day.
      *23 years later* TETRIS

    • @notmynameanymore941
      @notmynameanymore941 5 років тому +3

      @@CodeBullet THY LORD SPEAKETH

  • @Thunda8
    @Thunda8 5 років тому +80

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

  • @DownloadedPixelz
    @DownloadedPixelz 5 років тому +58

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

  • @snozzmcberry2366
    @snozzmcberry2366 5 років тому +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 5 років тому +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 5 років тому +24

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

    • @four-en-tee
      @four-en-tee 5 років тому +24

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

    • @mr.destructive8554
      @mr.destructive8554 5 років тому +1

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

    • @hyperupcall
      @hyperupcall 5 років тому +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 5 років тому +312

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

    • @5amg1
      @5amg1 5 років тому +4

      Was probably just putting off revision

    • @savouryarc5___873
      @savouryarc5___873 5 років тому +2

      He just finished his chunin exams

  • @mazingdaddid
    @mazingdaddid 4 роки тому +14

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

  • @thenonfurry
    @thenonfurry 4 роки тому +25

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

  • @croatiaboy11
    @croatiaboy11 5 років тому +371

    AI DESTROYS Pong game with LOGIC and FACTS

    • @four-en-tee
      @four-en-tee 5 років тому +4

      Not even facts, just only logic. xd

    • @Its_Koala
      @Its_Koala 5 років тому +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 Рік тому

      @@owengrimm1370 First generation of ai's be like

    • @RandomRothbardian
      @RandomRothbardian 10 місяців тому

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

  • @pierrehanlet7536
    @pierrehanlet7536 5 років тому +327

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

    • @larsdeboer3599
      @larsdeboer3599 5 років тому +5

      Yes. Just yes

    • @guillep6639
      @guillep6639 5 років тому +9

      tetris is complicated, but it could work

    • @AVerySexuallyDeviantOrange
      @AVerySexuallyDeviantOrange 5 років тому +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 5 років тому +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 5 років тому

      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 5 років тому +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 2 роки тому +4

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

  • @phantomderp834
    @phantomderp834 5 років тому +1499

    Ben Shapiro DESTROYS Marxist pong game

    • @ELMiLiCrAcK
      @ELMiLiCrAcK 5 років тому +25

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

    • @juanps2721
      @juanps2721 5 років тому +21

      With LOGIC and FACTS

    • @wakaziar9373
      @wakaziar9373 5 років тому +4

      Damn commies, better dead than red

    • @palebluedot7435
      @palebluedot7435 5 років тому +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 5 років тому +1

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

  • @mr.ballstone1914
    @mr.ballstone1914 5 років тому +1412

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

    • @1996Pinocchio
      @1996Pinocchio 5 років тому +20

      Why? That's how one learns.

    • @mr.ballstone1914
      @mr.ballstone1914 5 років тому +32

      Punocchio just a joke

    • @YT7mc
      @YT7mc 5 років тому +111

      Python is the programming language...

    • @YT7mc
      @YT7mc 5 років тому +39

      MR. ballstone Sentdex made the GTA 5 AI

    • @cb7394
      @cb7394 5 років тому +21

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

  • @toast_bath5937
    @toast_bath5937 3 роки тому +2

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

  • @asherael
    @asherael 5 років тому +10

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

  • @JamesAllenQuinn
    @JamesAllenQuinn 5 років тому +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 5 років тому +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 4 роки тому +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 4 роки тому

      This is a late comment because i can

    • @spacechase9705
      @spacechase9705 4 роки тому

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

    • @lordspotato5032
      @lordspotato5032 3 роки тому +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 5 років тому +233

    AI Learns to play Tetris

    • @tfpcjp
      @tfpcjp 5 років тому +1

      ILiekFishes yes

    • @D.KlWA-aG
      @D.KlWA-aG 5 років тому +3

      Oh boi a nightmare

    • @ansh6370
      @ansh6370 5 років тому +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 5 років тому +10

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

    • @DoctorNemmo
      @DoctorNemmo 4 роки тому +1

      That's how Skynet becomes self aware you dolt

  • @Kalbr0shorts
    @Kalbr0shorts 4 роки тому +5

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

  • @ChristOfSteel
    @ChristOfSteel 5 років тому +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 5 років тому +82

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

    • @filippodhorec1955
      @filippodhorec1955 5 років тому

      How much for that

    • @dizknots9357
      @dizknots9357 5 років тому +1

      Next up, I learn how to make an original comment

    • @ruby_dragon4034
      @ruby_dragon4034 5 років тому

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

  • @PixlPlayer
    @PixlPlayer Рік тому +1

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

  • @jellyesquivel537
    @jellyesquivel537 5 років тому +2

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

  • @bobbypage9982
    @bobbypage9982 5 років тому +202

    Oh dear god, pong is back...

    • @nicholasnguyen4564
      @nicholasnguyen4564 5 років тому +2

      Angrywolf 378 idot...hm

    • @joeygenna4801
      @joeygenna4801 5 років тому +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 5 років тому +1

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

    • @joeygenna4801
      @joeygenna4801 5 років тому

      @@bobbypage9982 lol

  • @rainsparks29
    @rainsparks29 5 років тому +73

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

  • @Helladamnleet
    @Helladamnleet 2 роки тому +2

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

  • @napoleon2564
    @napoleon2564 3 роки тому +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 5 років тому +93

    I love code bullet

  • @isaiahdahler8933
    @isaiahdahler8933 5 років тому +18

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

  • @vt1-vince15
    @vt1-vince15 5 років тому +52

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

    • @Minutemenofficial2
      @Minutemenofficial2 5 років тому

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

    • @vt1-vince15
      @vt1-vince15 5 років тому

      Hypersonicracing422 3 that would be good

    • @yafi22
      @yafi22 5 років тому

      Lololololololololololololololololololol

    • @foxwhite25
      @foxwhite25 4 роки тому

      MATRIX

    • @jacopoparenti9939
      @jacopoparenti9939 4 роки тому

      I used the AI to use the AI

  • @ThatUnknownDude_
    @ThatUnknownDude_ 3 роки тому +4

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

  • @vladkrstevski1482
    @vladkrstevski1482 5 років тому +69

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

  • @TheCodGamer-pr9pe
    @TheCodGamer-pr9pe 5 років тому +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 5 років тому

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

  • @lukegarvey6668
    @lukegarvey6668 2 роки тому

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

  • @TrimutiusToo
    @TrimutiusToo 5 років тому +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 5 років тому +1

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

    • @beelal6407
      @beelal6407 5 років тому +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 5 років тому +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 5 років тому +1

      Wait do professional software engineers use scratch?

    • @TrimutiusToo
      @TrimutiusToo 5 років тому +1

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

  • @jinx12373
    @jinx12373 5 років тому +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 3 роки тому +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 3 роки тому

    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 5 років тому +20

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

  • @felixjanetzki7364
    @felixjanetzki7364 5 років тому +21

    Program an AI that programs an AI which repliactes itself

    • @felixjanetzki7364
      @felixjanetzki7364 5 років тому +3

      Omar G worm to be precise, i think

    • @davidwuhrer6704
      @davidwuhrer6704 5 років тому +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 5 років тому +1

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

  • @iuppiterzeus9663
    @iuppiterzeus9663 5 років тому

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

  • @xqiuvmah
    @xqiuvmah 5 років тому

    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 5 років тому +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 5 років тому +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 4 роки тому

    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 4 роки тому +1

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

  • @adorable_yangire
    @adorable_yangire 5 років тому +36

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

    • @kallyanrostiell3367
      @kallyanrostiell3367 5 років тому +2

      OH MY GAWD.... yes please

    • @DgkYogi
      @DgkYogi 5 років тому +1

      Oh god

    • @Pheatan
      @Pheatan 5 років тому +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 5 років тому +44

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

    • @bluestonethe2nd
      @bluestonethe2nd 5 років тому

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

    • @Metaknightkirby2
      @Metaknightkirby2 5 років тому

      @@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 4 роки тому +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 UA-cam on my phone. Nice.

  • @CuddleCuttlefish
    @CuddleCuttlefish 5 років тому +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 UA-cam 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 5 років тому +5

      Stay strong. :)

    • @somerandomstickboy150
      @somerandomstickboy150 5 років тому +13

      Am I invited to your pity party?

    • @CuddleCuttlefish
      @CuddleCuttlefish 5 років тому +1

      @@somerandomstickboy150 thanks for that.

    • @Nederlance
      @Nederlance 5 років тому +6

      OK mate don't care

    • @obligatoryusername7239
      @obligatoryusername7239 5 років тому +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 5 років тому +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 5 років тому +123

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

    • @CapnSurvivalist
      @CapnSurvivalist 5 років тому +26

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

    • @arya6085
      @arya6085 5 років тому +10

      I guess his code is for his eyes only

    • @beelal6407
      @beelal6407 5 років тому +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 5 років тому +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 5 років тому +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 5 років тому +81

    Ehm... Your already playing against an ai

    • @een3162
      @een3162 5 років тому +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 5 років тому +4

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

    • @legdarytruenightsedge9718
      @legdarytruenightsedge9718 5 років тому +1

      Ya but his ai is smarter

    • @Liggliluff
      @Liggliluff 4 роки тому +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 4 роки тому

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

  • @Jig_up
    @Jig_up 2 роки тому

    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

  • @EchoBuildsThings
    @EchoBuildsThings 5 років тому +25

    I love your vids. This one was no different!

  • @jr_kulik
    @jr_kulik 5 років тому +256

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

    • @birddaddydetta
      @birddaddydetta 5 років тому +44

      *injects AI into your mind*

    • @elizabethp.7354
      @elizabethp.7354 5 років тому +2

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

    • @marioisawesome8218
      @marioisawesome8218 5 років тому +85

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

    • @norrix5122
      @norrix5122 5 років тому

      If than statements

    • @eamartig
      @eamartig 5 років тому +3

      Norrix he uses python so if else

  • @Oxmond
    @Oxmond 4 роки тому +1

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

  • @Liggliluff
    @Liggliluff 4 роки тому +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 5 років тому +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 5 років тому +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 5 років тому +3

      So basically, amiibo?

    • @christopher-vj4hn
      @christopher-vj4hn 5 років тому +23

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

    • @thatonewaguy7841
      @thatonewaguy7841 5 років тому +14

      *Skynet wants to know your location*

    • @primeddesign
      @primeddesign 5 років тому +5

      *_create the singularity_*

  • @revooshnoj4078
    @revooshnoj4078 5 років тому +16

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

  • @henryy.4878
    @henryy.4878 3 роки тому +1

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

  • @FrostyAUT
    @FrostyAUT 5 років тому +9

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

  • @b0xm2n
    @b0xm2n 5 років тому +25

    Love you code bullet

    • @ecogreen123
      @ecogreen123 5 років тому +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 5 років тому +21

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

    • @karltodd2772
      @karltodd2772 5 років тому +2

      Ai learns to kill people

    • @mwperk02
      @mwperk02 5 років тому

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

    • @ansh6370
      @ansh6370 5 років тому

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

  • @alexandrumarzenco6998
    @alexandrumarzenco6998 5 років тому

    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 3 роки тому

    The commentary of this guy is just awesome :P

  • @Its_Koala
    @Its_Koala 5 років тому +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 5 років тому +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 5 років тому

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

    • @huhulili9021
      @huhulili9021 5 років тому +1

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

    • @Its_Koala
      @Its_Koala 5 років тому +1

      But codebullet tho...

    • @bonopo
      @bonopo 5 років тому

      Noise algorithms

  • @karlphoenix3451
    @karlphoenix3451 5 років тому +7

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

  • @DergEnterprises
    @DergEnterprises 5 років тому

    Love the ending--fade to black.

  • @mariomon1177
    @mariomon1177 5 років тому +1

    Congrats on 1 Million Evan

  • @advaitparanjpe5490
    @advaitparanjpe5490 5 років тому +3

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

    • @lixo03
      @lixo03 5 років тому

      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 4 роки тому

      @@lixo03 wtf😂😂

    • @lixo03
      @lixo03 4 роки тому

      @@gagewaterhouse4323 Sometimes UA-cam is kinda buggy

  • @ihavetowait90daystochangem67
    @ihavetowait90daystochangem67 5 років тому +4

    The game could just repair itself with *Flextape*

  • @greatestgrasshopper9210
    @greatestgrasshopper9210 4 роки тому +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
    @larschristianlundstrseth3028 3 роки тому +1

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

  • @tszhanglau5747
    @tszhanglau5747 5 років тому +3

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

  • @tacoman1719
    @tacoman1719 5 років тому +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 4 роки тому

    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 3 роки тому

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