How do Chess Engines work? Looking at Stockfish and AlphaZero | Oliver Zeigermann

  Рет қаралды 70,955

MLCon | Machine Learning Conference

MLCon | Machine Learning Conference

Күн бұрын

Пікірлер: 68
@YourMakingMeNervous
@YourMakingMeNervous 3 жыл бұрын
This is still by far the best lecture I've seen on the topic so far
@Frost_Byte_Tech
@Frost_Byte_Tech 2 жыл бұрын
It's because of content like this that I'll never get bored of trying to solve complex problems, really insightful and thought provoking 💫
@mohamedyasser2068
@mohamedyasser2068 2 жыл бұрын
attending such a lecture for me is a dream , I can't believe that most of them don't play chess !!
@michaelmassaro4375
@michaelmassaro4375 7 ай бұрын
I play chess I’m subscribed to a you tuber he shows many Stockfish game Jozarovs Chess I figured I’d take a look to see how the engines actually work
@philj9594
@philj9594 Жыл бұрын
Just started learning chess and I know only a little about computer science/programming but this was wonderful to gain a better understanding of what chess engines are actually doing under the hood when I use them and also a better understanding of their limitations. I've noticed many people talk about people over-relying on engines so I figured it would be a good use of my time to gain a deeper understanding of what a chess engine even is if I'm going to be using them regularly. Also, it's just interesting and fun to learn! Thanks for the amazing lecture. :)
@Magnulus76
@Magnulus76 Жыл бұрын
Yes, it's possible to over-rely upon computer chess. Stockfish and Leela are powerful engines but they can have problems in their own understanding (particularly with chess concepts, such as endgame fortresses, something that still baffles engines out there). They also don't always produce data that is particularly relevant to learning chess, in particular Stockfish's "thinking" is very alien and sometimes difficult to learn from.
@michaelmassaro4375
@michaelmassaro4375 7 ай бұрын
So engines can be used for studying lines etc or analyzing a game that was played but it seems many players can use them to cheat on line
@LouigiVerona
@LouigiVerona 4 жыл бұрын
An incredible lecture, thank you!
@christrifinopoulos8639
@christrifinopoulos8639 Жыл бұрын
about the stockfish evaluation function, is it completely prewritten or are there some (handwritten) parameters that can be optimised through learning? (
@A_Swarm_of_Waspcrabs
@A_Swarm_of_Waspcrabs 4 жыл бұрын
Great lecture- that hour whizzed by too fast.
@vladimirtchuiev2218
@vladimirtchuiev2218 3 жыл бұрын
I don't understand why do you need the value function, if you have probabilities over possible moves, you will always during deployment select the argmax of the probability vectors... Is it for victory/defeat flags or something like that? Also, after each iteration of the MCTS, is the network trained until convergence or do you go over the self-played game only once?
@fisheatsyourhead
@fisheatsyourhead 2 жыл бұрын
for timed games is a value function not faster
@vladimirtchuiev2218
@vladimirtchuiev2218 2 жыл бұрын
@@fisheatsyourhead After some month of digging, ye it's faster because you don't have the time usually to go towards the end of the game, and instead you consider the values of the leaf nodes.
@amanbansll
@amanbansll Жыл бұрын
I think there is another reason: the task of learning the policy vector alone doesn't teach the model about whether the current position is good or bad, it only learns whats the best thing to do in the situation. While this is enough to play, augmenting the learning process by adding another objective (multi-task learning style, because the model is shared between both objectives, only the head is different) helps the model learn better. Just my thoughts though, feel free to correct me if I'm wrong.
@sunnysunnybay
@sunnysunnybay 2 жыл бұрын
Without analysing as a chess engine i can see it's actually better for black. Count 9 pieces around the king, both queens are at the 5th rank of the king so they are not included, but black has a rook while no rook is near the white king and the pawn structure has 1 shape out for them too, agains't 3 move on black and good defense around them with both pawn and major pieces. Black has 1 pawn on the 5th rank in font of this weak king also, while it's 1 pawn for H rank & G & E for white.
@kevingallegos9466
@kevingallegos9466 2 жыл бұрын
Please what is the song at the beginning of the video! I've heard it before and now I want to listen to it! Thankyou!
@berndmayer3984
@berndmayer3984 Жыл бұрын
the best investigation yielded approx. 10^42 positions and that is what counts.not the rough estimate of 10^120 possible games.
@allorgansnobody
@allorgansnobody 2 жыл бұрын
Wow just 4 minutes in and this is an excellent explanation. Just knowing whether or not stockfish had these "handcrafted" elements is so important to understanding how it works.
@themanwhoknewtoomuch6667
@themanwhoknewtoomuch6667 2 ай бұрын
Also didn't know Stockfish is classical. We tend to take engines as gospel.
@ruffianeo3418
@ruffianeo3418 2 жыл бұрын
There is one point, usually never mentioned. I will try to explain that (rather valid question) below, hoping, someone else will explain, why this is not a concern: Neural networks (deep or otherwise) act as function estimators. Here, it is the value function F(position) -> Value. As was pointed out early in the talk, this must be an approximation, because it would be cheating the universe if it managed to be exact in the presence of those high numbers of possible positions. (Store more information than number of atoms in the universe). So, an assumption is being made (and that is what is usually not elaborated): Positions, never seen before by the network still yield a value and the means of doing that is some form of interpolation. But for this to work, you assume a smooth value function (how ever high dimensional it is), you assume: V(P+Delta) = Value + Delta` for small enough deltas. So for this to work, the value function for chess has to be smooth-ish. But where did anyone ever prove, that this is the case? Here a simple example of the difference I try to point out: f1: Float -> Float f1 x = x * x If you sample F1 at some points, you can interpolate (with some errors) values between the samples: So, you train the network for, say: x in [1,3,5,7,...]. And when the network is trained and applied to values in [2,4,6], you get some roughly useful value (hopefully). Why? Because the function the network approximates is smooth. Here another function, not smooth: f2: Float -> Float f2 x = random x Training a network at the x in [1,3,5,7] cases does not yield a network which gives good estimators for the even x values. Why? Because that function is not smooth (unless you got lucky with your random numbers). So, which of the above F1, F2 is more akin to a chess value function V(position) -> Value? Who has shown, that chess is F1-ish?
@marcotroster8247
@marcotroster8247 Жыл бұрын
You don't just learn a value function but also a strategy to weigh the trajectories sampled during training, so you can concentrate on good moves and their following moves to distill critical positions out of the game tree. It's quite clever actually. The strategy pi provides a random distribution indicating how likely each move is to be picked by the agent. When sampling a trajectory, you pick moves according to the distribution (stochastically), so the training experiences are just an empirical sample of the real game tree. Then you fit the distribution to explore good trajectories more intense by increasing their probabilities and vice versa. (Have a look at policy gradient / actor-critic techniques if you're interested) So to answer your question about smooth functions. You're usually only guaranteed to converge towards a local minimum of your estimator's error term. It's an empirical process, not an analytical one, so you cannot expect that from AI anyways. After all, you pick moves by sampling from a random distribution to model the intuition of "this move looks good" 😉
@congchuatocmay4837
@congchuatocmay4837 Жыл бұрын
@@marcotroster8247 There are a lot of ways to go in higher dimensional space. If you get blocked one way, there are still 999,999 ways to go for example, or if you get blocked 1000 ways there are still 999000 ways to go. And that is how these artificial neural networks can be trained at all. They completely turn the tables on the 'curse of dimensional.'
@peterwinters8587
@peterwinters8587 5 жыл бұрын
Monte Carlo probability has been around decades
@ME0WMERE
@ME0WMERE 2 жыл бұрын
10:45 as someone who is actually making a chess engine: Haha no.
@zeldasama
@zeldasama 2 жыл бұрын
The disconnect from professors to students. Lmao
@samreenrehman6643
@samreenrehman6643 2 жыл бұрын
They probably just suck at chess
@michaelmassaro4375
@michaelmassaro4375 7 ай бұрын
@@samreenrehman6643they might suck at chess but than again they probably have a greater understanding of the elements the man is speaking on
@danruth1089
@danruth1089 10 ай бұрын
tHANK YOU, but I disagree that rook usage
@michaelmassaro4375
@michaelmassaro4375 7 ай бұрын
That Rook move was the best move it’s the only move to draw the game otherwise there is no stopping the Queen from checkmating you can try battling Rook vs Queen but that’s a losing effort
@desertplayz3955
@desertplayz3955 Жыл бұрын
I wanna see stockfish pull a Jerome opening now
@A_Swarm_of_Waspcrabs
@A_Swarm_of_Waspcrabs Жыл бұрын
There's a KZbinr Joe Kempsey that forced Stockfish 14 to play the Jerome Gambit against MagnusApp
@GNU_Linux_for_good
@GNU_Linux_for_good 4 жыл бұрын
sacrifice the rook [Rc1+] in order to prevent an immediate mate.
@michaelmassaro4375
@michaelmassaro4375 7 ай бұрын
After Queens captures than stalemate Whites king can not move correct
@avlavas
@avlavas 3 жыл бұрын
Intel Core i7 11700K Motherboard Asus Z590 32GB RAM DDR4 1TB SSD GTX 1060 3GB DDR5 Hi this is my computer, and I use SF14, plus I have a 100 gb chess moves, but in a way I didn't get 100% of it. Can you help me? Ty
@beattoedtli1040
@beattoedtli1040 4 ай бұрын
Nice talk, but in 2024, Stockfish is still better than alpha zero. Why?
@urimtefiki226
@urimtefiki226 6 ай бұрын
I play and I do not think, just repeat the same things wasting my time while waiting for the bullshiter since 2016
@Best-go8cd
@Best-go8cd 4 жыл бұрын
u need a degree in computer science to know how AlphaZero work
@alexcwagner
@alexcwagner 4 жыл бұрын
I have a degree in computer science. I still don't understand it.
@skinnyboystudios9722
@skinnyboystudios9722 4 жыл бұрын
you only need to read three books
@AshikVetrivelu
@AshikVetrivelu 4 жыл бұрын
Or just one paper.
@regularname1825
@regularname1825 3 жыл бұрын
You cannoy know how alpha zero works Thats why ai is unpredictable A good way to put is thay It just works
@dustinjames1268
@dustinjames1268 3 жыл бұрын
@@regularname1825 AI is not unpredictable unless it's self-learning. Not all AI improves on its own, and follows simple rules
@plunderersparadise
@plunderersparadise Жыл бұрын
He sounds like he has no idea what he is talking about lol. Just the speech issue I think. Sorry for hate.
@michaelmassaro4375
@michaelmassaro4375 7 ай бұрын
He’s not doing a good job in breaking down the mechanics in my view probably because of my own ineptness but I was hoping for more simpler terms and mechanisms to explain how it is the engines function
@saydtg78ashd
@saydtg78ashd 3 жыл бұрын
They should show the slide fullscreen so we don't have to zoom our eyes. We don't need the footage of the presenter speaking.
@ME0WMERE
@ME0WMERE 2 жыл бұрын
they did? (Or very close to fullscreen anyway)
@your_average_joe5781
@your_average_joe5781 2 жыл бұрын
Footage is a term used for movie film. No film was used here so... No 'footage'👍
@geezlepuss7863
@geezlepuss7863 4 жыл бұрын
This video needs editing; it is over an hour long, for crying outloud.
@user-zb8tq5pr4x
@user-zb8tq5pr4x 4 жыл бұрын
It's a lecture footage, not even meant for a youtube video, wtf are you expecting
@brettselph7591
@brettselph7591 3 жыл бұрын
I started getting dizzy with the spotlight darting around. The idea of the spotlight is to indicate to the audience, WHERE to focus their attention on a chart or visual aid with lots of details. But with the contrast set so high that the chart effectively DISAPPEARS, the effect is to scramble visual focus, opposite of what is intended. All we see is a dancing circle. Also, the video would be much better if MOST of the time, we don't see the stage and the ML CONFERENCE frame, but rather, the main window. It would be MUCH easier to follow. This is just a software choice. Hey, we DON'T need to see the frame, and we don't need to see the speaker. At least, not ALL of the time. GeezlePuss is right. This video needs editing. But not just for time. There too many things VISUALLY wrong with this video, so many things that get in the way of our SEEING the visual aids, that it's just impossible to watch. It's so bad, I decided to find a different video to watch. I'm ten minutes in, and I'm bailing out.
@douggale5962
@douggale5962 3 жыл бұрын
Why do you want it to end? So you can go look through a hundred more stupid videos to find another good one? You should see a little X button at the top left or right. Click that, and you can edit out the rest of the video.
@dustinjames1268
@dustinjames1268 3 жыл бұрын
If you don't have the attention span for an hour long video, then good luck in the real world where things aren't condensed all the time
@ivoplsek
@ivoplsek 3 жыл бұрын
and what problem is there with a 1 hour video? I find it great..not sure why it needs editing?
How AlphaZero Completely CRUSHED Stockfish
33:48
GothamChess
Рет қаралды 4,5 МЛН
30 Weird Chess Algorithms: Elo World
42:36
suckerpinch
Рет қаралды 863 М.
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 20 МЛН
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
Coding Adventure: Chess
29:22
Sebastian Lague
Рет қаралды 3,8 МЛН
Coding Adventure: Making a Better Chess Bot
1:01:01
Sebastian Lague
Рет қаралды 787 М.
AlphaZero: An Introduction
9:56
Aaron Davis
Рет қаралды 44 М.
AlphaGo - The Movie | Full award-winning documentary
1:30:28
Google DeepMind
Рет қаралды 36 МЛН
Deepmind AlphaZero - Mastering Games Without Human Knowledge
42:29
The Artificial Intelligence Channel
Рет қаралды 195 М.
Why Security Is Important in ML and How To Secure Your ML-based Solutions | Rachid Kherrazi
54:44
How do modern chess engines work?
56:26
TNG Technology Consulting GmbH
Рет қаралды 62 М.
Alpha Zero and Monte Carlo Tree Search
23:35
Josh Varty
Рет қаралды 46 М.
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН