I created the WORST chess AI (worse than worstfish)

  Рет қаралды 10,562

Wazly

Wazly

7 күн бұрын

Ready for another description generated by chat? (It's so weirdly energized, yet lifeless. At least it's pretty accurate)
Welcome to my latest project, where I set out on an unusual mission: to create the worst chess AI imaginable. In this video, I'll walk you through my journey of trying to design an AI that's exceptionally bad at chess, using neural evolution of augmenting topologies (NEAT) and bitboards.
🧩 The Puzzle: We start with a simple chess puzzle where your goal is to lose as White. Choices like rook a3, rook g3, or king b1 lead to mate in one. But there's a twist - the worst move isn't always obvious!
🤖 Worstfish Flaw: Discover the flaw I found in Worstfish, the chess bot that always plays the "worst move." This discovery inspired me to create my own AI.
🛠️ Building the AI: Before making an AI that's great at losing, I needed one that excels at winning. Using NEAT, I attempted to evolve an AI over generations. However, it wasn't as straightforward as I hoped.
🚀 Optimization Challenges: Learn about the various optimizations I implemented, including bitboards for efficient move calculations, move caching, multi-processing, and selective game play. Despite these improvements, training time was a significant hurdle.
🤯 Unexpected Outcomes: After optimizing, the AI still struggled, mainly pushing pawns. I tried numerous adjustments, including changing bitboards to an array of values and refining the fitness function, but results were underwhelming.
🧠 Mini-Max Algorithm: To give the AI better decision-making abilities, I incorporated a mini-max algorithm. However, the complexity of chess proved too much for my NEAT-based approach.
💡 Lessons Learned: Ultimately, NEAT wasn't suitable for this complex task. Although my AI couldn't master chess, it excelled at our original goal - losing games. It even managed to consistently draw against Worstfish.
🎬 Join the Journey: Watch as I navigate through the challenges of AI development, share the ups and downs, and finally, pivot towards more promising techniques for future projects.
Don't forget to subscribe and hit the notification bell to stay updated on my latest videos and projects. Your support keeps me going! See you in the next one.
Music:
Summoning Salt - Chris Doerksen
Zeta - Vincent Rubinetti
We Shop Song - Lud & Schlatt's Music Emporium
Cat - C418
github.com/Waz-ly/chess_ai_mk...

Пікірлер: 69
@waz1y
@waz1y 2 күн бұрын
SUBSCRIBE
@HarrisonWhite-wi4ns
@HarrisonWhite-wi4ns 2 күн бұрын
I don’t think forcing the opponent to take your material is actually the best strategy to lose the game. I saw a video where a guy “beat” worstfish by gaining a huge material advantage which allowed him to force worstfish to checkmate him. Having more material lets you play more forcing moves, and your only hope of losing to an intelligence that is trying to lose is to force it to checkmate you, so counter-intuitively, you should strive to keep your material. I think that a chess ai that is designed to lose would actually look a lot like a normal ai, just with the values for checkmate switched (so that it values itself being checkmated and gives a negative value to checkmating the opponent). It would even still need to worry about king safety, since your opponent can win material by threatening the king.
@waz1y
@waz1y 2 күн бұрын
Yeah, that’s possible, but I think if my AI had worked, it would have implemented that strategy
@calvinzhang4323
@calvinzhang4323 4 күн бұрын
I can create this ai by just playing chess
@waz1y
@waz1y 3 күн бұрын
A few years ago, I got would get scholars mated every time I played you 😭
@detectiveslime2891
@detectiveslime2891 2 күн бұрын
well then it would just be i, but I don't think it would be deserving of that
@GigaCraft-420
@GigaCraft-420 Күн бұрын
You're underestimating my ability to make the worst possible move
@SnowflakeDC
@SnowflakeDC 4 күн бұрын
How does this video have so little views?! This was an amazing and interesting video!
@waz1y
@waz1y 4 күн бұрын
thanks so much :). I think my title before was really bad, so... It's better now that I changed the title
@etl3nne
@etl3nne 3 күн бұрын
REAL.
@SnowflakeDC
@SnowflakeDC Күн бұрын
@@waz1y I see :)
@SnowflakeDC
@SnowflakeDC Күн бұрын
@@waz1y I hope it does better :D
@Silver-AG47
@Silver-AG47 3 күн бұрын
Spoilers for video below. Failing to make something that always fails, just means your actually just too good. It's like a double negative.
@waz1y
@waz1y 3 күн бұрын
Checks out.
@RandomBloonStuff
@RandomBloonStuff 2 күн бұрын
I hate when a top comment spoilers the video... On mobile it shows you the top comment even if you don't go into the comment section.
@waz1y
@waz1y 2 күн бұрын
RIP
@Silver-AG47
@Silver-AG47 2 күн бұрын
@@RandomBloonStuff my fault man I'll fix it
@RandomBloonStuff
@RandomBloonStuff 2 күн бұрын
@@Silver-AG47 You didn't need to but good thing that other mobile/new PC layout users won't get spoiled.
@wintrcat
@wintrcat Күн бұрын
This is a fantastic video mate :) well done - I really like your editing style haha
@pyplioud
@pyplioud 2 күн бұрын
Such an underrated channel dude, great work!
@waz1y
@waz1y 2 күн бұрын
Thanks!
@etl3nne
@etl3nne 3 күн бұрын
only 1k views HOW, i only realised this until the vid was finished but it deserves alot more
@chess_board_consumer
@chess_board_consumer Күн бұрын
That was a really nice video well done
@maxwellhunt3732
@maxwellhunt3732 2 күн бұрын
I've tried similar types of projects in the past, in general I don't think that NEAT is very well suited for this type of problem. I think the best thing to try here if you don't want a deterministic algorithm like minimax is to try to emulate something like alpha zero. The idea is to train networks both for finding the probability that an individual move will be good, which can be used to do monte-carlo tree search and then having a separate network for evaluating the position at the end of the tree search.
@maxwellhunt3732
@maxwellhunt3732 2 күн бұрын
Also, how many generations did you go for? What was the population size? Learning such complex behavior can often take a lot of time and computational ressources.
@waz1y
@waz1y 2 күн бұрын
Yeah, as I said in the video, NEAT just doesn’t cut it for something complicated like chess. I ran it for 300 generations (full day on my pc) and it didn’t improve. Yeah, I was inspired by alpha zero, but alpha zero uses reinforcement learning and not genetic algorithms.
@Art3141
@Art3141 2 күн бұрын
Great vid, I hope you can do the AI in the future!
@waz1y
@waz1y 2 күн бұрын
Yeah I would like to come back and explore it at some point
@SpaceUK45
@SpaceUK45 2 күн бұрын
<a href="#" class="seekto" data-time="261">4:21</a> thought that was carykh
@waz1y
@waz1y 2 күн бұрын
Oh hell nah, I look nothing like him
@hk2dchannel658
@hk2dchannel658 Күн бұрын
Isn't the worst chess engine the one with the (Losses/games)*100 ratio? If that's the case, isn't the ai that moves only the first move and then waits until the timer runs out the worst?
@waz1y
@waz1y Күн бұрын
okay, technically true, but if we don't make the assumption that they have to move in a certain amount of time and they are not allowed to resign, it's kind of pointless
@Sodiumax
@Sodiumax 2 күн бұрын
Try using deep reinforcement learning or reinforcement learning. I would love to see this chess Ai become good!
@waz1y
@waz1y 2 күн бұрын
Yeah i would like to at some point
@ThemeMusicz
@ThemeMusicz 3 күн бұрын
835 views? Underrated! Pls remember me when u are famous
@heymajoris
@heymajoris 2 күн бұрын
Yeah the NEAT algorithm is cool and all but it doesn't really work well for most complex situations, it also takes too long to learn. There's a variation of the NEAT algorithm called HyperNEAT, maybe that's better?
@waz1y
@waz1y 2 күн бұрын
Cool, I’ll look into it
@simonwillover4175
@simonwillover4175 3 күн бұрын
I would love to see you improve this and make it play even worse. Maybe making an AI that somehow knows both worst moves and best moves would be better.
@waz1y
@waz1y 2 күн бұрын
I that would be interesting, though i think the only way to do that would be to have 2 separate AI
@Beardash123
@Beardash123 Күн бұрын
You forgot…..I DONT EVEN KNOW HOW TO PLAY CHESS CORRECTLY!1!1!!1!1!1!!1
@adammetcalf4231
@adammetcalf4231 2 күн бұрын
another Sebastian League in the making!
@antoniomonteiro3698
@antoniomonteiro3698 Күн бұрын
the foreground music is too laud, the background voice is to low. :)
@Superhirn
@Superhirn Күн бұрын
Bro you are so underrated! I thought you had at least 100 k subs lol
@Superhirn
@Superhirn Күн бұрын
Great vid also
@PolishProgrammer
@PolishProgrammer 2 күн бұрын
Maybe changing how the ai outputs it's moves would help
@waz1y
@waz1y 2 күн бұрын
Like directly outputting moves instead of an evaluation?
@PolishProgrammer
@PolishProgrammer Күн бұрын
​@@waz1y I didn't quite catch in the video how the first version chose it's moves, but input and output methods should have great impact on performance. But maybe evaluation with RL would do the trick, since evaluation is a simple single output
@PolishProgrammer
@PolishProgrammer Күн бұрын
Also don't think it's implementable in the current genetic method, but using a CNN (like in visual classification) would probably benefit it. Same with normalizing the input range to something like -1 to 1 (values show in visualisation ranging from +inf to 0 aren't too good)
@waz1y
@waz1y Күн бұрын
@@PolishProgrammer that’s exactly how it’s implemented but with neat instead of rl
@PolishProgrammer
@PolishProgrammer Күн бұрын
​@@waz1y so I guess the training method was the biggest bottleneck Edit: great video either way
@SmudgleGaming
@SmudgleGaming Күн бұрын
nice, now use reinforcement learning
@geraliks
@geraliks 4 күн бұрын
good video!
@waz1y
@waz1y 3 күн бұрын
Thanks :)
@KingBob_Stinky
@KingBob_Stinky 2 күн бұрын
The only KZbinr that replies on almost every comment. Total goat! Don’t zoom in on my pfp 💀
@waz1y
@waz1y 2 күн бұрын
I only don’t reply to the negative ones >:)
@Moshinoki
@Moshinoki 2 күн бұрын
The bgm is louder than your voice.......
@nikos.r
@nikos.r 2 күн бұрын
Minecraft music is fire
@ericmollison2760
@ericmollison2760 Күн бұрын
Respect for trying. I imagine it would be super hard to train since stalemate would be very likely when it does begin to figure things out. Maybe you could cheat by changing the game. For example, minichess: en.wikipedia.org/wiki/Minichess Or make something else up. It would at least work for a proof of concept.
@music-zv6je
@music-zv6je 2 күн бұрын
aren't you just recreating antichess by this point lmao (except for forced captures)
@waz1y
@waz1y 2 күн бұрын
Yeah, main difference is that captures are not forced and you still have to get checkmated to win
@music-zv6je
@music-zv6je Күн бұрын
@@waz1y video idea (won't do it myself cause i'm not that smart): The Four Horsemen of Chess Engine Strategies 1. Stockfish The engine that tries to win, assumes the opponent is also trying to win (normal chess) 2. Worstfish The engine that tries to lose, assumes the opponent is trying to win 3. Your AI The engine that tries to lose, assumes the opponent is also trying to lose ("soft" antichess) 4. ??? The engine that **tries to win, assumes the opponent is trying to lose** The last one would be really interesting, it would basically think you're gonna blunder all the time, and would keep trying to set up positions where you can sac everything, or worsen your position. It would be like the best friend for Worstfish trying to lose. No idea how "well" it'd actually play in normal terms tho also they could all be pitted to play against each other, that'd be very neat to see
@waz1y
@waz1y Күн бұрын
haha that'd be funny to see
@louisliu6396
@louisliu6396 2 күн бұрын
I bet I can lose to your ai
@waz1y
@waz1y 2 күн бұрын
Calvin said the same thing lmao
@knowledgeablekaleb
@knowledgeablekaleb 2 күн бұрын
This vid has 69 likes 💀💀
@waz1y
@waz1y 2 күн бұрын
💀
@dvorakgigachad1444
@dvorakgigachad1444 2 күн бұрын
clickbait >:( you should modify stockfish instead of using AI
The rarest move in chess
17:01
Paralogical
Рет қаралды 1,3 МЛН
What School Didn't Tell You About Mazes #SoMEpi
12:49
mattbatwings
Рет қаралды 130 М.
孩子多的烦恼?#火影忍者 #家庭 #佐助
00:31
火影忍者一家
Рет қаралды 37 МЛН
WHO DO I LOVE MOST?
00:22
dednahype
Рет қаралды 79 МЛН
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 8 МЛН
Codes and Secrets in a Forgotten Minecraft Version
33:24
RetroGamingNow
Рет қаралды 423 М.
An Insane Problem by Mark Liburkin (Chess Composer)
12:25
Chess Vibes
Рет қаралды 292 М.
How I designed Fruit Ninja
22:58
Luke Muscat
Рет қаралды 6 МЛН
Minecraft images that will definitely not make you cry.
8:47
Phoenix SC
Рет қаралды 658 М.
The Linux Experience
31:00
Bog
Рет қаралды 403 М.
100% Accuracy. 4 Brilliant Moves.
21:03
GothamChess
Рет қаралды 1,2 МЛН
I Made a Weird Chess AI from Scratch
6:38
nextProgram
Рет қаралды 287 М.
I got the world record for Tasty Planet Forever
2:05:34
EazySpeezy
Рет қаралды 73 М.
This Ancient Technique Tells Your Chess Talent Level
11:37
Remote Chess Academy
Рет қаралды 99 М.
孩子多的烦恼?#火影忍者 #家庭 #佐助
00:31
火影忍者一家
Рет қаралды 37 МЛН