I Made A Chess AI But In Only 1 File

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

Simply In Dev

Simply In Dev

Күн бұрын

I competed in the tiny chess competition run by ‪@SebastianLague‬ and here is my process and how everything turned out
Join the discord to play the demo of my upcoming game!
/ discord
Check out any of my games on Itch:
simply-in-dev.itch.io/
Music Used:
Lud and Schlatt's Musical Emporium - Winter - Vivaldi
• Winter - Vivaldi [COPY...
Lud and Schlatt's Musical Emporium - Cello Suite - Bach
• Cello Suite - Bach [CO...
Luigi Boccherini - Minuet
• Video
Mozart - Turkish March
musopen.org/music/
Musopen Orchestra - Overture to The marriage of Figaro, K. 492
musopen.org/music/
Lacrimosa - Mozart
• Mozart Lacrimosa
Violin Concerto in G Minor 'Summer'
musopen.org/music/
#devlog #gamedev #chess #indiegame #artificialintelligence #coding #software
----------- Contents -----------
0:00 Intro
1:20 Board Evaluation
3:05 Minimax
4:58 Alpha-Beta Pruning
6:06 Piece Tables
8:00 Quiescence Search
9:59 Table Compression
10:56 King Endgame
12:01 Iterative Depth
12:53 No Time Left And My Bot Is Still Dumb
14:27 Submission & Results
15:21 Final Showdown

Пікірлер: 61
@CodeHiiro
@CodeHiiro 4 ай бұрын
now do it in one line, if you can do it in one file, you can do it in one line
@techman9514
@techman9514 4 ай бұрын
This video was awesome, your channel is underrated af
@pokemonbg7674
@pokemonbg7674 4 ай бұрын
wait a sec you have 600 subs wtf?! your a underrated channel that would have 2 mil,based on this vid keep up the work and you will he big in no time ❤
@NotVoid0069
@NotVoid0069 3 ай бұрын
Bro this video is a youtube Gem!!!! very underrated
@saadkhatri1129
@saadkhatri1129 4 ай бұрын
WOWOWOWOWOWOWOWOOOWWWWWOOUUUUHHHHAHAHHH HOW entertaining and informative this video was. Thanks a lot mate. KEEP IT UP your channel is bound to blow up!!!
@eboatwright_
@eboatwright_ 4 ай бұрын
Very cool! This was an extremely high quality video, and you did a great job explaining everything I started working on my own engine in Rust right as Sebastian Lague's tournament ended, which is currently rated about 2050 on Lichess :D
@pizzafuel
@pizzafuel 3 ай бұрын
Great work! Very cool project!
@oliverellingson3140
@oliverellingson3140 4 ай бұрын
This was a masterpiece, well done!!!!
@fortnitecool905
@fortnitecool905 3 ай бұрын
Love the video bro u deserve more subs
@BPGHchess
@BPGHchess 4 ай бұрын
Great video! I tried to also create my own chess bot for the tournament by sebastian but realised that I am just not familiar with c++ enough, let alone engine programming (only did in python). The videodecribes the steps you took to improve the engine in a very clear manner and I have definitely learnt a few things about programming a chess engine.
@simplyindev
@simplyindev 4 ай бұрын
Yeah it can be very difficult if it's not a language you're familiar with, but I'm glad you learned something
@WendiArif
@WendiArif 3 ай бұрын
Bro this is gold, so underrated 🔥
@Anybody197
@Anybody197 4 ай бұрын
love video you got a new sub
@azanjac
@azanjac 4 ай бұрын
Sweet revenge
@Lisanicolas366
@Lisanicolas366 4 ай бұрын
Super interesting video!
@astrailaz
@astrailaz 4 ай бұрын
underrated
@zacmrd
@zacmrd 3 ай бұрын
Great video honestly, i cant code either but i always like watching people make chess bots. Let me know if you plan to do this again i can point out some of the more advanced mistakes your bot is making as a stronger chess player
@GuvBubbs
@GuvBubbs 4 ай бұрын
This was great
@NateMint
@NateMint 4 ай бұрын
that was really fun to watch!
@simplyindev
@simplyindev 4 ай бұрын
Thank you! I'm glad you enjoyed it
@bobichiquitoysusamigos4833
@bobichiquitoysusamigos4833 4 ай бұрын
Once i saw the match against emir i was so surprised that a chess bot with a single file played so well in that game he played like a 2300 and had a accuracy of 87.7 if you made it of more files it be the next stockfish you gain a subscriber
@Prometheus4096
@Prometheus4096 4 ай бұрын
Someone made a bot with 200 tokens and it is quite strong.
@koala_speedruns9159
@koala_speedruns9159 3 ай бұрын
nice content
@divineatmidnight
@divineatmidnight 4 ай бұрын
i watched this whole thing thinking you had like 200k subs, great video imma watch every video you post
@simplyindev
@simplyindev 4 ай бұрын
Thank you!
@divineatmidnight
@divineatmidnight 4 ай бұрын
@@simplyindev Of course bro, the smallest creators always have the best content
@makytondr8607
@makytondr8607 4 ай бұрын
Epic video! You’re inspiring me to try to do the same! Also, congrats on making it to 1800 elo with a mini bot, imagine how high you could go without the token restriction!
@simplyindev
@simplyindev 4 ай бұрын
That's awesome, go for it!
@lubengeorgiev5675
@lubengeorgiev5675 4 ай бұрын
When using iterative deepening it is a pretty good idea to include principle variation (best line from previous depth search). That way you will be searching the new depth muchs faster (most of the time). Also some heuristic to order quiet moves might help you a lot (history moves, killer moves). To increase the depth you have two options: make it search faster (more nodes per second) or make it prune branches. If you want to prune more you can add null move pruning for not too many tokens used. A good idea also might be late move reduction (you cut the depth of search of moves after first 4 for example). The downside is if you do not succeed you are forced to reasearch at full depth or full search window.
@simplyindev
@simplyindev 4 ай бұрын
These are all some good ideas for improvements. I didn't mention it in the video but when I submitted I was using 1023 of 1024 tokens so I ran out of space to add anything else in without major optimizations
@lubengeorgiev5675
@lubengeorgiev5675 4 ай бұрын
@@simplyindev Yeah the tokens are pretty limiting. Maybe 2048 tokens would allow for some crazy strong bots. What was the elo of the 1st place bot btw? I think if there is another competition I might be able to get top 10.
@user-dh8oi2mk4f
@user-dh8oi2mk4f 4 ай бұрын
@@lubengeorgiev5675 elo of first place is ~2770 on ccrl
@Prometheus4096
@Prometheus4096 4 ай бұрын
Very cool you documented your bot. I only saw the competition after it ended. I always wanted to try program a chess bot. So with this very nice C# framework and everything but the move search implemented, I also gave it a try. I went 10x over the token limit as the competition is over. But I am gonna try my bot vs yours. I had so many bugs in my bot. When it is searching a million positions and you have 10 000 lines of code, figuring out wtf is going on gets really hard. I am new to C# and I don't know how to code with little tokens so I think I would have failed hard at the competition. Maybe if there's a 2048 token limit competition I will submit something. That said, your no of positions evaluated at 4:51 seems wrong. It goes up exponentially, meaning you search until depth 5 almost instantly, dept 6 takes a while, and depth 7 is basically not achievable. Without move sorting, many positions have 30 legal moves, so it goes n^30. And with good move ordering, you can get to 5 to 15 branches added for each depth.
@simplyindev
@simplyindev 4 ай бұрын
I'd be very interested to see the results of that game! Yeah I knew my phrasing of exponentially was not technically correct in the math sense, but I was just using it by the definition of a more rapid increase. Same thing with my use of depth vs ply is chess coding was wrong, but I think depth was much more understandable to people
@kotsitsvetanov8564
@kotsitsvetanov8564 4 ай бұрын
when watching this i thought you were some big youtuber. how are you not famous yet?
@klatchabobby
@klatchabobby 4 ай бұрын
Making my own chess engine is a dream I have, but I unfortunately have no coding experience beyond one high school class of C# from which I've retained nothing
@simplyindev
@simplyindev 4 ай бұрын
That's alright, you'd be surprised how little coding knowledge you actually need to get a basic one working
@kylebarvel
@kylebarvel 4 ай бұрын
I thought this meant the ai can control a column file in a board
@simplyindev
@simplyindev 4 ай бұрын
I can understand the confusion, I didn't even think about that 😂
@berkaycosgun8901
@berkaycosgun8901 4 ай бұрын
6:00 AT THİS POINT BRO SACRIFISE THE SACRIFISE GAMEEEEEEEEEEEEEEEEEEEEEEEEEE
@siyuanma2323
@siyuanma2323 4 ай бұрын
Very impressed by your video style, how did you make it?
@simplyindev
@simplyindev 4 ай бұрын
I used a tool called motion canvas which allows you to create animations with code
@siyuanma2323
@siyuanma2323 4 ай бұрын
@@simplyindev thank you! I hope you get your play button someday!
@gens8534
@gens8534 4 ай бұрын
best chess video i've ever seen. can we find the code somewhere or is it confidential?
@simplyindev
@simplyindev 4 ай бұрын
Here's the link to where Sebastian Lague has all the submitted bots, but 579 is mine. There's a lot to learn from all the different entries github.com/SebLague/Tiny-Chess-Bot-Challenge-Results/blob/main/Bots/Bot_579.cs
@provn_tq97
@provn_tq97 4 ай бұрын
cool
@n0tjak
@n0tjak 4 ай бұрын
now do it with bash
@hoangnam5848
@hoangnam5848 4 ай бұрын
wait.... how is it even possible to lose to the random bot :D
@simplyindev
@simplyindev 4 ай бұрын
I mean since it is random, given infinite time it would beat stockfish in a game eventually, but the first bit was so bad that sometimes it gets into a weird position where the random bot is basically forced to deliver checkmate lol
@villss894
@villss894 3 ай бұрын
can you make a chess engine with 10< >1files
@startrexpips3650
@startrexpips3650 3 ай бұрын
What is a token ?
@rextaylor1295
@rextaylor1295 3 ай бұрын
what is a token ?
@lqztee
@lqztee 4 ай бұрын
700th subscriber
@tjschess7365
@tjschess7365 15 күн бұрын
Who got number 1?
@VeryRandomStuff361
@VeryRandomStuff361 4 ай бұрын
0:00 0:31 come on they arent that smart
@sahildas.
@sahildas. 4 ай бұрын
Pls help me beat Antonio
@user-jm6li5qi3i
@user-jm6li5qi3i 3 ай бұрын
😈😈I'm younger and I've beat amir
@ereralp5kekadam30
@ereralp5kekadam30 3 ай бұрын
Emir*
@dominiccaesarok5077
@dominiccaesarok5077 4 ай бұрын
nice Praise Jesus! pls repent.
@goatguymanperson9961
@goatguymanperson9961 4 ай бұрын
This was great
The TRUE values of all chess pieces (according to maths)
11:55
AI Learns to Speedrun Mario
8:07
Kush Gupta
Рет қаралды 651 М.
OMG🤪 #tiktok #shorts #potapova_blog
00:50
Potapova_blog
Рет қаралды 11 МЛН
Making a pawn that can actually turn into a queen | Blender 4.0
12:43
6 Devs COMPETE to make the BEST AI
16:02
AIA
Рет қаралды 314 М.
I Made a BETTER Chess Video Game
9:09
HeyImKeelee
Рет қаралды 276 М.
Cheater vs. Cheater!
22:18
GothamChess
Рет қаралды 1,3 МЛН
Evolving Genetic Neural Network Optimizes Poly Bridge Problems
9:59
I Made Chess, but It's Infinite
8:40
Naviary
Рет қаралды 1,3 МЛН
I coded one project EVERY WEEK for a YEAR
13:13
Carter Semrad
Рет қаралды 508 М.
I Made Beginner Bots Play A Chess Tournament
21:16
ChessNuke
Рет қаралды 121 М.
I Ran a Chess Programming Tournament, Here's How it Went!
1:18:42
Sebastian Lague
Рет қаралды 519 М.
Телефон в воде 🤯
0:28
FATA MORGANA
Рет қаралды 849 М.
Секретный смартфон Apple без камеры для работы на АЭС
0:22
ВЫ ЧЕ СДЕЛАЛИ С iOS 18?
22:40
Overtake lab
Рет қаралды 130 М.
Ждёшь обновление IOS 18? #ios #ios18 #айоэс #apple #iphone #айфон
0:57
WWDC 2024 - June 10 | Apple
1:43:37
Apple
Рет қаралды 10 МЛН
Samsung Galaxy 🔥 #shorts  #trending #youtubeshorts  #shortvideo ujjawal4u
0:10
Ujjawal4u. 120k Views . 4 hours ago
Рет қаралды 2,3 МЛН