Can THIS win Sebastian Lague's Chess challenge?

Поделиться
HTML-код
  • Опубликовано: 21 дек 2024

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

  • @legendgames128
    @legendgames128 Год назад +1943

    Lol, the challenge wanted to promote readable small chess bots, but you managed to make it infeasibly readable lmao.

    • @gametechexplained
      @gametechexplained  Год назад +334

      Well, I focused on small ;) There's a more readable version of the code on my GitHub, but it's not the prettiest code ever written either

    • @legendgames128
      @legendgames128 Год назад +96

      @@gametechexplained Lol. Lmao. At least you have a translation for what that pawn of source code means out there somewhere.
      The important thing is that it works, such code is how Terraria runs. It ain't pretty, but it's practical.

    • @user-dh8oi2mk4f
      @user-dh8oi2mk4f Год назад +75

      The challenge doesn’t promote readable code, it promotes readable names. There are plenty of other bs tricks to save tokens

    • @yanikb.1312
      @yanikb.1312 Год назад +19

      When you don't want fast or efficient code, but space-efficient xd
      I hope someone makes code so optimised that it could get mistaken for obfuscated code.

    • @saihajmann6622
      @saihajmann6622 Год назад +9

      You think I made readable code for the challenge? I barely remember what half of it does.

  • @pcoridan
    @pcoridan Год назад +624

    That code needs to be printed onto a shirt! Awesome looking

  • @Luca_5425
    @Luca_5425 Год назад +564

    Really cool video! Well edited, nice commentary, overall a great piece of youtube content!! Commenting for the algorithm!

    • @gametechexplained
      @gametechexplained  Год назад +28

      Much appreciated!

    • @snk-js
      @snk-js Год назад +6

      yes, I hope more extremely experienced people start to make content

  • @Geosquare8128
    @Geosquare8128 Год назад +19

    funny to see how optimizing token count distorts code into the least readable garbage possible (respectfully) lmao, great video

    • @gametechexplained
      @gametechexplained  Год назад +5

      Thank you, I take that as a compliment

    • @heavyfeather2533
      @heavyfeather2533 Год назад +2

      Yooo, it's a pleasant surprise to see you here. I hope you're enjoying life!

    • @DarkPlaysThings
      @DarkPlaysThings 26 дней назад

      You can have readable code and you can have short code. There isn't a big intersection between the two

  • @noroy-afk
    @noroy-afk Год назад +159

    nice video man.
    good commentary / narrating, video length pretty nice and good little flow for the edit.
    keep this up, you will grow in no time
    👍

  • @OneOverPi
    @OneOverPi Год назад +185

    You should upload a video of your bot playing itself, stockfish, or other bots.
    Really cool video, can't wait to see how well your bot scores in the end! :)

    • @gametechexplained
      @gametechexplained  Год назад +24

      Thank you! I'll think about a video like that. I had it play stockfish and Sebastian's bot from his videos, and it lost pretty decisively to both. Can't wait either!

  • @imgajeed
    @imgajeed Год назад +262

    How did you do the animations at 6:20 with the 3D boards? They are really awesome!

    • @gametechexplained
      @gametechexplained  Год назад +142

      Those are made in Blender (Cycles Renderer). Most of the action happens in Blender's node-based procedural tool, Geometry Nodes (changing color, moving up and down, adding the text for both the score and the little a1, a2, etc.) Each of the boards has an invisible "empty" object, and whose Y-coordinate controls how much the board is in the "points" state (moved up/down, with color and text showing). So I only have to animate that single invisible object for the transition.

    • @imgajeed
      @imgajeed Год назад +15

      @@gametechexplained Damn, I think I should start learning Blender's Geometry Nodes XD. (Actually I wanted to do it but haven't found a good time since…)

    • @pumpkin7976
      @pumpkin7976 Год назад +5

      @@gametechexplained u should've done more with them, makes ur videos seem way more polished. I thought it was stock footage after u went back to a screen with a default font and badly drawn arrows.

    • @gametechexplained
      @gametechexplained  Год назад +7

      ​@@pumpkin7976 yes, you're probably right. Making these takes me a lot of time, hopefully I'll be able to include more footage like this as I get better as this whole thing

    • @wazawoo
      @wazawoo Год назад +5

      @@gametechexplaineddon’t listen to this foul pumpkin who is very much not in the Halloween spirit. This whole video was excellent. Animations were next level though.

  • @maxniederman9411
    @maxniederman9411 Год назад +63

    Nice video, will definitely look forward to future ones.

  • @JottHa
    @JottHa Год назад +86

    As Luke from LMG just said on the WAN show, if you make a good video the algorithm will pick it up and show it to people. You made a fantastic video and it showed up for me!

    • @gametechexplained
      @gametechexplained  Год назад +10

      Thank you! I am a bit overwhelmed tbh, I expected much less viewers

  • @Dr-Zed
    @Dr-Zed Год назад +83

    I'm always so impressed by source code formatted to be ASCII art

    • @gametechexplained
      @gametechexplained  Год назад +13

      Thank you. You have probably seen that donut-shaped code, which was a huge inspiration

    • @yajusgakhar6969
      @yajusgakhar6969 Год назад +2

      @@gametechexplainedI was thinking that must be the reference/idea behind it 😂

    • @RoboticusMusic
      @RoboticusMusic Год назад +1

      Which language(s) are best suited (most flexible) for this style of ASCII art as code? @@gametechexplained

    • @EventsKiosk
      @EventsKiosk 7 месяцев назад

      Is it ASCII if it’s just a silhouette?

  • @JonasWindey
    @JonasWindey Год назад +19

    this is insane, how can you only have 17 subs???

    • @gametechexplained
      @gametechexplained  Год назад +6

      Thank you! I just started making videos this summer. This is only my third video ever. Really awesome to see people enjoy it. Honestly happy about every single view at this point

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

      Good news!

  • @liutaurasgaidamavicius1379
    @liutaurasgaidamavicius1379 Год назад +45

    Great video! With this quality you will be able to go full-time in no-time 😈

  • @fdb-js5uh
    @fdb-js5uh Год назад +17

    In modern versions of C# you can remove explicit variable type in stackalloc by wrapping it in (), like var smth = (stackalloc Type[10]); will be of type Span instead of default Type* pointer type.

    • @gametechexplained
      @gametechexplained  Год назад +2

      Nice! I did not know this! Always great to learn new things

  • @donaldklopper
    @donaldklopper Год назад +2

    Brilliant. Can't wait to hear from Sebastian.

    • @gametechexplained
      @gametechexplained  Год назад +1

      Same hear! I think it'll take a bit of time. Just running those matches must take forever, unless he gets a bunch of PCs from somewhere

  • @dot.4069
    @dot.4069 Год назад +2

    Amazing video, looking forwarding to seeing more videos from you!

  • @Greathelloboy
    @Greathelloboy Год назад +11

    i predict that this video will blow up
    its very well made

  • @Meodoc
    @Meodoc Год назад +1

    Great video! Definitely will stay around for more awesome stuff!

  • @Eljay_Kay
    @Eljay_Kay Год назад +1

    Excellent video! Looking forward to seeing your bot in competition

  • @Rkcuddles
    @Rkcuddles 11 месяцев назад

    This was great! Thanks for taking the time to edit and share your experience. Fascinating challenge!

  • @eddielally2045
    @eddielally2045 Год назад +3

    great video, hope it gains you some recognition. The graphics were incredible

  • @Vanawy
    @Vanawy Год назад +2

    Awesome content! Good luck with competition :)

  • @123gostly
    @123gostly Год назад +1

    Loved it! Thanks for sharing in this nice video format.

  • @theforeskinsnatcher373
    @theforeskinsnatcher373 Год назад +1

    definitely keep us updated!

  • @robproductionsgames
    @robproductionsgames Год назад +8

    Nice work! I definitely struggled with this challenge and my bot used some… “unique” heuristics as opposed to your approach lol but I’m curious to see the results! Thanks for the explanations!

  • @Gunbudder
    @Gunbudder Год назад +33

    if all your floats have similar magnitudes, its likely that scaled integers can get you much more accurate values. you can do a little analysis and see how many bits are "wasted" in your floats using some math or even just doing bitwise comparisons on the IEE 754 singles.

    • @gametechexplained
      @gametechexplained  Год назад +3

      Yes, that is a good idea, too. Not sure about the network weights' range, but there are techniques to ensure weights stay reasonably small in absolute value (which I did not use for my network). They are halfs, by the way, not singles, so they only use 2 byte, compared to a 4 byte single. But yes, it is possible that scaled integers would have allowed me to go smaller / or better use the bits I have

  • @ccoodduu
    @ccoodduu Год назад +1

    Interesting to see your thought process, great video!

  • @partlysunny7214
    @partlysunny7214 Год назад +2

    Hugely underrated channel! I love the way you explain your process quickly but simply. Keep it up!

  • @hazzabro3226
    @hazzabro3226 Год назад +1

    Great video man!

  • @cleo__cleo9227
    @cleo__cleo9227 Год назад +2

    very cool video. good luck!

  • @DjVortex-w
    @DjVortex-w Год назад +47

    Limiting the program to a number of source code "tokens" is perilous if you don't also limit the length of such a token. Ostensibly a string literal is one single token, so you could have a 10-megabyte string literal containing whatever you want, and as long as you can somehow use it to execute an algorithm you can do whatever you want.

    • @simonelungarella9000
      @simonelungarella9000 Год назад +6

      If you check the rules you'll see that this possibility has been denied by limiting namespaces and methods that are allowed to use

    • @DjVortex-w
      @DjVortex-w Год назад +1

      @@simonelungarella9000
      Do the rules limit the length of string literals?

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

      @@DjVortex-w I don't think so but you can read the following: "You may not store data inside the name of a variable/function/class etc (to be extracted with nameof(), GetType().ToString(), Environment.StackTrace and so on)".

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

      @@DjVortex-w yes

    • @user-zz6fk8bc8u
      @user-zz6fk8bc8u Год назад +3

      @@DjVortex-w no but in strings every character counts as a token, so no free lunch there.

  • @RRPLD_Ambassador
    @RRPLD_Ambassador Год назад +2

    Where can I read about training a chess neural network?

  • @312ingsscripts7
    @312ingsscripts7 Год назад +1

    im so glad i stumbled upon this channel

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

    Amazing video! Nice work!

  • @TeamDman
    @TeamDman Год назад +1

    Damn nice video, I love the rendered shots

  • @shlaps9161
    @shlaps9161 Год назад +1

    subbed, amazing work!!!

  • @theophilewallet7795
    @theophilewallet7795 Год назад +7

    Very good vidéo 👍, hope your channel grows, you already have one international subscriber (French). 😉

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

      Thank you! Awesome to hear that people from around enjoyed my video! Hoping to see you around!

  • @petrblue
    @petrblue Год назад +2

    Great job!

  • @squdioodellover2589
    @squdioodellover2589 Год назад +1

    Loved the piece weight visualisation :)

  • @antonsimkin
    @antonsimkin 11 месяцев назад +1

    Great videos, subscribed

  • @minuskelvin3619
    @minuskelvin3619 Год назад +16

    I'm curious as to what the neural network architecture for your first attempt was? With your 4-weights-per-token packing strategy, that's an upper bound of 4096 weights, so it'd have to be pretty small. With that kind of constraint, a standard network architecture would have capped out around 5 hidden layer neurons, which wouldn't have been enough to be any good.

    • @gametechexplained
      @gametechexplained  Год назад +7

      I use 40 features as input, and 3 hidden layers of 12 neurons each. In my experiments, I tried various sizes up to 8 hidden layers and 32 neurons each with 54 features as input, and the loss was not much lower than the 3x12 setup. I think the main issue is using features as input rather than the full chess board, because we already loose a lot of information there. However, using one 8 by 8 set of inputs per each of the 12 piece types the way many papers seem to do it would mean max out our tokens with a single layer network already.

    • @minuskelvin3619
      @minuskelvin3619 Год назад +1

      @@gametechexplained What were the 40 features?

    • @user-dh8oi2mk4f
      @user-dh8oi2mk4f Год назад

      Hey, it's the guy who chesses boys

  • @Bigzthegreat
    @Bigzthegreat Год назад +1

    RUclips is suggesting smaller creators that are high quality, and i love it

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

      Thank you! Honestly, I am a bit overwhelmed with how many people watch this! I had ~200 views for my entire channel prior to this

  • @cacaboss227
    @cacaboss227 Год назад +1

    I thoroughly enjoyed your video!

  • @rainestorme4057
    @rainestorme4057 Год назад +1

    Nice video, doing all of the things for the algorithm for you

  • @nebulaeedoto
    @nebulaeedoto Год назад +1

    wow, i'm impressed with video quality

  • @harriehausenman8623
    @harriehausenman8623 Год назад +1

    Awesome stuff! 🤗

  • @octosaurinvasion
    @octosaurinvasion Год назад +1

    Nice work!!

  • @Pantheos
    @Pantheos Год назад +3

    Really cool ideas, your bot is better than mine for sure :D Good luck!

    • @gametechexplained
      @gametechexplained  Год назад +1

      Thank you, and good luck, too. Looking forward to seeing how our bots will do

  • @qoobes
    @qoobes Год назад +1

    Amazing, need more people like you on youtube! Keep it up! 😁

  • @yodazen6319
    @yodazen6319 Год назад +1

    Very entertaining !!

  • @varus4827
    @varus4827 Год назад +1

    incredible video! amazing animations aswell

  • @ch4rlie855
    @ch4rlie855 Год назад +1

    8:47 absolutely killed me bro. you earned a sub, great vid!

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

    Really interesting video! I've been searching for content like this on youtube for a while .

  • @BittermanAndy
    @BittermanAndy Год назад +3

    Excellent! While I never got around to completing (or even doing very much work on) my bot for the competition, I agreed that trying to make a "good bot" is a dead end... nobody's going to make anything that will beat Stockfish, so what's the point? But making something clever / creative / visually interesting / code that's shaped like a chess piece (!) is much more interesting. Well done, and good luck in the competition!

  • @cyb3ristic
    @cyb3ristic Год назад +1

    great video man :)

  • @thenotbaldguy4263
    @thenotbaldguy4263 Год назад +1

    actually underrated channel, the algo needs to know

  • @trueberryless
    @trueberryless Год назад +3

    Dude, I'm so hyped how insane other people went with this challenge? I didn't have that much time and brain sells as you, so I hope my bot is top 0.001% of submissions... xD

  • @kvktus38
    @kvktus38 Год назад +1

    Amazing Video man keep up the good work 🎉

  • @dricimourad3544
    @dricimourad3544 Год назад +1

    Amazing video , keep going

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

    Such a nicely made video, I'm so glad it got recommended to me. Subscribed!

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

    Great video. Subbed and looking forward to your next upload.

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

    Loved this video!

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

    Very engaging Video! I'm curious to see how you bot does in the competition.

  • @Julzaa
    @Julzaa Год назад +1

    You earned a subscriber!

  • @sabitastisch9228
    @sabitastisch9228 Год назад +2

    I absolutely love it! :D

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

    Awesome video!

  • @worldadmin9811
    @worldadmin9811 Год назад +1

    excellent work

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

    you know he is great at coding when his code indentation looks like the project thumbnail itself

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

    This is amazing!

  • @speedg
    @speedg Год назад +1

    cool video, nice throwback to the donut shaped donut code

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

      Yes, that was definitely the main inspiration in terms of formatting

  • @vyldim3401
    @vyldim3401 Год назад +2

    I sooooo wanted to join this man why did I have to be busy and sick

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

    For only 300 subs, the quality and amount of effort put in is amazing. Here before 1k 🎉

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

      Thank you! Tbh it is still hard to believe it went past 1k now. I had 17 subs when posting this

  • @JirkaKlimes_
    @JirkaKlimes_ Год назад +2

    This video was awesome! Thanks. (+sub)

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

    Amazing work :)

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

    Great video definitely earnt my subscription and all those to come

    • @gametechexplained
      @gametechexplained  Год назад +1

      Thank you, and welcome on board

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

      @@gametechexplained I'll definitely be watching in future, remember me before you become famous 🤣

  • @lythd
    @lythd Год назад +1

    wow i absolutely love the aesthetic code in a pawn at the end! very good video! now im a bit nervous about my entry if u r just trying to be in the top half lmao

  • @TheOriginalJohnDoe
    @TheOriginalJohnDoe Год назад +3

    1:27 I am studying AI myself in university and I love the idea of using half-precision with hex into a combined result, that's one of those things you get taught when studying AI by asking the question: "how can we make this faster?", lovely idea!

  • @pegrat
    @pegrat Год назад +1

    this is AWESOME!

  • @moxiwolf
    @moxiwolf Год назад +1

    I'm going to quote my TA after showing her a code I made while on double the recommended daily does of NyQuil:
    "what have you done?"

  • @gotMylky
    @gotMylky Год назад +1

    Excellent work, earned a sub :)

  • @norude
    @norude Год назад +1

    I really think that for you to leave the beeping in would be awesome.

  • @vigigamehacker123
    @vigigamehacker123 Год назад +1

    Would love to see a video focused solely on building that first neural network

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

      I thought about how much detail to add about that bot. But tbh making videos takes a lot of time for me, so I could not really go into detail about both. I might make a video about a different neural network project in the future

  • @wChris_
    @wChris_ Год назад +1

    this just goes to show, that writing small code is not the same as writing good code. (as in readable, understandable and clean)

  • @mr_waffles_the_dog
    @mr_waffles_the_dog Год назад +1

    My thought is whether you can save more tokens by have the initializers expand out the compressed boards. The initializers would become a bit bigger, but you'd save tokens on access

    • @gametechexplained
      @gametechexplained  Год назад +1

      I am not sure I fully understand... What do you mean by expanding out the compressed boards?

  • @U_Geek
    @U_Geek Год назад +3

    Meanwhile I submitted Bob,a simple minded bot who only follows checks, captures and attacks and can run away if in danger. But you know what I had fun building Bob.

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

      That is the most important part! Looking forward to seeing how your bot does

    • @user-dh8oi2mk4f
      @user-dh8oi2mk4f Год назад

      I can definitely see this creating a completely hilarious game where Bob takes a bunch of pieces then starts running it's king to the other side of the board

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

    I liked this video, well made and good documentary. Hope you win!

  • @febejo404
    @febejo404 Год назад +6

    Great video!
    Did you format you code into an image by hand or is that an extension?

    • @gametechexplained
      @gametechexplained  Год назад +9

      I did it by hand. I used a small black and white picture as guidance. However, the footage in the video is actually not me hand-formatting, but it's a small script I wrote that does the changes more optimally and quickly, to generate a smoother video. The script got the hand-created final result as input and calculated the changes needed

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

      @@gametechexplained that's even more impressive ❤

  • @rutabega306
    @rutabega306 Год назад +1

    Is a string one token? What's stopping someone from serializing a neural net into one string?

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

      A string counts as one token per character. Probably should have mentioned this

  • @SuperGamersgames
    @SuperGamersgames Год назад +1

    Heh, that last touch was amazing. :P

  • @pseudo_goose
    @pseudo_goose Год назад +1

    I dont know much about C#, but if it has "bytestring" literals, you could use those to compess any table into just one token (or even combine all tables into one long string). Trade-off is that element access is more complex, not 100% sure that it's worth it

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

      I should've probably mentioned this, but string literals cost one token per character

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

      @@gametechexplained Dang, Sebastian thought of everything.

    • @user-dh8oi2mk4f
      @user-dh8oi2mk4f Год назад

      @@pseudo_goose Not really, there were a lot of people who submitted issues to github outlining these flaws in the initial challenge.

  • @sumongus
    @sumongus Год назад +2

    I was totally not expecting that reformat at 9:17, but it looks awesome nonetheless! (readability has left the chat)

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

    nice video, well edited too and about a interesting topic!
    subscribed!🎉

  • @ConBomb
    @ConBomb Год назад +1

    Wow this was a great video. I also made a bot for the challenge but it was nowhere as good as yours.

  • @valshaped
    @valshaped 2 месяца назад

    I wonder, do C# strings allow byte indexing? You could pack entire tables as a single string literal if they do.

  • @maxfarouk3407
    @maxfarouk3407 Год назад +2

    Very cool man. When i saw sebastions video i got quite peaked. I havent followed that series though as i mostly followed his unity stuff and i feel more comfortable in python. Youre video is great and its really cool what more experienced programers are capable of. Its onspiring to know that im not so far from stuff lole this.

    • @gametechexplained
      @gametechexplained  Год назад +2

      Great to hear! I did not know anything about Chess AI before watching his videos either. One thing I really love about his channel is that he can make you feel like you truly understand the all the basics of an entirely new thing in about 45 minutes

    • @maxfarouk3407
      @maxfarouk3407 11 месяцев назад

      Agreed@@gametechexplained

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

    Looks like something that needs to be submitted to The International Obfuscated C Code Contest.

  • @Aidiakapi
    @Aidiakapi Год назад +3

    If tokens are counted, why not just have one really big string literal containing all the data? It's one token, no matter how large it gets (unless it's an interpolated string).

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

      I wondered about this too, seems like one could serialize a massive NN this way

    • @gametechexplained
      @gametechexplained  Год назад +3

      It's a good idea, but a string literal actually counts as one token per character in this competition. I probably should have mentioned that

  • @underscore.
    @underscore. Год назад +1

    what ai library did u use to train the neural network

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

    This guys is a Computer Science genius!

  • @duckyyaboi3129
    @duckyyaboi3129 Год назад +2

    Just wanted to say the quality on this video was outstanding for how low views it has!

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

    Amazing animations 😮