I created an AI to Play Chess

Using minimax i created an Ai to play chess.
Huge thanks to brilliant.org for supporting this channel, check them out at www.brilliant.org/CodeBullet
I'll upload the program soon
Twitter: / code_bullet
Patreon: / codebullet
Discord: / discord

Пікірлер: 4 700

  • @diamonddog2638
    @diamonddog26384 жыл бұрын

    6:23 Seeing the King and Pawn like that physically hurt me.

  • @khklkhcvtvreff

    @khklkhcvtvreff

    4 жыл бұрын

    I agree mate

  • @bennybenavides7202

    @bennybenavides7202

    4 жыл бұрын

    Omg, I saw that and was so annoyed

  • @keenankrick4590

    @keenankrick4590

    4 жыл бұрын

    That was pretty bad

  • @iokoro

    @iokoro

    4 жыл бұрын

    That moment where the king gets captured

  • @Dark_Voice

    @Dark_Voice

    4 жыл бұрын

    @@iokoro tbh, in chess it would be a masterful move to sacrifice the king who is nearly completely useless for the enemy queen :D

  • @superairdog6136
    @superairdog61365 жыл бұрын

    You didn’t implement check and check mate. If someone is in check, they MUST make a move to save the king, or else they will lose. Edit: I made additional comments in the replies, please read them.

  • @Crystal_Bull

    @Crystal_Bull

    5 жыл бұрын

    Was just thinking that.

  • @OnlyRealmatze

    @OnlyRealmatze

    5 жыл бұрын

    It‘s missing „castling“ as well, if I‘m not mistaken.

  • @bobv3347

    @bobv3347

    5 жыл бұрын

    That would be very difficult though

  • @afonsotopa9164

    @afonsotopa9164

    5 жыл бұрын

    THANK YOU!!!!

  • @marcellsipos8760

    @marcellsipos8760

    5 жыл бұрын

    If you got 2 AIs to fight each other, the first game will be chaos. But the algorithm learns, and the AI that loses the last round has to do better. Its minimax, but whit only 1s and 0s(1 means that A wins, 0 that B). A has to go where the more 1s are, B has to do the opposite.

  • @TypicallyThomas
    @TypicallyThomas Жыл бұрын

    "I'll upload the program soon" 4 years later...

  • @Naokarma

    @Naokarma

    Жыл бұрын

    It's on his website, lol.

  • @Naokarma

    @Naokarma

    Жыл бұрын

    @Lego It's in the description of his later videos. KZread auto-deletes comments with links now, so you'll just have to grab it from there.

  • @hmmmidkkk

    @hmmmidkkk

    3 ай бұрын

    5 years later....

  • @colorswift
    @colorswift4 жыл бұрын

    even this AI could have lastest longer than xqc.

  • @paralegalparaplegic8177

    @paralegalparaplegic8177

    3 жыл бұрын

    True pepelaugh

  • @kadenlogan6589

    @kadenlogan6589

    3 жыл бұрын

    Honestly

  • @xajaga5308

    @xajaga5308

    3 жыл бұрын

    Didnt expect to see this here, 6 moves pepelaugh

  • @TJ-gf3sy

    @TJ-gf3sy

    3 жыл бұрын

    RIPPPPP

  • @takeastepback3333

    @takeastepback3333

    3 жыл бұрын

    Sadge

  • @adamcoburn2646
    @adamcoburn26464 жыл бұрын

    The queen just ate his king lmao

  • @paulmueller100x

    @paulmueller100x

    4 жыл бұрын

    xDDDDDDD

  • @rhianapotase1896

    @rhianapotase1896

    3 жыл бұрын

    His?

  • @obnoxiouslytrans6400

    @obnoxiouslytrans6400

    3 жыл бұрын

    @@rhianapotase1896 6:27, The AI captures Code Bullet's king.

  • @jamespinard6757

    @jamespinard6757

    3 жыл бұрын

    It's a spider kingdom

  • @ivailmarinov3486

    @ivailmarinov3486

    3 жыл бұрын

    this sounds too much like a mantis

  • @hpwest9753
    @hpwest97535 жыл бұрын

    *I'll upload the program soon* 3 weeks later... EDIT: 2 months later... EDIT: 2 years later...

  • @missispiggie926

    @missispiggie926

    5 жыл бұрын

    6 months later..... Still Waiting

  • @authenticNL2

    @authenticNL2

    5 жыл бұрын

    Missis Piggie yep

  • @oscarword775

    @oscarword775

    5 жыл бұрын

    yep

  • @theofficialchannelofoffici7962

    @theofficialchannelofoffici7962

    5 жыл бұрын

    yep

  • @limodo

    @limodo

    5 жыл бұрын

    yep

  • @DominikHatHunger
    @DominikHatHunger3 жыл бұрын

    "I'll upload the program soon" so that was a fucking lie

  • @meyerreynaldo

    @meyerreynaldo

    3 жыл бұрын

    Yep it was

  • @bartoszkonieczny3238

    @bartoszkonieczny3238

    2 жыл бұрын

    Pretty sure it's on his website.

  • @allthingsian6852

    @allthingsian6852

    2 жыл бұрын

    @@bartoszkonieczny3238 he has a website?

  • @skillf00l84

    @skillf00l84

    2 жыл бұрын

    @@allthingsian6852 I think u can find it in his GitHub

  • @willenglish5385

    @willenglish5385

    2 жыл бұрын

    It's on the website, and the website is on his github so navigate to the project files and the folder is called Chess.

  • @BenBen-bb7bb
    @BenBen-bb7bb3 жыл бұрын

    6:24 king subtly sits in check for the next 4 moves...

  • @BEN-ys6gu

    @BEN-ys6gu

    2 жыл бұрын

    The point of the game is to capture the other player's king first as I see it, but if the player is so bad that he doesn't know he can do that yet the game should probably let you stay in check how long you want

  • @yeetionary

    @yeetionary

    2 жыл бұрын

    @@BEN-ys6gu in chess,putting the king into check is an illegal* move (*illegal meaning you shouldn't do it)

  • @BigShoornlo
    @BigShoornlo5 жыл бұрын

    No castling, check, or checkmate. OOF

  • @xzxjasonxzx

    @xzxjasonxzx

    5 жыл бұрын

    ChronosGaming or taking pawns en passant.

  • @onehourloops8485

    @onehourloops8485

    5 жыл бұрын

    I thought it was pawn

  • @xzxjasonxzx

    @xzxjasonxzx

    5 жыл бұрын

    One Hour Loops r/woosh

  • @emil335

    @emil335

    5 жыл бұрын

    @@xzxjasonxzx en passant*

  • @joeking3181

    @joeking3181

    5 жыл бұрын

    Unnamed Player he didn’t even implement the part of chess that’s the same as checkers, since the pawns don’t turn into queens when they reach the other side of the board.

  • @okerbel
    @okerbel4 жыл бұрын

    6:22 this is how GM Ben Finegold's 1 o'clock class plays chess

  • @christoph4454

    @christoph4454

    4 жыл бұрын

    😂😂

  • @danjeory3659

    @danjeory3659

    4 жыл бұрын

    The truth hurts

  • @geo3826

    @geo3826

    4 жыл бұрын

    you're crazy like fox news

  • @wiellnyan

    @wiellnyan

    4 жыл бұрын

    Hahaha.

  • @wiellnyan

    @wiellnyan

    4 жыл бұрын

    JediNxf7 always play king f1/8

  • @ridleyhult
    @ridleyhult4 жыл бұрын

    Legend says he's still getting ready to release it

  • @tmyfatmufo

    @tmyfatmufo

    3 жыл бұрын

    Website

  • @shardultheshaneshankar

    @shardultheshaneshankar

    3 жыл бұрын

    Same.. in 2021!😂😂😂😂

  • @gilbertocisneros85

    @gilbertocisneros85

    2 жыл бұрын

    Share the link please

  • @captainjimmy2306

    @captainjimmy2306

    2 жыл бұрын

    @@shardultheshaneshankar Same..in 2022😂😂😂😂

  • @Majorite

    @Majorite

    2 жыл бұрын

    @@captainjimmy2306 lol

  • @Anonymous4045
    @Anonymous40453 жыл бұрын

    Didn’t have en passant or castling

  • @YourMom-rg5jk

    @YourMom-rg5jk

    17 күн бұрын

    even mine has that

  • @fotiskapotos
    @fotiskapotos5 жыл бұрын

    Dude your algorithm could have beaten Level 1 IF you had implemented check and checkmate. Your algorithm is clearly able to take all the opponents pieces but your heuristic for your minimax is wrong because the purpose of the game is not to take the most pieces, it is to checkmate. If you were to add that checkmate equals like 10000 points then your algorithm could easily beat level 1 even more if you increase the depth

  • @Arygua

    @Arygua

    5 жыл бұрын

    If he increased the depth much the speed would take drastically longer making MiniMax not as viable.

  • @mirarkkthur7393

    @mirarkkthur7393

    5 жыл бұрын

    My chess mate is at 1000 points but it only spawns after several conditions. As I have already beaten any chess AI in existence I would assume taking pieces is a good start for his AI. If he improves it, I want to challenge it. :)

  • @leovaris8738

    @leovaris8738

    4 жыл бұрын

    You dont need check and checkmate, since the program looks ahead and if youre in check it knows it will lose on next so it avoids it

  • @Arygua

    @Arygua

    4 жыл бұрын

    @@leovaris8738 he's saying the program does not aim to put the player into check or checkmate. Checkmate being the ultimate purpose of the game.

  • @leovaris8738

    @leovaris8738

    4 жыл бұрын

    @@Arygua yes and it aims for checkmate automatically since the price for capturing king 200 or something really high

  • @reduser3731
    @reduser37315 жыл бұрын

    6:23 Black king was in check???

  • @valiok9880

    @valiok9880

    5 жыл бұрын

    Exactly what i was thinking. Nonetheless it seems good

  • @austinm8005

    @austinm8005

    5 жыл бұрын

    Yeah I saw that too lol

  • @ofirrolev

    @ofirrolev

    5 жыл бұрын

    That's what happens when you program a game too fast

  • @Pope_Balenciaga

    @Pope_Balenciaga

    5 жыл бұрын

    He didn't add concepts of check castling checkmate en passent etc..

  • @jasondrews9112

    @jasondrews9112

    5 жыл бұрын

    After spending a month coding chess In school, I know the challenge of adding check and the other rules he didn’t add. Kinda glad he wasn’t able to add all of that in one coding session xD

  • @ethanofalltrades8622
    @ethanofalltrades86223 жыл бұрын

    As someone who likes chess and AI, I of course had to analyze every move between the two AIs. This chess game was more interesting than the grandmaster games I've studied... I learned a lot.

  • @RGC_animation

    @RGC_animation

    2 жыл бұрын

    What knowledge have you acquired? (If you still remember, that is)

  • @bommeryeet4982

    @bommeryeet4982

    2 жыл бұрын

    @@RGC_animation I would like to know as well

  • @ethanofalltrades8622

    @ethanofalltrades8622

    2 жыл бұрын

    @@RGC_animation The most interesting thing I think is how the Chess 100 AI seems to have a lot more awareness, but it chooses to make bad moves on purpose. It's most clear in the opening that black knows how to put it's pieces in good places. But on move 6 (pawn to d5), it suddenly makes a terrible move for no benefit and leaves a center square pawn unprotected and under attack. I think the chess 100 AI is a single algorithm for all levels, and they added a lot of mistakes to bring it down to level 1. This makes sense for a master chess program because you want the AI, even on level 1, to play like a human and use positional strategy and common openings, but it also needs to make enough mistakes that the human player has a chance. Another interesting thing is how CB is looking 4 moves ahead, but only for the best piece count. It doesn't have awareness of winning the game, so it just continues to take pieces until it can't anymore. It also doesn't have awareness of situations it must avoid, such as stalemate (but only if they are winning). I suspect that almost all games will end in stalemate. My biggest takeaway here was honestly how much is missing from a chess AI that can see 4 moves ahead, but nothing else. For anyone who's interested, here's the whole game in pgn: 1. h4 d6 2. b4 h6 3. Bb2 Qd7 4. h5 e5 5. e3 b5 6. a3 d5 7. Bxe5 Kd8 8. f4 Ke7 9. g4 Rh7 10. f5 c6 11. f6+ Nxf6 12. Bd3 Qb7 13. Bxh7 Na6 14. Bd3 Qc7 15. Bxc7 Nxg4 16. Ba5 Be6 17. c4 Kd7 18. cxb5 Ke8 19. bxc6 Nxe3 20. dxe3 Bf5 21. Bxf5 f6 22. a4 Nxb4 23. Bd7+ Kf7 24. Qe2 Be7 25. c7 Rc8 26. Bxc8 Ke8 27. Qb5+ Kf7 28. Rh2 Na2 29. Qxd5+ Kf8 30. Rhxa2 g6 31. Qd7 Kg8 32. Qe6+ Kh8 33. Qxe7 g5 34. Qxf6+ Kg8 35. Qxh6 Kf7 36. e4 a6 37. Qxg5 Ke8 38. Qg7 1/2-1/2 And here's a link to chesscompass where you can analyse the whole game. (No affiliation) www.chesscompass.com/analyze/b9cb802802d72d73e61e28102e9f9698

  • @RGC_animation

    @RGC_animation

    2 жыл бұрын

    @@ethanofalltrades8622 Wow man thanks for that!

  • @RGC_animation

    @RGC_animation

    2 жыл бұрын

    @@bommeryeet4982 He replied

  • @joeloliver2279
    @joeloliver22793 жыл бұрын

    I was in a chess club for 2 years and this physically hurt me

  • @EEEEEEEE

    @EEEEEEEE

    6 ай бұрын

    E‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎

  • @BaoCypher0912
    @BaoCypher09125 жыл бұрын

    Please make an AI that play Tetris at max speed and is able to do difficult spins, tetris, Tspin single/double/triple and combo

  • @helldronez

    @helldronez

    5 жыл бұрын

    i love tetris

  • @punchster289

    @punchster289

    5 жыл бұрын

    Speed isn't a problem for a system which thinks in the timeframe of nanoseconds. That said, tetris would be perfectly tailored for an AI.

  • @amaice

    @amaice

    5 жыл бұрын

    Bao Cypher the bot couldn't even castle or understand checkmate and you want them to make a bot that does t-spins?

  • @PandoraMakesGames

    @PandoraMakesGames

    5 жыл бұрын

    I made that, I got a demo on my channel.

  • @punchster289

    @punchster289

    5 жыл бұрын

    Gr8_Space keep in mind, he only used a min max system. An actual neural network, while taking longer to train, has the potential to be far superior. Also, chess is significantly more complex than tetris, but tetris, being a video game, has the added bonus of using speed of gameplay to influence its difficulty curve, making it equally hard if not harder for humans than chess.

  • @ieegordon2634
    @ieegordon26344 жыл бұрын

    Microsoft: *castling* Codebullet: wait, that's illegal.

  • @Liggliluff

    @Liggliluff

    4 жыл бұрын

    Microsoft: en passant Most people: wait, that's illegal.

  • @alex2005z

    @alex2005z

    3 жыл бұрын

    @@Liggliluff I still dont fully understand how it works

  • @Koopatotschkaru

    @Koopatotschkaru

    3 жыл бұрын

    @@alex2005z If a opponent pawn makes the double move thing and after that he stands next to one of your pawns you can move diaganolly (fuck i need to learn english) behind the opponents pawn and kill it (you have to be french to do this if not you are gonna get killed by Magnus carlsen him self)

  • @alex2005z

    @alex2005z

    3 жыл бұрын

    @@Koopatotschkaru ty

  • @patricktho6546

    @patricktho6546

    3 жыл бұрын

    and if a pawn reaches the last rank it can become any other piece, but a king...

  • @Elharion2003
    @Elharion20034 жыл бұрын

    0:36 THE CHESS BOARD IS REVERSED AAAAHHHHHH

  • @josephpayne113

    @josephpayne113

    3 жыл бұрын

    AAAAAAAAAAAAAAAHAHHAHAHHAHAHHHAHHHHH

  • @technotaoist72

    @technotaoist72

    3 жыл бұрын

    I died a little seeing that. Then I remembered, Code Bullet. We're luck he didn't write an AI to generate a genetic algorithm chessboard and quit before getting to part two. I'm looking at you, Enigma machine

  • @chetanduggirala9325

    @chetanduggirala9325

    3 жыл бұрын

    I looked at it and I was like *Wait a minute, something's off there*. Scrolled far too down the comments to see this mistake being pointed out and I was doubting myself if it was in fact wrong lmao.

  • @erikmerrill8280
    @erikmerrill82804 жыл бұрын

    “We’re going to assign pieces values and from whites perspective we are trying to reach a high score.” That’s not how this works. That’s not how any of this works.

  • @JesusInStripeZ

    @JesusInStripeZ

    4 жыл бұрын

    Completely robs both white and black of the option to sacrifice for positional advantage :(

  • @paulalexandre3358

    @paulalexandre3358

    4 жыл бұрын

    When playing normally, when we cannot see all moves ahead, then yeah it’s not. But if we could see any game, then actually this is precisely what chess is about: a checkmate is an +infinity for white so with enough depth it would find it.

  • @alwinwinter1645

    @alwinwinter1645

    4 жыл бұрын

    Trying to reach a high score in chess is like trying to win a game of tetris

  • @paulmueller100x

    @paulmueller100x

    4 жыл бұрын

    @@paulalexandre3358 true

  • @gaoindustries8013

    @gaoindustries8013

    4 жыл бұрын

    Actually they already have values

  • @deldrel6666
    @deldrel66665 жыл бұрын

    AI learn to play Tetris could be really cool (lika all the other ones)

  • @luckiestllama6378

    @luckiestllama6378

    5 жыл бұрын

    How many people had this idea

  • @shriramprasadvenkatesan5459

    @shriramprasadvenkatesan5459

    5 жыл бұрын

    One thing to take care when coding the ai for tetris is the reaction delay time.If it was true ai, it would take very less time for the ai to orient the pieces once it figures out the ideal position and orientation.What I would like to see is to have the ai have human like reaction times and try to plan its strategy according to that and finally resign to its fate knowing that TETRIS always beats you eventually

  • @dryued6874

    @dryued6874

    5 жыл бұрын

    Inb4 it pauses the game right before losing.

  • @NonTwinBrothers

    @NonTwinBrothers

    5 жыл бұрын

    kzread.info/dash/bejne/qoN319R7iazFl7w.htmlm11s

  • @s0mepi884

    @s0mepi884

    5 жыл бұрын

    Deldrel I second this

  • @nerikacutie283
    @nerikacutie2834 жыл бұрын

    6:27 no check. Having check and checkmate is crucial for an AI since the game and your moves rely on them.

  • @Samuel-th6fw

    @Samuel-th6fw

    2 жыл бұрын

    Looks to me like he didn't only not account for illegal moves (you're not even allowed to sacrifice the king). The AI also didn't seem to get any penalty for sacrificing the king nor reward for a checkmate. For example: around 9:25 it misses an easy mate in two, despite supposedly looking four moves ahead, meaning it must have prioritized capturing pawns over the checkmate, in turn letting the opposing AI play into a stalemate.

  • @EEEEEEEE

    @EEEEEEEE

    2 жыл бұрын

    ‎‎‎‎‎‎‎‎‎E‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

  • @DanielAbeleira
    @DanielAbeleira3 жыл бұрын

    I love how he made a 3 minute tutorial on how to make chess before he started with the actual subject of the video

  • @shayboual1892

    @shayboual1892

    3 жыл бұрын

    He can't even play chess aswell, he forgot about the concept of checkmate

  • @u8f7
    @u8f72 жыл бұрын

    That was really interesting! I had a gander at the description and it says "program will be uploaded soon" even though it's been 3+ years, I'd be really interested to check it out! Def agree that you should revisit this with more implementations, adding rules like you have to move out of check, etc.

  • @drunkeneyerishgaming3144
    @drunkeneyerishgaming31445 жыл бұрын

    "I'll upload it later" *2019* *still not uploaded*

  • @quarkstuff

    @quarkstuff

    4 жыл бұрын

    that's code bullet

  • @coleperry2650

    @coleperry2650

    4 жыл бұрын

    code-bullet.github.io/Chess-AI/Chess/

  • @carrillo_iv6829

    @carrillo_iv6829

    4 жыл бұрын

    Zactly

  • @profess10nal0

    @profess10nal0

    4 жыл бұрын

    www.thebigcb.com/projects/chess/chess.html

  • @pixelcubed2088

    @pixelcubed2088

    4 жыл бұрын

    Meh tommorow for him is 3 days so let's assume he wont

  • @onstepahead
    @onstepahead5 жыл бұрын

    If you plan on improving the AI you should make the King have infinite value(or enough that it would be more than the sum of all enemy pieces) because if you lose it you lose the game. The concept of checks and castles seemed missing but it is a pretty good start.

  • @Cris-qg5fk

    @Cris-qg5fk

    5 жыл бұрын

    First of, the programmer doesnt determine the 'value' of each piece. The AI should figure it out by itself like every other piece. Google already developed Alpha Zero, a chess AI that learned by playing over 10million games by itself, which is now stronger than the worlds best chess engine, Stockfish 8.

  • @Xpegasu

    @Xpegasu

    5 жыл бұрын

    Flerikko Yes, google did that, but you have to take into account the fact that google had a shit ton of INSANELY out of this world GPU to do the training. Nothing us mere mortals can ever dream to have.

  • @einmensch6694

    @einmensch6694

    5 жыл бұрын

    Also en passant

  • @Cris-qg5fk

    @Cris-qg5fk

    5 жыл бұрын

    U rite haha But my point to op was that the programmers dont determine the value of the pieces xd

  • @casewhite5048

    @casewhite5048

    5 жыл бұрын

    stockfish is the best free engine and they were not playing with books

  • @pongo505
    @pongo5053 жыл бұрын

    6:25 this board position makes me so unreasonably angry!!!

  • @arivedal
    @arivedal4 жыл бұрын

    "Grandmasters think like 7 moves ahead"

  • @DarthVader-wk9sd

    @DarthVader-wk9sd

    4 жыл бұрын

    That makes me a Grand Master by his logic

  • @johnrubensaragi4125

    @johnrubensaragi4125

    4 жыл бұрын

    Using depth to represent human thinking is too simplistic.

  • @mo7ammeda7med29

    @mo7ammeda7med29

    4 жыл бұрын

    This is true .even not all of them can do it ..7 moves means 7 for you and for the opponent..we can't consider the opening theory cuz it's memorized...also it depends on the complexity of the position .

  • @DarthVader-wk9sd

    @DarthVader-wk9sd

    4 жыл бұрын

    @@mo7ammeda7med29 They think like 15 moves ahead though

  • @mo7ammeda7med29

    @mo7ammeda7med29

    4 жыл бұрын

    @@DarthVader-wk9sd I think that you think they are calculating the moves in ONE VARIATION !! But this is wrong they are calculating many variations in every move they calculate in the main variation so It's impossible in the complex positions to calculate 15 move with like 3 sub variations in every move no human can do that ... but remember i said in the complex attacking positions not in slow maneuvring middle game

  • @mementomori5580
    @mementomori55805 жыл бұрын

    The biggest Problem with the AI is that it has the wrong goal. The AI tries to take a many pieces as possible while completely ignoring the not only the positioning, but also the King! the actual goal should be to place the enemy King into a checkmate. The other pieces are just a means to the end, but for the final goal they're all irrelevant. And quick fix might be to give the King a very high number so that putting the king in a checkmate would be a very valuable move to consider. In your value appointment for the pieces, you completely ignored the King, so I don't know wether or not it has any value and how high this value is. Try setting it to something like 40 (sum of value of all other pieces + 1) or so. That should make the AI try to go after the king much more. Of course, this could also backfire if it makes bad moves and sacrifices all of its pieces just to try to get to the king which it might never reach...

  • @rompevuevitos222

    @rompevuevitos222

    5 жыл бұрын

    Well, the AI will probably learn that eventually, it wins once it captures the king so it will try to acomplish the same result once it figures that it can do that to win

  • @mementomori5580

    @mementomori5580

    5 жыл бұрын

    How will it learn that? It's not a learning/evolving algorithm. If it were, it would play differently every iteration even if the enemy would play the same. But it doesn't, because the Algorithm that he uses simply doesn't support that kind of changing behaviour.

  • @mementomori5580

    @mementomori5580

    5 жыл бұрын

    yeah, based on the minimax Algorithm he's using it should basically end up with the exakt same game with the only difference that, at the end, it will go for the king a little more if it has a chance (especially if there is a guaranteed checkmate, which often is the case... so unfortunately, it often takes more than just 4 steps to get to the guaranteed checkmate).

  • @PandoraMakesGames

    @PandoraMakesGames

    5 жыл бұрын

    I love to see other people who like AI, I have some AI demo's on my channel, let me know if you'd like to see tutorials.

  • @vajom822

    @vajom822

    5 жыл бұрын

    if you give the vallue infinite to the king it does just that. How do you input infinity in the computer? you don't have to: any value above the maximum combined vallues of all pices makes the computer value the king as infinite. now the positionnig part is a mondial challenge that stockfish and alphazero creator are trying to solve by different approaches: first the convenional chess engine are algorythm that uses humain understanding of chess to value a pice within the position. How many squarres can it move to? does it attack enemy king?... in the otherside neural network and machine learning is trying to make computer learn bether than what humans understand this is not a challenge a man can solve alone in a week just to make a youtube video

  • @asdfhsfdtehaed
    @asdfhsfdtehaed5 жыл бұрын

    Don't forget to add the ability to castle & en passant.

  • @xxmegagallade47

    @xxmegagallade47

    5 жыл бұрын

    ArgyleTuba or to add check lol, at around 6:20 the king was in check for a while and didn’t do anything about it

  • @beri4138

    @beri4138

    5 жыл бұрын

    Also stalemate, threefold repetition and the 50 move rule.

  • @AaronGiffordOfficial
    @AaronGiffordOfficial4 жыл бұрын

    6:30 thats check from the pawn and nothing happened

  • @charlesgordon9484
    @charlesgordon94843 жыл бұрын

    “I’ll upload the program soon” 2020:

  • @theRobo7m4n

    @theRobo7m4n

    3 жыл бұрын

    Omg bruh 😂

  • @JComprendsAuxMaths

    @JComprendsAuxMaths

    3 жыл бұрын

    check his github

  • @mementomori5580
    @mementomori55805 жыл бұрын

    You actually forgott 2 rules of chess: 1. Long and Short Castling. In which you move the King two spaces to the right or the left if you haven't moved the king before, and then move the Rook from the direction the king moved to on the same line but behind the king. 2. "en passent". If you move a pawn two spaces (first move for that pawn) and there is an enemy pawn that could have defeated that pawn if it only moved one one space instead of two, then the enemy pawn can still actually defeat the pawn by moving one field diagonally, as if the pawn only moved one field.

  • @lennertclaerhout577

    @lennertclaerhout577

    5 жыл бұрын

    Also when a pawn reaches the back line you can receive either a queen, a rook, a knight or a bishop

  • @commander8625

    @commander8625

    5 жыл бұрын

    And there was a point where black should have lost, because pawns capture diagonally

  • @commander8625

    @commander8625

    5 жыл бұрын

    No, I know what en passant is

  • @varkokonyi

    @varkokonyi

    5 жыл бұрын

    He aslo forgot to implement check, so the lack of en passant is not the biggest problem lol

  • @hamsterfromabove8905

    @hamsterfromabove8905

    4 жыл бұрын

    I mean he also doesn't have check. Or a concept of ending the game with checkmate. A chess A.I. is hard to make, but I was disappointed in the fact that the A.I. didn't even fully understand the rules of chess, and therefore couldn't possibly even have a chance of playing well. The A.I.'s understanding of chess is surpassed by first graders. Again, I understand that creating a good A.I. for chess is insanely hard, but Code Bullet failed to even make a functional A.I. His A.I. can't go a full game without making an illegal move.

  • @TheGloriousLobsterEmperor
    @TheGloriousLobsterEmperor5 жыл бұрын

    AI learns how to get my life back together.

  • @imfrank6475

    @imfrank6475

    5 жыл бұрын

    Drew Armstrong, The Glorious Lobster Emperor I need this

  • @hiimapop7755

    @hiimapop7755

    5 жыл бұрын

    AI learns how to fix a broken relationship.

  • @terner1234

    @terner1234

    5 жыл бұрын

    Impossible

  • @HB-lx2ey

    @HB-lx2ey

    5 жыл бұрын

    Hi Im APOP need this

  • @drewberry8945

    @drewberry8945

    5 жыл бұрын

    Where all doomed when that happens Lol.

  • @IamCoalfoot
    @IamCoalfoot4 жыл бұрын

    "Euhhgh, what am I doing now...?" That's Code Bullet, alright.

  • @Vidar93
    @Vidar933 жыл бұрын

    From what I understand this is actually essentially how deep blue kind of works by trying to get a high value to win. Where now most chess engines are fed data along with brute forcing options and then determines the path that will most likely lead then to a checkmate.

  • @benfleischman7051
    @benfleischman70515 жыл бұрын

    Make an AI that can play Geometry Dash

  • @lollolo9492

    @lollolo9492

    5 жыл бұрын

    Why on Earth would you have that profile picture.

  • @benfleischman7051

    @benfleischman7051

    5 жыл бұрын

    What are u talking about. That's my real face

  • @lollolo9492

    @lollolo9492

    5 жыл бұрын

    No you are NOT Josh from Until Dawn ok? Nor the actual actor so just stop lying.

  • @benfleischman7051

    @benfleischman7051

    5 жыл бұрын

    Lol Lolo how do u know I'm not him???

  • @Jerry_licious

    @Jerry_licious

    5 жыл бұрын

    Getting an AI to train requires you to make the game first. (At least to my knowledge.) So well nope.

  • @filla603
    @filla6034 жыл бұрын

    AI: takes king with queen Me: Aaaaaarh

  • @Owen_loves_Butters

    @Owen_loves_Butters

    3 жыл бұрын

    @@nelser1160 NOOOOOOOOO YOU CAN NEVER TAKE THE KING IN CHESS

  • @DefyMaxing
    @DefyMaxing3 жыл бұрын

    "I'll upload the program soon" (3 Years later) welp fuck

  • @DemiRonin
    @DemiRonin4 жыл бұрын

    Yes!! Continue this series!!

  • @spykidcgaming7948
    @spykidcgaming79485 жыл бұрын

    Being a chess nerd myself, seeing so many things not implemented (even basic things), really gets on my nerves

  • @ahmetgrcn2663

    @ahmetgrcn2663

    5 жыл бұрын

    Same

  • @ahmetgrcn2663

    @ahmetgrcn2663

    5 жыл бұрын

    Only material is counted as advantage. Not position.

  • @avananana

    @avananana

    5 жыл бұрын

    @@ahmetgrcn2663 rofl. saying "same" followed by the most ridiculous statement of the millennium.

  • @ahmetgrcn2663

    @ahmetgrcn2663

    5 жыл бұрын

    I meant Code Bullet's program.

  • @trollwarlord279

    @trollwarlord279

    5 жыл бұрын

    @@avananana i guess he referred to loss function, its not sth like average centipawn loss like implemented in stockfish

  • @JustinY.
    @JustinY.5 жыл бұрын

    So this is how skynet is born

  • @quantummomentum9681

    @quantummomentum9681

    5 жыл бұрын

    Justin Y. True dat

  • @amigosecretonavidad1442

    @amigosecretonavidad1442

    5 жыл бұрын

    Justin Y. That so true

  • @amigosecretonavidad1442

    @amigosecretonavidad1442

    5 жыл бұрын

    Justin Y. And i see you everywhere

  • @amigosecretonavidad1442

    @amigosecretonavidad1442

    5 жыл бұрын

    Justin Y. I didn't know that you like this channel

  • @Youmu_Konpaku_

    @Youmu_Konpaku_

    5 жыл бұрын

    Caught yoi

  • @bzas11
    @bzas114 жыл бұрын

    Code Bullet: "I'll upload the program soon" 2 years period time:

  • @deletedchannel7674
    @deletedchannel76743 жыл бұрын

    3: years later... Still haven't uploaded the program to play the chess bot

  • @raydarable

    @raydarable

    2 жыл бұрын

    Five months later... Still nothing.

  • @joshuafetter3831
    @joshuafetter38315 жыл бұрын

    You gotta revisit this with all the chess rules implemented.

  • @imafaux7424

    @imafaux7424

    2 жыл бұрын

    Like ya know, checks, and check mates

  • @freds_chess

    @freds_chess

    Жыл бұрын

    obviously en passant is most important

  • @patricktho6546

    @patricktho6546

    Жыл бұрын

    Casteling, 3 fault repotition, the 30 and 50 move rule, promoting a pawn and that's it (with the other comments)

  • @DendrocnideMoroides

    @DendrocnideMoroides

    5 ай бұрын

    @@patricktho6546 I know the 50-move rule, but what is the 30-move rule.

  • @davidphillips1141
    @davidphillips11415 жыл бұрын

    You should make another basic chess engine where piece values vary by how many squares they control instead of the static 1, 3, 5, and 9. I would be interested to see how an AI that only values material value would stack up against an AI that only values control of squares.

  • @bestvitalic

    @bestvitalic

    5 жыл бұрын

    Wow, interesting concept! Since for you to be able to control squares, it would automatically be careful with pieces positioning and also material as well, since it wouldn't be able to control as much if it gives pieces away, however I think it would be possible to "cheat" the crap out of it, if you're careful enough to lock all your pieces and give all the mobility to your opponent, then you could then capture some of the AI pieces in a way that he would think he was still in advantage, but suddenly you would unlock all your pieces and exchange the remaining pieces, simplifying to an easy to win end game, but I really think it worth a try! :d

  • @marouaneh175

    @marouaneh175

    5 жыл бұрын

    That's what chess AI do, given a position, they look at every piece and give it a score based on a heuristic, and compare the total scores for black and white. Different heuristics give rise to different styles. A checkmate is affected infinity, to make the AI sacrifice pieces to win the game if possible, or to avoid being checkmated. Specific score values differ from one AI to another, but they follow the same general ranking of importance more or less. A passed pawn is worth more than a pawn that hasn't moved, a pawn late game is worth more than a pawn in the early game, a double pawn is not worth as much, a knight's worth depends on its position, if there are too many pawns a knight is worth more than bishop, and vice versa, a piece's worth is affected by the number of peaces attacking it or defending it, and on whether it's pinned, etc. In the opening, the AI is usually given bonus score for castling ASAP and for developing pieces, some AI have an opening hand book that they pick the few first moves from, others like Stockfish compute from move 1.

  • @mirarkkthur7393

    @mirarkkthur7393

    5 жыл бұрын

    @@marouaneh175 And the Chessomat is a complete database with millions of movesets that always just spawns the optimal move, which is why no human player ever defeated it but its weak against other AIs. :D

  • @ME0WMERE

    @ME0WMERE

    2 жыл бұрын

    it's less about how much space each piece has and more about where the pieces are

  • @EEEEEEEE

    @EEEEEEEE

    2 жыл бұрын

    ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎E‎‎‎‎‎‎‎‎

  • @TheTonyExpress
    @TheTonyExpress3 жыл бұрын

    I'd love to see a vid of this one being further improved

  • @nolanbatur2047
    @nolanbatur20473 жыл бұрын

    Any possibilities of calculating the win percentage of the wooden shield strategy?

  • @JLMusicDude
    @JLMusicDude5 жыл бұрын

    PLEASE DON'T HATE ME FOR SAYING THIS; I love his videos, but he forgot to add castling to his code.

  • @CodeBullet

    @CodeBullet

    5 жыл бұрын

    yeah thats my bad

  • @zyxiarigau5528

    @zyxiarigau5528

    5 жыл бұрын

    And En Passant, but that's neither here nor there

  • @herissmon9878

    @herissmon9878

    5 жыл бұрын

    +Code Bullet You also severely made pawns screwed.

  • @victoriah4278

    @victoriah4278

    5 жыл бұрын

    What about check.... much more obvious

  • @Tree_-wp5zn

    @Tree_-wp5zn

    5 жыл бұрын

    @@CodeBullet check at 6:23 that is more important

  • @XxConsolePlayerXx
    @XxConsolePlayerXx5 жыл бұрын

    I hope that this comment can help you building the AI: in the scripting part you forgot some rules: the rule of castling, which "consists of moving the king two squares towards a rook on the player's first rank, then moving the rook to the square over which the king crossed. Castling may only be done if the king has never moved, the rook involved has never moved, the squares between the king and the rook involved are unoccupied, the king is not in check, and the king does not cross over or end on a square in which it would be in check." (quote from Wikipedia). Other rules are: when the king is in check, he has to move or a piece must defend him, and this means that king can't be captured, infact he doesn't have any "value"; when a piece is "pinned", "a situation brought on by an attacking piece in which a defending piece cannot move" (quote from Wikipedia) without exposing the king and therefore putting him in check. Other two rules are that pawns which reach the last rank can be promoted in any other pieces and the infamous en-passant rule that many chess beginners don't now about (some of them complain that it's a "bug" when they see it the first time ahahahaha). Last but no least, it's missing the rules of checkmate and stalemate (you noticed that when confronting the level 1), that are 2 ways that a game can end. The third way is resigning, which isn't necessary. As you stated in the end of the video, the minimax algorithm also takes in consideration many more variables when exstablishing the value of a position: i. e. if a position leads to a checkmate, a win, it has obviously a very high value. An other example - more complex but helps with the understanding - if you are in a very bad, loosing position and you can force or at least try to reach a stalemate, those moves have a higher value. You're a very good scripter! Keep up with the videos also, they're very interesting and you put a big effort behind them, explaining with simplicity and in an entertaining way a topic like coding! Greetings -An average chess player from Italy

  • @rDnhey

    @rDnhey

    5 жыл бұрын

    Ottimo commento!

  • @ginters5389

    @ginters5389

    5 жыл бұрын

    If he doesn't read this I'll be very disappointed

  • @XxConsolePlayerXx

    @XxConsolePlayerXx

    5 жыл бұрын

    Grazie ;)

  • @PandaXclone2

    @PandaXclone2

    5 жыл бұрын

    Could you please segment your comment into paragraphs? It's difficult to follow this without straining the eyes trying to concentrate where you're reading.

  • @XxConsolePlayerXx

    @XxConsolePlayerXx

    5 жыл бұрын

    Done, thanks for the suggestion

  • @ahmetutkusarac1055
    @ahmetutkusarac10553 жыл бұрын

    Just waiting for you to upload the program and yeah you know... TWO FRICKING YEARS!

  • @ferdinandvanvuren5184
    @ferdinandvanvuren51844 жыл бұрын

    Song: Jincheng Zhang - Mouse (Instrumental Version) (Official Audio)

  • @Hidden82
    @Hidden825 жыл бұрын

    Make an AI to make an AI to play a game

  • @nZifnab

    @nZifnab

    5 жыл бұрын

    That's what a neural network is.

  • @woomyiism

    @woomyiism

    5 жыл бұрын

    but what about... an AI to make an AI to make an AI to play a game????

  • @RedRookChannel

    @RedRookChannel

    5 жыл бұрын

    Maybe he has already done that :mind blown:

  • @97pd48epbh

    @97pd48epbh

    5 жыл бұрын

    @@woomyiism If you look at CGP Grey's video on machine learning you'd see how bloody difficult it is to make one bot "teach" another. Let alone make a "teacher bot" to teach a "teacher bot" to teach. And in his exapmly it was to teach a bot to distinguish between a bee and a 3.

  • @christianalbina6217

    @christianalbina6217

    5 жыл бұрын

    What if he's the AI which makes the game and he has already taught it to talk.

  • @matiasgarciacasas558
    @matiasgarciacasas5585 жыл бұрын

    The fact that there is no check, checkmate, promotion, castling and en passant triggers me

  • @ca-ke9493

    @ca-ke9493

    5 жыл бұрын

    Matías García Casas no checkmate triggers me sooo much like that is the basic win condition of chess (its what makes it chess)

  • @Liggliluff

    @Liggliluff

    4 жыл бұрын

    Worse is when chess software forces you to move the king in check, and won't allow you to block or capture the enemy piece. Some chess software does have that issue.

  • @alwinwinter1645

    @alwinwinter1645

    4 жыл бұрын

    @@ca-ke9493 Yeah, and instead he made the king a piece to be hecking *captured*. My god.

  • @iurigrang

    @iurigrang

    3 жыл бұрын

    Check and checkmate don't need to be implemented. If you make the king worth more points than everything else added up, it'll always go for a checkmate when it sees one, and it will only make legal moves under check.

  • @m136dalie

    @m136dalie

    3 жыл бұрын

    @@iurigrang "it'll always go for checkmate when it sees one" "check and checkmate don't need to be implemented" You see the problem here?

  • @Tom_Tom_Klondike
    @Tom_Tom_Klondike2 жыл бұрын

    Thanks for the great video Code Bullet!

  • @calidadfuriousdestroyer1889
    @calidadfuriousdestroyer18893 жыл бұрын

    I saw the game then remembered this guys work ethic and I knew. I knew this would be a piece of work

  • @LordKirtash
    @LordKirtash5 жыл бұрын

    Great video, as always. Thanks for sharing.

  • @klandalfthewhite9859
    @klandalfthewhite98595 жыл бұрын

    Perhaps in future avoid switching, especially rapidly, between majority dark and majority white screens. Just a quality of video suggestion.

  • @johntelekom9712
    @johntelekom97124 жыл бұрын

    1:11 13 year old me looking at my $300 worth of pokemon cards

  • @thedialingrook3564
    @thedialingrook35643 жыл бұрын

    “Except it’s going to be worse, much worse” I’m intrigued

  • @Jay-mq2ng
    @Jay-mq2ng4 жыл бұрын

    “B wants to find the lowest value” -Makes B go to -1 instead of -2

  • @Liggliluff

    @Liggliluff

    4 жыл бұрын

    Code Bullet is an absolute man

  • @Owen_loves_Butters

    @Owen_loves_Butters

    3 жыл бұрын

    Wdym

  • @orips
    @orips5 жыл бұрын

    HE FORGOT THAT YOU CAN CASTLE

  • @zyxiarigau5528

    @zyxiarigau5528

    5 жыл бұрын

    2nd comment of this a saw, but neither one mentioned that he also forgot en passant.

  • @ineednochannelyoutube5384

    @ineednochannelyoutube5384

    5 жыл бұрын

    +Marco Rigau He forget checks and checkmates...

  • @patstaysuckafreeboss8006

    @patstaysuckafreeboss8006

    5 жыл бұрын

    @@zyxiarigau5528 Can you really blame him? I know people who have played Chess ever since elementary school who either didn't know the move existed or just completely forgot about it

  • @shumymikaball
    @shumymikaball4 жыл бұрын

    Try to add points for each free move a piece have. Optimizing piece movement. You will be amazed how good the results will be. Rooks go to open lines, knights go to the middle, etc.

  • @sneakjokerwalters2841
    @sneakjokerwalters28413 жыл бұрын

    3:50, explaining minmax six- and I blue screened, wasn't even surprised thinking this was part of the video, but nope, my toaster crashed. ...yes, what content that I enjoy watching.

  • @kevnar
    @kevnar5 жыл бұрын

    Challenge for you: Can you create an AI that can parse a human question and return an answer from a given piece of text? For example, give it the Wikipedia article on Beethoven, and ask it "What year did Beethoven die?" Or give it the lyrics to the Itsy Bitsy Spider, and ask it "What washed the spider out?" Then if it can return the correct answer from the source text, you win.

  • @philrod1

    @philrod1

    5 жыл бұрын

    Me? No. IBM? Watson.

  • @kaapporaivio

    @kaapporaivio

    5 жыл бұрын

    Phil Rodgers noooo obm Watson is a shit piece of crap

  • @philrod1

    @philrod1

    5 жыл бұрын

    Harsh words. What's your beef with Watson? Do you know what it is, how it works and what it can do? It's *way* more than the AI that played Jeopardy.

  • @kaapporaivio

    @kaapporaivio

    5 жыл бұрын

    Phil Rodgers I have. When it's not used in tight conjunction with the Bluemix environment, its capabilities are accentually limited to an NLC with only 10-ish languages to choose from and to the really limited Visual Recognition service with no practical usage outside of classifying things. The deep Bluemix (no pun intended) integration wouldn't be so bad if the actual Bluemix wasn't so pain in the ass to use. Also, there's the bad customer support and the expensive price to add on the top of that all. I would be interested to hear what situations the IBM Watson is more useful in than, say, the Google Cloud Platform's AI capabilities of even Tensorflow.

  • @tls5870

    @tls5870

    5 жыл бұрын

    I hope this is a goal for Alexa, Bixby, OK Google, and Siri to be able to do this efficiently and accurately someday with answers to any question that is in Wikipedia articles or the like.

  • @casewhite5048
    @casewhite50485 жыл бұрын

    calculate for stalemate and en passant and castling please your ai will not win otherwise but excellent thus far

  • @albertbatfinder5240
    @albertbatfinder52404 жыл бұрын

    Apart from implementing ALL the rules of the game, you could do some simple work on the evaluation function. Adding up the value of the pieces is one thing. You can then then add increments to each piece for every square it can get to. A knight on the edge and a knight in the middle are not equal in value. A trapped rook is worth less than one on an open file.

  • @davidperry6360
    @davidperry63604 жыл бұрын

    Definitely sounds interesting. You should totally add the other rules and make it better!

  • @BaoCypher0912
    @BaoCypher09125 жыл бұрын

    Even though neutral network takes time to grow, personally I like to watch it grow for hours like a baby maturing.

  • @L4Vo5

    @L4Vo5

    5 жыл бұрын

    So there's something called Leela chess zero, where they tried to replicate the chess AI Google made (AlphaZero, which defeated the top chess engine in a match with 10 wins, something like 60 draws, and 0 losses, after training with itself for 4 hours), but because they didn't have nearly as much processing power as Google they knew they couldn't get it done within a reasonable time, so they decided to make it into a project where anyone can help her train by running a program on their computer. Now, after like 8 months, it also managed to beat the top chess engine! ... In like one game of a 16 games match or something like that. Though, if I'm not mistaken, that level of play means no human can beat it, which is pretty cool. So, it'd seriously take too long for CodeBullet to do it alone, and a simple neural network approach would probably take much longer as well, but if you want you can search online and see all previous versions of Leela, to see it grow from something that plays almost randomly to something that can beat any human.

  • @valentinrafael9201

    @valentinrafael9201

    5 жыл бұрын

    +L4Vo5 Alphazero won 25 games as white and 3 as black against stockfish, not just 10 games ( the rest were draws ). They played 100 games. Stockfish didn't manage to win once in the 100 games series. With the white pieces, alphazero crushed him, showing how much much stronger the white pieces are.

  • @L4Vo5

    @L4Vo5

    5 жыл бұрын

    Yeah right :)

  • @L4Vo5

    @L4Vo5

    5 жыл бұрын

    @@valentinrafael9201 Yeah, I read the paper recently, and it was actually 25 wins.

  • @dihydrogenmonoxide2878
    @dihydrogenmonoxide28785 жыл бұрын

    I would love to see you improve on this, i for one love to play chess casually, and therefor have never worried about capturing as many pieces as possible, instead it's just about taking the king at all costs. i would love to see you make a smart AI that can actually win a game of chess. part of where i think you went wrong was your objective. in those games we saw of AI vs AI you're AI was excelling at earning points by taking pieces, which is what you told it chess was all about. in reality, a game of chess has 1 main objective, kill the opponents king, a concept that seemed to be foreign to your AI. please do revisit this, and maybe try to make it so the AI is made to win the game, rather then capture pieces. i know this would mean providing the AI with some form of strategy or thinking WAY ahead, but i believe in you and your coding skills. it would also be interesting to see the AI have a resign feature, and when the AI hits a point at which they can no longer win (Assuming the player makes the correct moves) and then, after waiting a certain number of moves, perhaps 3-5, and if this situation doesn't get better, it resigns. resignation is a feature i find is missing from most chess apps, and if the goal is to have the most points, wouldn't resignation be helpful at some point to preserve your own pieces, once you have taken a large number of the opponent's pieces. that's enough of my rambling, love the codes you make, keep up the great content bro.

  • @sirrcrowe4081

    @sirrcrowe4081

    5 жыл бұрын

    Actually, it's to capture the king. To immobilize it. To make sure it has no other moves AND it's in check.

  • @dihydrogenmonoxide2878

    @dihydrogenmonoxide2878

    5 жыл бұрын

    Call Me Cro well put, but I find it's easier to teach or explain the rules in that sense, so people understand that although you never actually capture the kind, it has to be set up so if there was 1 more turn, thats what would happen, as someone who has had to teach person after person, I've learned its 10X easier to say "kill the king" and then explain to them that the game is over when checkmate comes up, even though their/my kind is still standing. that being said, you are 100% correct.

  • @SVP-uy9qb

    @SVP-uy9qb

    5 жыл бұрын

    Making the AI focus on getting points is the easy version of a chess AI

  • @KyleKyle__

    @KyleKyle__

    5 жыл бұрын

    Dihydrogen Monoxide If you teach chess that way it’s gonna make it harder for pupils to make the switch And a lot of stratagies are never introduced so Even if it’s easier you will loose more time with capturing pieces

  • @nZifnab

    @nZifnab

    5 жыл бұрын

    Give the king a point value of 100 or 200 and it should automatically seek to destroy the king when possible. It will assume the opponent will try to protect it's kings at all costs, so it will make moves that bring it into a checkmate automatically because it must trap the king

  • @antonnym214
    @antonnym2143 жыл бұрын

    I'm autistic, so I may not approach things the way most people do. My shrink says I'm "Wired differently." Anyway, when I was 10, I taught myself chess and spent about three days doing lots of games, playing both sides. Then my Dad challenged me to a game. I beat him that first game. Then I beat him the next 4 games. Finally, he asked how many moves ahead I'm thinking. I told him I usually tried to think ten moves ahead. His jaw dropped open. He said most adults can do about three. I'm pretty sure we never played again, but seven years later, we got a TRS-80 computer and eventually coded a chess game in it (Using the built-in BASIC with Z-80 machine code subroutines packed into BASIC strings), which was to me, more fun than actually playing chess. Your project brings back fond memories! P.S. When the IBM PC came out, my gf had one and on her machine (Hey, Carol!) I beat Chessmaster 2000 in 57 moves. That was brutal, but I was so proud I never played it again. I didn't want to spoil my record!

  • @jettaeschroff6924

    @jettaeschroff6924

    3 жыл бұрын

    holy crap, you're something like a grandmaster! you should try and fight higher ranked chess players to see what your chess rating is.

  • @captainawesome2731
    @captainawesome27314 жыл бұрын

    Code bullet: "Any time the AI looks ahead-" Me: CHESS AI! EPITAPH!

  • @net_spider
    @net_spider5 жыл бұрын

    Missing, pawn rank up, check, checkmate, castling, and .... "en passant".... sorry if I butchered the last one.

  • @MyReligionIs2DoGood

    @MyReligionIs2DoGood

    5 жыл бұрын

    You didn't - good job! :)

  • @LinksYTLink

    @LinksYTLink

    5 жыл бұрын

    What is en passant?

  • @MyReligionIs2DoGood

    @MyReligionIs2DoGood

    5 жыл бұрын

    @@LinksYTLink "It is a special pawn capture that can only occur immediately after a pawn makes a move of two squares from its starting square, and when it could have been captured by an enemy pawn had it advanced only one square."

  • @LinksYTLink

    @LinksYTLink

    5 жыл бұрын

    @@MyReligionIs2DoGood I learned that in my own time but thank you for telling me to confirm what I saw on Google

  • @MyReligionIs2DoGood

    @MyReligionIs2DoGood

    5 жыл бұрын

    @@LinksYTLink That's what you get for trying to be helpful, I guess... :P Just kidding, good on you, bro. Keep on learning! :)

  • @kiister8126
    @kiister81265 жыл бұрын

    Who needs friends when you can make your own

  • @r3ked272
    @r3ked2723 жыл бұрын

    (3:02) "So you can see the game is now done and fwshhakcbDUCBGHSISO" -Code Bullet

  • @thefantorangster2491
    @thefantorangster24914 жыл бұрын

    1,5 years later and he’s still not uploaded it.

  • @mr.fluffypantz4150
    @mr.fluffypantz41505 жыл бұрын

    “It plays like a toddler” he says as he blunders a rook xD lol I know he wasn’t actually trying, it was just funny

  • @Atlas_Redux
    @Atlas_Redux5 жыл бұрын

    Now do it with actual chess rules ...

  • @PandoraMakesGames

    @PandoraMakesGames

    5 жыл бұрын

    I love to see other people who like AI, I have some AI demo's on my channel, let me know if you'd like to see tutorials.

  • @Atlas_Redux

    @Atlas_Redux

    5 жыл бұрын

    If you had even watched the single AI video I have on my channel, you'd know I don't need one ;) I also worked with 3DVCE, a neural network evolution software

  • @PandoraMakesGames

    @PandoraMakesGames

    5 жыл бұрын

    That's awesome! I didn't mean to offend.

  • @Atlas_Redux

    @Atlas_Redux

    5 жыл бұрын

    Nonono, I didn't think you meant to either, maybe I worded it wrongly or something xD Norwegian here, hehe

  • @PandoraMakesGames

    @PandoraMakesGames

    5 жыл бұрын

    No problem! I was just wondering if someone would be interested in watching AI videos since I participate in AI competitions with very strong participants. I would love to make videos on it, but if nobody watches then it's kind of a waste of time.

  • @AkainuR
    @AkainuR4 жыл бұрын

    Code Bullet: Viewer retention is dropping Me: *Gripping the edge of my seat at the sight of such an intense battle of wits*

  • @fakename7255
    @fakename72552 жыл бұрын

    It seems like adding a few more variables would help a ton. Basic numbers like, # of black pieces in a position to take space X. # of white pieces protecting space X. # of pieces that piece Y is protecting. Give the AI points for defense and you could see much more coherence within the moves. Probably wouldn't add too much to processing time.

  • @endymion767_gtbk9
    @endymion767_gtbk95 жыл бұрын

    Bullet:stupid intro Me:nah it a stupid rad intro my man

  • @ezucra
    @ezucra4 жыл бұрын

    HE PROTECC HE ATTACC BUT MOST IMPORTANTLY HE CAN HACC

  • @jesse9710

    @jesse9710

    4 жыл бұрын

    CANT CHECC***

  • @alwinwinter1645

    @alwinwinter1645

    4 жыл бұрын

    @@jesse9710 Hey, I was gonna make that joke

  • @oakboss533
    @oakboss5334 жыл бұрын

    I remember reading this thing and it was saying something like, “there are more possible ways for a chess match to end then there are atoms in the observable universe.”

  • @badereric

    @badereric

    4 жыл бұрын

    not more ways to end, there are 3 of those, but many many more possible chess games that can be played. probably more than the number of atoms in the universe, multiplied by that same number.

  • @dannysplace7
    @dannysplace78 ай бұрын

    Looks good, can't wait to play it.

  • @lucashernandez8146
    @lucashernandez81465 жыл бұрын

    -He plays like a toddler. "The ai is black"

  • @austinm8005
    @austinm80055 жыл бұрын

    Yay another vid lol, and nice intro

  • @johncharlesgarcia4088
    @johncharlesgarcia40884 жыл бұрын

    legends say some are still waiting for him to upload

  • @weebslime2253
    @weebslime22533 жыл бұрын

    When he says he will upload soon he means 3 years

  • @WilliametcCook
    @WilliametcCook5 жыл бұрын

    6:29 your pawn it it was right there

  • @jeppegantriisnielsen7332
    @jeppegantriisnielsen73325 жыл бұрын

    But Can it beat me... Yes, I’m horrible

  • @123_king_me9

    @123_king_me9

    5 жыл бұрын

    Since he forgot to code in check and checkmate, even a bad player can probably beat it.

  • @Rodehaas
    @Rodehaas4 жыл бұрын

    Add the idea of stalemate, check, and checkmate in the ai, add machine learning + add something that lets the computer know, hey they 4 most center squares are the most important squares. And let it train by playing against itself.

  • @NeerajKumar-yq9yx
    @NeerajKumar-yq9yx Жыл бұрын

    6:54 and we have Scandanavian defence on the board by black. He thought so much.

  • @Ocer.
    @Ocer.5 жыл бұрын

    Dude, I want to be JUST like you. Good at drawing and good at coding. YOU ARE SOOOOOOO COOOOL

  • @sozius0
    @sozius05 жыл бұрын

    I was wondering how he made an AI do checkmate, he didn't

  • @Flitch300
    @Flitch300 Жыл бұрын

    I got stuck on the ending of his description of minimax in this video... But thinking it over, think I understand now after rewatching it one more time....

  • @levinsconyers9340
    @levinsconyers93403 жыл бұрын

    In the description: "I will upload the program soon" 2 years later: Where is the program??????????

  • @SylasTheShadow

    @SylasTheShadow

    3 жыл бұрын

    On his website

  • @zenleek2129
    @zenleek21295 жыл бұрын

    Hey CodeBullet ! How about doing a community challenge where we would each create an AI for a game and compete ! I would probably loose every time, but it could be fun, right ?

  • @L4Vo5

    @L4Vo5

    5 жыл бұрын

    That would at least be interesting.

  • @endervation3213
    @endervation32134 жыл бұрын

    "I'll upload the program soon" 1 year and 2 days later...

  • @sparecreeper1580

    @sparecreeper1580

    4 жыл бұрын

    1.7 years...

  • @ibtgb2
    @ibtgb24 жыл бұрын

    I know a lot people are pointing the whole "check(mate), castling, and en passant" but Knights can also jump players, they're the only ones. Pretty important part of strategy in the game actually. Would love to see you make this one as good as you could get it.

  • @flikkie72
    @flikkie724 жыл бұрын

    You always say your videos are getting too long, but I would love watching more!