Creating the PERFECT Connect 4 A.I.

Sdílet
Vložit
  • čas přidán 27. 10. 2020
  • Using AI to crush nerds Connect 4, because people play connect 4 online apparently. Huge thanks to KiwiCo for sponsoring this video.
    Check out www.KiwiCo.com/CodeBullet for 50% off your first month of any subscription.
    Twitter: / code_bullet
    Patreon: / codebullet
    Discord: / discord
    Art created by @Dachi.art / dachi.art

Komentáře • 10K

  • @danieljensen6154
    @danieljensen6154 Před 3 lety +7447

    Should be called “bullying nerds by being a bigger better nerd”

    • @leol.9671
      @leol.9671 Před 3 lety +137

      Technoblade would think he is being challenged un his position as the king nerd.

    • @bloom2586
      @bloom2586 Před 3 lety +83

      isnt that just every code bullet episode tho

    • @half-qilin
      @half-qilin Před 3 lety +55

      @@bloom2586 Yes pretty much they are. The channel could be called “the biggest best nerd”.

    • @JamesEdwards780
      @JamesEdwards780 Před 3 lety +23

      Alpha Nerd

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

      xD

  • @lugui
    @lugui Před 3 lety +3418

    Online board game: * exists *
    Code Bullet: "And I took that personally"

  • @botondhetyey159
    @botondhetyey159 Před 2 lety +906

    "Alpha beta pruning is like normal minimax, but a bit fucky-wucky"
    Thanks Code Bullet, I needed that for my CS exam tomorrow.

    • @liljammy6434
      @liljammy6434 Před 2 lety +18

      How'd the cs exam go bro?

    • @botondhetyey159
      @botondhetyey159 Před 2 lety +53

      @@liljammy6434 I passed, thanks for asking bro

    • @lisahenry20
      @lisahenry20 Před 2 lety +10

      @@botondhetyey159 awesome, congrats!

    • @Jearbearjenkins
      @Jearbearjenkins Před rokem

      Should’ve written that if they asked about it 😂

    • @funguy3259
      @funguy3259 Před 23 dny

      ​@@botondhetyey159 Yay! Good job!

  • @justatrashaccount1514
    @justatrashaccount1514 Před 2 lety +2650

    I am truly impressed by how energetic cb has gotten, he used to be so calm and composed all the time XD

    • @alexandernolte63
      @alexandernolte63 Před 2 lety +300

      This channel is just a documentary of a man's decent into madness

    • @IceHeartAlpha
      @IceHeartAlpha Před 2 lety +94

      when you create the PERFECT AI for connect 4
      can you blame him?

    • @firelies
      @firelies Před 2 lety +41

      @@alexandernolte63 I was gonna say yea hes really grown as a person and then I realized how to fucking true this is

    • @zieges
      @zieges Před 2 lety +10

      what being a content creator does to you

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

      Well, he did evolved before

  • @noriakikakyoin1140
    @noriakikakyoin1140 Před 3 lety +6335

    3:34 To be fair, placing down 8 pieces in one move is a pretty solid option for the cpu to make

    • @andreasstock8539
      @andreasstock8539 Před 2 lety +537

      Jeha, but it must have been quite stupid to place down 8 pieces at once and still not win.

    • @ekuu8918
      @ekuu8918 Před 2 lety +401

      "Which slot do you want to place your piece in?"
      "Yes."

    • @ayoshijunior
      @ayoshijunior Před 2 lety +78

      Hm.
      FUCK.

    • @Catnippy
      @Catnippy Před 2 lety +90

      that's basically how my friends play connect 4 while drunk

    • @CommanderNissan
      @CommanderNissan Před 2 lety +51

      That strategy is unbeatable. They’re a dreamer!

  • @somedude1581
    @somedude1581 Před 3 lety +8085

    Something isn't right. He's posted within a month.

  • @spookysomeone
    @spookysomeone Před 2 lety +2803

    i like how his whole thing is "bullying nerds" now but he's making a fucking connect 4 a.i.

    • @reptiliandudemegee5520
      @reptiliandudemegee5520 Před 2 lety +77

      I’m going to use this comment to help this get out, when he said “it’s a bit fuckey wuckey” despite being a scalie I think my brain has stopped functioning in non vital movements I’m currently typing this via my parents making a series of grunts and growls at them for yes or no questions

    • @lukeb1663
      @lukeb1663 Před 2 lety +32

      @@reptiliandudemegee5520 😐

    • @Groot_The_Terrorist
      @Groot_The_Terrorist Před 2 lety +45

      He used the nerd to destroy the nerd

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

      @@reptiliandudemegee5520 really??

    • @Sentinential38
      @Sentinential38 Před 2 lety +42

      @@reptiliandudemegee5520 I think I had a stroke reading this.

  • @EricSundquistKC
    @EricSundquistKC Před 3 lety +409

    I ran a Connect 4 AI competition in college, not realizing it was a solved game. The winner just made http calls to an online minimax game to get their next move...

    • @SimonBuchanNz
      @SimonBuchanNz Před 2 lety +20

      ... damn.

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

      Can you remake it and put it on github? I need the code for a project. Thanks

    • @snowboundwhale6860
      @snowboundwhale6860 Před 2 lety +10

      @@matthewkawamoto8622 Is that a situation where taking the move wins but would set up a board where if the opponent were allowed a next move as though that last move hadn't won, they could win off the move that was made?

    • @matthewkawamoto8622
      @matthewkawamoto8622 Před 2 lety +7

      @@snowboundwhale6860 I actually have hard stops for the bit to not position the opponent for a win and also to block wins before even processing the fancy stuff, but for some reason it's ignoring the hard stops. Though even without the hardstops, the fancy code should recognize that it shouldn't go in those spots, so its gotten me confused. Took a step away for a bit lol

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

      i have to do the same but the board size is random

  • @GXShattering
    @GXShattering Před 3 lety +1723

    I like how he says “time to plagiarize” but then he literally gives pascal all the credit.

    • @HackionSTx
      @HackionSTx Před 3 lety +109

      CodeBullet doing plagiarizing the right way 👍🏻

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

      happens every time

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

      @22JEREMY OPPENZATO Hahaha that would be amazing

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

      The ai was the plagiarism

    • @dawk7
      @dawk7 Před 3 lety +26

      Because it's lovingly called plagiarism, but what he's actually doing is referencing some code while properly crediting its creator. Certainly helps he's apparently adapting it as well, so it's not straight up copy-paste plagiarism.
      The tech world in general is pretty helpful and collaborative to one another as long as you're not a self-praising little bitch, really. If you don't want something to be shared, you just don't share it. If it's out there in clear view to be shared, you are okay with it being shared as long as the person isn't an asshat. That's more or less how it is.
      ...and, you know, this is an entertainment video. Gotta know how to take a joke and all that.

  • @UltraMC3
    @UltraMC3 Před 2 lety +147

    I love how the board he used as an example is an impossible state
    2:56

  • @Johnny-zi6lw
    @Johnny-zi6lw Před 3 lety +1850

    Evan: "C++ good, python bad"
    Me who is currently learning C++ in school: *signature look of superiority*

    • @liesdamnlies3372
      @liesdamnlies3372 Před 3 lety +96

      lol, just never forget that they both have their place. The one thing every dev can agree on though, is that JS is literally the worst.

    • @actualsatan_
      @actualsatan_ Před 3 lety +158

      Evan: "C++ good, python bad"
      Me who is currently learning python in school: *signature look of inferiority*

    • @actuallyjustanapple
      @actuallyjustanapple Před 2 lety +28

      I like java..... crys in plugins for mc.

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

      don't you mean, *superior look of superiority*

    • @SimonBuchanNz
      @SimonBuchanNz Před 2 lety +14

      @@liesdamnlies3372 I feel sad when people say JavaScript is bad still 😢 (if anyone doesn't get this, JS has had a bunch of people work super hard over the last decade or so to make it actually a pretty great language now. I mean, preferences or whatever, but it's a huge improvement)
      (But the real golden god of languages is Rust.)

  • @Danidev
    @Danidev Před 3 lety +25334

    Poor Isaac just wanted to eat his apple :(

    • @marnickbar4794
      @marnickbar4794 Před 3 lety +710

      dani stop commenting so people see your channel xd

    • @Hvot.
      @Hvot. Před 3 lety +173

      this is so sad

    • @chicmom4376
      @chicmom4376 Před 3 lety +285

      Milk

    • @DiamondRocksIt
      @DiamondRocksIt Před 3 lety +235

      I have yet to get top comment on your channel. I’ve gotten it here, on Sam hogan, and in Lxyan’s. My notification bell is on and ready for your amazing content. :)

    • @galaloadgundy8653
      @galaloadgundy8653 Před 3 lety +42

      Hello Dani

  • @sonatbalak6568
    @sonatbalak6568 Před 3 lety +589

    Code bullet: swears in his videos
    Also him: gets sponsored by a company that makes products for little children

  • @swordsmancs
    @swordsmancs Před rokem +78

    “…which is like normal minimaxing but a bit _fucky-wucky”_ is an absolutely gold line

  • @Flummeryman
    @Flummeryman Před 2 lety +268

    I feel like code bullet is going to be the guy solely responsible for the robot uprising

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

      And Michael Reeves

    • @13vatra
      @13vatra Před 2 lety +19

      There's some solace in the fact that if that's the case they'll be horribly inefficient and hell bent on Code Bullet's destruction alone given the whole laser/learn to run simulator thing.

    • @StaleToast0011
      @StaleToast0011 Před 2 lety +6

      Only if he can plagiarize from someone

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

      @@StaleToast0011 😂 nice one dude

    • @BrainPermaDeD
      @BrainPermaDeD Před 2 lety

      No!! NOT the SkyNet!!!

  • @ipiqqyfpv
    @ipiqqyfpv Před 3 lety +1866

    “That’s where this week’s sponsor comes in”
    Me: more like this month’s sponsor

    • @sir_slimestone3797
      @sir_slimestone3797 Před 3 lety +96

      This year's sponsor

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

      More like this year sponsor

    • @inf1tyblade967
      @inf1tyblade967 Před 3 lety +17

      @@sir_slimestone3797 sorry didnt read your comment

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

      @@sir_slimestone3797 yea that’s more like it, I was going to say this 6 month’s sponsor, but that no worko

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

      This years sponsor is little more accurate

  • @fire_king66
    @fire_king66 Před 3 lety +475

    I remember back in elementary school during snack time a whole group of people were playing connect 4 super competitively lmao

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

      Wait a minute... Do I know you?

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

      Connect four was a religion

    • @trubornstraw
      @trubornstraw Před 3 lety

      Have we meeeeet?

    • @yes.1
      @yes.1 Před 3 lety

      5th grade connect four tournament and I rekt those nerds

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

      I lost a lot of money in those days

  • @JosiahSBriney
    @JosiahSBriney Před rokem +118

    In case if anyone doesn’t understand: A chair is a type of seat, typically designed for one person and consisting of one or more legs, a flat or slightly angled seat and a back-rest. They may be made of wood, metal, or synthetic materials, and may be padded or upholstered in various colors and fabrics. Chairs vary in design. An armchair has armrests fixed to the seat; a recliner is upholstered and features a mechanism that lowers the chair's back and raises into place a footrest; a rocking chair has legs fixed to two long curved slats; and a wheelchair has wheels fixed to an axis under the seat. Chairs can be made from wood, metal, or other strong materials, like stone or acrylic. In some cases, multiple materials are used to construct a chair; for example, the legs and frame may be made from metal and the seat and back may be made from plastic. Chairs may have hard surfaces of wood, metal, plastic, or other materials, or some or all of these hard surfaces may be covered with upholstery or padding. The design may be made of porous materials, or be drilled with holes for decoration; a low back or gaps can provide ventilation. The back may extend above the height of the occupant's head, which can optionally contain a headrest. Chairs can also be made from more creative materials, such as recycled materials like cutlery and wooden play bricks, pencils, plumbing tubes, rope, corrugated cardboard, and PVC pipe. In rare cases, chairs are made out of unusual materials, especially as a form of art or experimentation. Raimonds Cirulis, a Latvian interior designer, created a volcanic hanging chair that is handmade out of volcanic rock.Peter Brenner, a Dutch-born German designer, has created a chair made from lollipop sugar - 60 pounds (27 kg) of confectioners' sugar. Ergonomic design distributes the weight of the occupant to various parts of the body. This is done by having an easily adjustable seat height. A seat that is higher results in dangling feet and increased pressure on the underside of the knees ("popliteal fold"). It may also result in no weight on the feet which means more weight elsewhere. A lower seat may shift too much weight to the "seat bones" ("ischial tuberosities"). Gas springs are attached to the body of the chair in order to give height adjustment and more comfort to the user. Some chairs have foot rests. Around 15% of women and 2% of men need foot rests, even at the 16-inch (41 cm) chair height. A stool or other simple chair may have a simple straight or curved bar near the bottom for the sitter to place their feet on. Actual chair dimensions are determined by measurements of the human body or anthropometric measurements. The two most relevant anthropometric measurement for chair design is the popliteal height and buttock popliteal length. For someone seated, the popliteal height is the distance from the underside of the foot to the underside of the thigh at the knees. It is sometimes called the "stool height". The term "sitting height" is reserved for the height to the top of the head when seated. For American men, the median popliteal height is 16.3 inches (41 cm) and for American women it is 15.0 inches (38 cm).The popliteal height, after adjusting for heels, clothing and other issues, is used to determine the height of the chair seat. Mass-produced chairs are typically 17 inches (43 cm) high.Researchers such as Mary Blade and Galen Cranz found that sitting on the edge of a high stool with feet on the floor is less harmful for the lower back than sitting up straight on a conventional chair.

    • @peteybeckler4779
      @peteybeckler4779 Před rokem +10

      Now I understand

    • @alvinyakatori3909
      @alvinyakatori3909 Před rokem +4

      Damn bro, that’s what I would expect lieutenant commander Data from Star Trek to say if I asked him about chairs

    • @veythegay
      @veythegay Před rokem +3

      yyyyyyyyyyyyyeeeeeeeeeeeeaaaaaaaahhhhhhhhhhhhhhhh I'm not reading all that-
      There are too many sentences and not enough paragraphs

    • @MegaAllen57
      @MegaAllen57 Před rokem +2

      You'd love my chair mech!

    • @MB-ev9ix
      @MB-ev9ix Před rokem +2

      hello, gordon!

  • @oliverjonas2823
    @oliverjonas2823 Před 3 lety +37

    This channel is literally perfect I don’t know how you’ve done it, but the content just ticks every single box, boxes I didn’t even know existed

  • @Louisiana_Ballers
    @Louisiana_Ballers Před 3 lety +4316

    "son, what did you do today" "well i watched an aggressive australian man hack an online children's game for his own amusement. and oh yeah he profusely swore the whole time"

  • @aidan-forte
    @aidan-forte Před 3 lety +733

    I'm convinced code bullet keeps making AI's because he finally wants to win games he used to lose at when he was a kid.

  • @EE-us9we
    @EE-us9we Před 2 lety +21

    I like how code bullet curses alot, steals programs, and is very non kid appropriate, and then got sponsored for a company that teaches kids to program

  • @jaymercer4692
    @jaymercer4692 Před 2 lety +57

    Codebullet as a youtuber is much like his AI. He evolves gradually and is becoming not just competent but very good and funny. Then all of a sudden does something weird like stop uploading for at least a year. But in the end his AI’s always work so he’ll be back.

  • @TorutheRedFox
    @TorutheRedFox Před 3 lety +1232

    that intro, judging by the comments, is SEVERELY underrated

    • @Jay-zu5gg
      @Jay-zu5gg Před 3 lety +14

      I thought it was too overdone and skipped over it.

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

      Intro is a theme followed across the video....a comment on connect 4...

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

      @Kevin Frayre the weak minded do not watch intros, smh

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

      Very

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

      I thought it was overrated

  • @xplodingmojo2087
    @xplodingmojo2087 Před 3 lety +1048

    Ah, a sponsor.
    That explains all the swearing and disobeying mama Susan.

  • @kwak-zz1gj
    @kwak-zz1gj Před 11 měsíci +5

    I’ll never not absolutely love bullets attitude and banter while making his videos. Absolutely amazing and it’s so much fun to watch. Love this channel

  • @prizegotti
    @prizegotti Před 2 lety +28

    There was a Connect 4 game released in the 90s that was a PVP online game, in the game there was a feature "Next Best Possible Move", which would tell you the best place to put your next counter. Unless your opponent also knew of this feature (most didn't) then you were guaranteed to win, and it was pretty much instant when you called it. Unfortunately it's been so long since I play it, I don't remember it's name. However websites that do that same thing have existed just as long, and are just as fast.

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

      It likely has the early boards saved and don't actually do any calculations until you get deeper into the game. For example, if the opponent starts, that gives you 7¹=7 different boards, and after you and the opponent choose again, that is about 7³=343 different boards, some are duplicates. After you two choose again, that us 7⁵=16 807 different boards, with even more duplicates. This is likely where CB got the 15 000 number from, the number of different boards you can achieve after 5 tokens. So from 0-5 tokens places, with ~15 000 boards saved, you can give an instant result. But 15 000 is nothing to a computer. Do 9 tokens and you have less than 40 000 000 boards, which again is nothing for a computer. But then after that you can run the algorithm.
      But when it runs the algorithm to figure out what the next best move is, it could save it to the list. Each board can be stored numerically, where you have each column be: 0=++++++, 1=X+++++, 2=O+++++, 3=XX++++, 4=OX++++, 5=XO++++, 6=OO++++, 7=XXX+++, and so on, with 254 being the max value, but you can technically never achieve 253 or 254 since both have 5 and 6 of the same tokens in a row respectively. So max value is 252. So the max number of boards is (252+1)⁷ = 66 350 415 710 840 437. Meaning you can convert each board from and to a 64-bit numerical value, and then have a list that converts a board value to a move value (1-7), and if the board value is not included, run the algorithm as soon as it's your turn, then put it in the list. This way, it will only be delayed if you see a board for the very first time ever, and if you click that button instantly. But since humans tend to follow patterns, and avoid really stupid moves, there are a lot of board states never put on the list.

  • @Johnnyb3g00d
    @Johnnyb3g00d Před 3 lety +1240

    Honestly, that was such a smart ‘cheat’. I’m impressed.

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

      Agreed! That trick is something we call "opening books" so it's actually a well-theorized legit thing that he figured out on his own (which is impressive). Having programmed a chess bot I definitely won't consider opening books a cheat either

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

      Ikr

    • @josephharold808
      @josephharold808 Před 3 lety

      At that point it feels more like Google-Fu than cheating

    • @DasHeino2010
      @DasHeino2010 Před 3 lety

      @@Trollllium So you tell me to mathematically progress every move in a chess game it takes 1.000.000.000 x the time passed since the big bang and would need more Mass to "save" the outcomes/informations/Data than our Universe has to offer? XD

    • @Trollllium
      @Trollllium Před 3 lety

      @@DasHeino2010 Hi, in chess programming moves aren't perfect, but the concept of opening books is still the same. The first couple of moves have been extensively analyzed statistically so following opening books are generally very safe. Engines are quite good at analyzing midgame positions but not so much opening positions so it makes sense to use an opening book. Nowhere do I tell you that I search all possible chess continuations to make a move.

  • @alexpurdy673
    @alexpurdy673 Před 3 lety +575

    8:00 “I was this close to giving up”
    Hands are shoulder width apart

    • @eggs8021
      @eggs8021 Před 3 lety +28

      He's code so he's tiny
      Checkmate liberal

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

      @@eggs8021 this is connect 4, not chess

    • @flutedscissors9655
      @flutedscissors9655 Před 3 lety

      @@gamersgambit7517 dumb

    • @Error-gi3in
      @Error-gi3in Před 3 lety +3

      @@flutedscissors9655 no no, he has a point

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

      @@gamersgambit7517 I've been defeated

  • @StarkerOfLands
    @StarkerOfLands Před rokem +9

    This man could literally make a video about anything and I would watch it cause of how entertaining he makes these videos. Amazing Job with these videos

  • @wtfpwnz0red
    @wtfpwnz0red Před 2 lety +8

    This is essentially how chess AI is made. They build a table base for openings, then brute force via mini max after the table runs out.
    Then, since chess is so open to repetition in the endgame, i think a lot of AIs also have table base endings programmed in as well.

    • @Rocker-1681
      @Rocker-1681 Před 2 lety +1

      Most, if not all, modern chess AIs do have an endgame tablebase. Any chess position with 7 or fewer pieces on the board has been solved already.

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

      @@Rocker-1681 when you say "has been solved" what does this mean in terms of AI play? Are they still brute forcing all possible moves, or is it like a precalculated moveset to get to the end?

  • @SkimBee
    @SkimBee Před 3 lety +2615

    Code bullet: uploads more than once a year
    Everyone: somethings wrong I can feel it

    • @thesevendeadlysins7996
      @thesevendeadlysins7996 Před 3 lety +17

      There is a disturbance in the force

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

      There's something in the air I guess. Besides covid.

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

      eminem rap god thou

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

      It's just a feeling I've got, like somethings about to happen, But I dont know what.

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

      @@thomashanson6603 if that means what i think it means we're in trouble. Big trouble.

  • @wyattburdick5936
    @wyattburdick5936 Před 3 lety +817

    He's posting more than once every 3 months you know this man really had nothing to do

    • @brmarko3
      @brmarko3 Před 3 lety

      Thanks china.

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

      I mean 1 vid should generate a few thausand bucks so that an regular monthly income

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

    Honestly the boost you added is completely valid. Many algorithms, especially chess ones have the first couple moves in a dictionary for the same reason of optimization and speed, and later games having less possible options

  • @Elijah-ed5xk
    @Elijah-ed5xk Před 2 lety +12

    CB: “minimax”
    Me: “i’m listening”
    CB: “In Python”
    Me: “oh no”

  • @compulsivegamer1529
    @compulsivegamer1529 Před 3 lety +1546

    I love how as the channel grows, as CB gets more comfortable with his "persona" in his videos, the greater the memeage that seeps into the videos. And at the same time so does the refinement of the actual content (the actual coding/programing) in the video. They increase in equal parts shitpost and genuine content quality.
    Don't you ever change CB.

    • @destruct0503
      @destruct0503 Před 3 lety +12

      That is so true 😅

    • @derkach7907
      @derkach7907 Před 3 lety +16

      Quality >>> quantity
      Best. Channel. Ever.

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

      I love his humor, his accent, the way he makes programming look like fun,.. and I can go on for a while

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

      3:27 is when I clicked Like, memes are definitely 10/10 on point.

    • @Trevor21230
      @Trevor21230 Před 3 lety

      This. Definitely this.

  • @Alex-ir3wr
    @Alex-ir3wr Před 3 lety +12411

    subbing to this guy is a constant cycle of:
    1. forgetting he exists,
    2. Immediately becoming grateful when he uploads,
    3. Binge watch all his vids
    4. repeat

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

    I wish there were more videos like this. Funny, entertaining person doing something cool in a random, interesting field.

  • @chillinBoi
    @chillinBoi Před 5 měsíci +2

    I think the “seeing 12 moves into the future” thing is still really good.

  • @ashikrasool6609
    @ashikrasool6609 Před 3 lety +1109

    The fact that he uses MS Paint for his board animation istead of the actual game he coded himself just shows his confidence in his code.

  • @sethmcnevin682
    @sethmcnevin682 Před 3 lety +710

    Code bullet: *uploads within a month*
    Me: don't do that, don't give me hope...

    • @lechking941
      @lechking941 Před 3 lety +8

      He is a monomonth poster and I love him for the content is stupidly funny and good.

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

      He said he needed money, had a sponsor, and i sat through 4 separate ad breaks (start, 2 min, 6 min, 11 min)

    • @user-ck6ec3kh2l
      @user-ck6ec3kh2l Před 3 lety +4

      @@catelynh1020 i always watch all the ads on videos from creators i want to support. even if each ad is $0.06, if all of their viewers gave him that $0.18 it adds up pretty quickly

    • @catelynh1020
      @catelynh1020 Před 3 lety

      @@user-ck6ec3kh2l there's a point at which you would be annoyed, though. Ads every 2-3 mins, 2 unskippable ads per ad break, each 30 secs long. There was a video i watched where i literally spent more time sitting through ads than watching the video.

  • @jotarokujo3603
    @jotarokujo3603 Před 2 lety +14

    I genuinely believe Code Bullet would make a fantastic teacher one day.

  • @S14M07
    @S14M07 Před 2 lety +52

    “So, mathematically speaking…
    I’m ғᴜᴄᴋᴇᴅ.“
    - Code Bullet

  • @ole7762
    @ole7762 Před 3 lety +1341

    Alpha-beta pruning:
    "Just like regular minimax but a bit fucky-wucky"
    Actually dying at how accurate it is, haha

  • @thegreyman6433
    @thegreyman6433 Před 3 lety +2897

    Can we get some love for the mastermind Pascal, who without, this video would not be possible. Thanks Pascal, you beautiful creature.

  • @jomacr3
    @jomacr3 Před 2 lety

    He really did a great job on this one, nice one man. I really enjoyed it plz keep the good content coming.

  • @irtehmrepic
    @irtehmrepic Před 3 lety +14

    I want to point out that Evan has changed his language of choice from Javascript to Python. That's character development.

  • @DiamondRocksIt
    @DiamondRocksIt Před 3 lety +3946

    It’s 2:16 am. Code bullet is more important. I always love seeing all your videos. Keep up the amazing work!

  • @aircraftoverviewer
    @aircraftoverviewer Před 3 lety +793

    Damn he uploaded in less than 2 months. The Code Bullet AI is evolving

  • @evanspaulding672
    @evanspaulding672 Před 2 lety +9

    I'm laying here sick in bed with the stomach flu and this feels like a fever dream.

  • @melissaclaassen9707
    @melissaclaassen9707 Před 2 lety

    I love videos like this because I enjoy watching the pure ingenuity of developers when they get stuck on something.

  • @JorjiCostava
    @JorjiCostava Před 3 lety +1333

    CodeBullet: “and that is where this weeks sponsor comes in.”
    Everyone: *more like this months sponsor if we’re lucky*

  • @noahbrown5491
    @noahbrown5491 Před 3 lety +580

    “Am I cheating? Maybe...”
    Wasn’t that the goal?😂

    • @wobblysauce
      @wobblysauce Před 3 lety +8

      but it isn't cheating it is called optimization.

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

      His goal is to cheat, but he cheated on cheating

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

      @@boxedfoxstudios6479 but did he cheat so he can cheat the cheat?

    • @borisrebic
      @borisrebic Před 3 lety

      Being that he spent god knows how long coding the bugger, I think he technically didn't cheat.
      Being that he made this exactly to fuck with the connect 4 community, he kinda did.

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

    I love the post-video rambling that he refuses to cut. Really brings the whole thing home

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

    that was such a wholesome sponsor i low-key wish i had an excuse to use your code

  • @martintirpak1033
    @martintirpak1033 Před 3 lety +1921

    Codebullet: next video will be more ambitious
    Everyone: see ya in 2021

    • @KingNedya
      @KingNedya Před 3 lety +58

      You're being too generous with your estimate.

    • @gameplayer1958
      @gameplayer1958 Před 3 lety +20

      Pretty sure it going to be a Christmas special

    • @cosmiccaleb9633
      @cosmiccaleb9633 Před 3 lety +20

      @@gameplayer1958 stop trying to be realistic

    • @robertt9342
      @robertt9342 Před 3 lety +8

      May 2021 be better than 2020.

    • @cosmiccaleb9633
      @cosmiccaleb9633 Před 3 lety +10

      @@robertt9342 Don’t say that... Don’t give me hope

  • @smrtvillager7353
    @smrtvillager7353 Před 3 lety +424

    Impossible events:
    Pigs flying
    Raining cats and dogs
    Code Bullet uploading a video without curse words

    • @meraldlag4336
      @meraldlag4336 Před 3 lety +13

      Code Bullet’s radio receiver being upright and not bent

    • @superjackxbs5855
      @superjackxbs5855 Před 3 lety +10

      Code bullet just having an upload schedule

    • @mysiph
      @mysiph Před 3 lety

      @@superjackxbs5855 i second this statement

    • @Introlabe
      @Introlabe Před 3 lety

      @@mysiph I third

    • @Alex22034
      @Alex22034 Před 3 lety

      @@Introlabe i forth

  • @dingoatemydonut8414
    @dingoatemydonut8414 Před 2 lety

    this beautiful editing gives my life meaning

  • @DaDankStrafe
    @DaDankStrafe Před rokem +5

    Never having watched this channel, I actually thought this was about to be a very formal and technical explanation of AI and coding. I was very wrong. However, I laughed my absolute ass off, so well done 😂 I subscribed.

  • @damusketeer
    @damusketeer Před 3 lety +450

    Within a month, he post new videos with good quality animations.
    Me: "Impossible."

    • @milktaster84
      @milktaster84 Před 3 lety

      I'm only liking this cause I imagined sorrowtv reading it and it made me laugh internally l

    • @therealjammit
      @therealjammit Před 3 lety

      I think he has an AI that does it for him.

  • @birrock4
    @birrock4 Před 3 lety +626

    Nerds have to be bullied, and since this year most were able to avoid school, I'm happy the australian code man came to deliver justice

  • @kasuraga
    @kasuraga Před 2 lety

    Ok I REALLY love that this ai you made, sets up the EXACT trap I would use against my friend. It was always a fight to calculate moves 5 steps ahead with her, so we would both have to resort to creating a double trap where no matter what, it would force the player into placing a piece that would allow the other person to win, or a situation where if they tried to block one winning move, another winning move opens up
    frequently we would get into a cat and mouse situation where we're blocking each other's moves to the point we've almost filled the entire board. I think we've ended in draws before too
    I'd love to play against this AI in connect 4

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

    C++ is perfect for this simply because of template metaprogramming, most of the calculation can be done at compile time, especially for something like this where there is a limited number of states for the board to be in.

  • @eliasbrixedm
    @eliasbrixedm Před 3 lety +811

    CB: *Curses within the 30 second mark*
    Also CB: *Gets a sponsor*
    Me: How

    • @darthvader2994
      @darthvader2994 Před 3 lety +25

      sponsors don't care about swears and are more relaxed about it, it's midroll ads you can't get if you're rude because youtube wants money and advertisers don't want to advertise on swear videos or smthn

    • @anzol4523
      @anzol4523 Před 3 lety +8

      ah KIDS PRODUCTS sponsor

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

      @@darthvader2994, CB: *Also gets mid-roll ads.

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

      It seems like recently companies have been coming to understand that viewers aren't nearly as offended by the flavor of words chosen by our favorite creators as THEY are.
      Evan's just a cool dude, always friendly and upbeat. If I were a sponsor, I'd be happy to have my brand in front of his videos.
      And as a bonus, his audience is very rarely toxic in the comments. Usually cool, happy folk down here in the garbage pit.

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

      @@mashrien what garbage.

  • @thedoctor1510
    @thedoctor1510 Před 3 lety +873

    "Like normal minimax, but a bit fucky wucky."
    - Code Bullet

    • @jzLoFT
      @jzLoFT Před 2 lety +6

      confirmed code bullet is a protogen?

    • @omegavfx3482
      @omegavfx3482 Před 2 lety +6

      Oopsie woopsie! We made a fucky wucky a wittle fucko boingo!

    • @XD-yn6hb
      @XD-yn6hb Před 2 lety +6

      @@jzLoFT I mean, Code Bullet IS a computer person. So, let's just file that theory under "vaguely possible".

    • @racehans4521
      @racehans4521 Před rokem

      @@XD-yn6hb pun?

    • @XD-yn6hb
      @XD-yn6hb Před rokem

      @@racehans4521 yes

  • @Nicholas-cm6rx
    @Nicholas-cm6rx Před 3 lety

    The last 2 minutes of this video are the best!

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

    3:23 KILLED me. i havent had this good of a laugh in a while

  • @epicuel9411
    @epicuel9411 Před 3 lety +652

    When his art skills are improving more than his coding skills....

    • @facefish1713
      @facefish1713 Před 3 lety +40

      It's another person who do the animations now

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

      No this is not how you are supposed to play the game!

    • @JM.....
      @JM..... Před 3 lety +4

      @@facefish1713 he discussed how he enjoyed the editting at the end so ???

    • @chrisp7991
      @chrisp7991 Před 3 lety +17

      @@JM..... no some artist on Instagram drew the sprites for code bullet, and I'm assuming he just edits them

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

      @@colinrobinson9858 I was making a joke, of course his coding is getting better. Don't assume and be a dick about it.

  • @0RatedChess
    @0RatedChess Před 3 lety +892

    Every game ever:
    Code Bullet: So I made a AI that can destroy humans...

    • @c-1939
      @c-1939 Před 3 lety +14

      *then proceeds to help all of humanity*
      Code bullet: Well that wasn’t supposed to happen

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

      @@c-1939 *Let me fix that*

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

      @@c-1939 Sounds like Doofenschmirtz from Phineas & Ferb

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

      Go to btd battles then

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

      Remember to make your fail safe work

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

    (13:00) I like how it checks if it can play by if the next white circle gets filled

  • @smwet8184
    @smwet8184 Před 2 lety

    OH THIS IS AWESOME THAT OPENING WAS AMAZING

  • @baconninja4481
    @baconninja4481 Před 3 lety +128

    “I’m not good at optimization, or programming, or Connect 4”
    Your name is Code Bullet.

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

      @22JEREMY OPPENZATO and enigma machine part 2

    • @LJ-fe8vb
      @LJ-fe8vb Před 3 lety +1

      @22JEREMY OPPENZATO Already made. His name is Magnus Carlsen

  • @echo6romeo113
    @echo6romeo113 Před 3 lety +344

    "So mathematically speaking, I'm f*cked."
    Good lord have I been there

  • @ric.a.905
    @ric.a.905 Před 2 lety

    how am i only now learning that this channel exists? :O you rock dude.

  • @diggyrobinson5859
    @diggyrobinson5859 Před 8 měsíci +2

    Remember, in coding, copying from others isnt cheating it's learning, imagine if doctors just had to wing it during surgery

  • @BillionAir48
    @BillionAir48 Před 3 lety +291

    What if CB made the PERFECT A.I. to fix his upload schedule

  • @timothymclean
    @timothymclean Před 3 lety +82

    3:33: "Alright, I'm gonna need you to consider every possible move you can-"
    _dumps all of his yellow pieces in_
    "No, you don't get to _take_ every move, you-"
    _dumps more yellow pieces in_
    "Why are you dropping extra in the first column?"

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

      As a programmer I felt the frustration in the fact that it broke but it didn't even break in a way you can understand.
      Like why, I made you in a way I thought you would work. When you didn't work you did it in such a way where it makes even less sense. Like why you gotta break the break ¿¿

  • @tristrumandrewsfisho339

    this was the most enjoyable vid ive seen on this channel

  • @jonatanferenczfi189
    @jonatanferenczfi189 Před rokem

    Just realized there's a clip of Mr. Lahey at 1:51. After all these years and countless rewatch this video still keeps on givin 🙏

  • @Viper-bh6cf
    @Viper-bh6cf Před 3 lety +581

    Anyone: Makes one move.
    CB: And that's where you lost.

    • @SCP--gr3pd
      @SCP--gr3pd Před 3 lety +2

      Me:(blinks)

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

      Going first is actually the winning start. Middle column OP

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

      poo poo man*

    • @RandomNulls
      @RandomNulls Před 3 lety

      Next he should do a tic tac toe one cause yeah

  • @bigskyskee4957
    @bigskyskee4957 Před 3 lety +744

    Code bullet: It’s not really cheating
    Aalso code bullet 5 seconds later: so I’ve optimized this cheat so hard I have multiple divorce lawsuits and I aint married

    • @JupiterDude3000
      @JupiterDude3000 Před 3 lety +10

      Wow, I began in this video and looked at the comments and this caught my eye, only cause this sounds like something Evan would actually say

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

      Haha I messed up your 666 likes

    • @bmw123ck
      @bmw123ck Před 3 lety

      It is now at 777 likes, don't u dare

  • @meerslemany2529
    @meerslemany2529 Před 3 lety

    This one was so perfect and fun i hope you keep it going,💜💜

  • @Govanification
    @Govanification Před 2 lety

    Dude this is the most hilarious editing of all your videos. The TV remote attached to a gun was so funny.

  • @TheSpartan451
    @TheSpartan451 Před 3 lety +1903

    "and then the computer goes AAAAAAAAAAAAAAAAAAAAAAAAAAA" made me laugh for a long time

    • @lPhoenixGloryl
      @lPhoenixGloryl Před 3 lety +25

      im still laughing to it

    • @mrnewb4725
      @mrnewb4725 Před 3 lety +17

      @@lPhoenixGloryl Its been a month u still laughing

    • @lPhoenixGloryl
      @lPhoenixGloryl Před 3 lety +15

      @@mrnewb4725 Honestly yes if I happen to check the video again

    • @mrnewb4725
      @mrnewb4725 Před 3 lety +8

      @@lPhoenixGloryl Noice

    • @MrStuff-xd3mt
      @MrStuff-xd3mt Před 3 lety +7

      4 months ago and I'm also still laughing

  • @engboy69
    @engboy69 Před 3 lety +752

    I fear no man. But poo poo man, he scares me

  • @economicapple2609
    @economicapple2609 Před 8 měsíci +1

    Bro dropped the hardest connect 4 edit and thought we wouldn’t notice

  • @smwet8184
    @smwet8184 Před 2 lety

    THE EDITING JUST KEEPS GETTING BETTER OH MY GOSH

  • @XxXblubenXxX
    @XxXblubenXxX Před 3 lety +1971

    "If you clicked option A or B then you don't know me very well."
    Evan, you literally went from JavaScript to Python for your Deep Q Learning car video...

    • @MisterJackTheAttack
      @MisterJackTheAttack Před 3 lety +120

      And he had a terrible time, and the video was delayed for a long while.

    • @kritomasP
      @kritomasP Před 3 lety +24

      Not Java, JavaScript

    • @Sykale
      @Sykale Před 3 lety +27

      JavaScript isn't a very fast language either (at least not like c++) so I don't know how much that'd help

    • @Walter-Montalvo
      @Walter-Montalvo Před 3 lety +29

      @@Sykale Didnt help with performance, but allowed him to use some of the Q learning libraries (written in Python)

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

      @@Sykale and python is slower than JavaScript

  • @darthcirls3552
    @darthcirls3552 Před 3 lety +350

    Code Bullet: We'll be making history
    Me: Code bullet is coming back to one video every 3 months?

  • @jacketylon
    @jacketylon Před 2 lety

    I loved the rambling at the end. You should stream more

  • @SomeRandomDevOpsGuy
    @SomeRandomDevOpsGuy Před 2 lety

    This is exactly how I programmed my chess computer, but used Crafty as a base and just added onto that. I was only 14 at the time so gimme a break.
    So cool to see you create the base!!

  • @nssheepster
    @nssheepster Před 3 lety +545

    "If you picked C, that's a little insulting"
    Well, I mean... You DID ask, CB. Did you want us to lie to you?

  • @Mocha2007
    @Mocha2007 Před 3 lety +330

    The bot's profile says 261 wins, 26 defeats for Connect 4. That's a 91% winrate.
    It also says 0 wins, 2 defeats for... Battleship?!

    • @LV5_G.R.P.
      @LV5_G.R.P. Před 3 lety +28

      impressive that it wasn't banned or something like that already since i feel like it is a bit of an unfair advantage

    • @simonfisher7
      @simonfisher7 Před 3 lety +17

      Guess battleship is next or code was testing the account

    • @Disatiere
      @Disatiere Před 3 lety +31

      @@LV5_G.R.P. There's no way for that site to detect botting, a high winrate just means a good player

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

      @@Disatiere No actually the game is perfect information and solved; it's easy to detect since 1995. The win rate is irrelevant, you just check the moves it makes against the 1995 solution, which is what CodeBullet has implemented. In fact, the win rate in this case depends only on how well humans on the site play when they have first move, because the solution is first player win. The only reason they haven't is that nobody seriously plays Connect 4.

    • @darkfrei2
      @darkfrei2 Před 3 lety

      @@JigawattMusic How about connect 5 with bigger field?

  • @SlushiiBatzz
    @SlushiiBatzz Před rokem

    Idk what any of this means but it’s so easy to listen to and so entertaining

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

    9:23
    CB: Non non non
    Me, a baguette speaker: OUI OUI OUI

  • @johnalogue9832
    @johnalogue9832 Před 3 lety +908

    "Plague left the game."
    CODE BULLET HAS SAVED US ALL.

  • @kalebbruwer
    @kalebbruwer Před 3 lety +336

    3:46 "Guess who knows a lot about optimization"
    Probably not the guy working in Python. I could be wrong, though

    • @CrazyStranger11
      @CrazyStranger11 Před 3 lety +21

      Python can get a bad rap as being slow(er) because it's interpreted, but in any case, optimization requires a knowledge of what's going on behind the scenes. It's very possible to write optimized code in python. It may still be slower than something in c/c++ but that's the price you pay for a high level language.

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

      @@CrazyStranger11 writing optimized code in python is _hard_ and its still slower than not-shit c#/c++ code

    • @DamageMaximo
      @DamageMaximo Před 3 lety

      Can you do better?

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

      @@DamageMaximo he is joking my dude

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

      @@CrazyStranger11 yup, it's slow as shit but that forces you to approach problems in very interesting ways. Forcing that big brain time

  • @princess_stonks3841
    @princess_stonks3841 Před 2 lety

    Bru this is what I’m learning in my discrete math class on factorials and graph theory!
    🤯😱

  • @denverparsons7330
    @denverparsons7330 Před rokem

    Love this video bro

  • @karanbirsingh1559
    @karanbirsingh1559 Před 3 lety +538

    My friends"he codes with lot of profanity"
    Me:"that's the only way I know"

    • @mtnbkr5478
      @mtnbkr5478 Před 3 lety +25

      I don't think I've ever written a program that didn't involve at least one session of rage-swearing.
      Someplace, I have a copy of "Hello, $@#^! world", which throws a random profanity in each time it runs.

    • @Loch.Nessie
      @Loch.Nessie Před 3 lety +2

      @@mtnbkr5478 I love that 😂😂😂 I took computer science 1 and 2 in college and it fucked me over so much. I had to take cs2 a second time cause I failed it the first time. There were many nights spent crying and raging over broken code that all broke because of one missed semicolon😂😖

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

      @@Loch.Nessie I feel that so badly 😭😭 coding is pain

    • @flyinglack
      @flyinglack Před 3 lety

      @@Loch.Nessie it takes time to become used to the syntax. with more experience, you can find the error easily.