Тёмный

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

MLCon | Machine Learning Conference
Подписаться 3,3 тыс.
Просмотров 68 тыс.
50% 1

Speaker: Oliver Zeigermann (embarc) | mlconference.a...
Game playing is a classic discipline of AI and had a major break through in the 90s when Deep Blue defeated Kasparov and arguably became the world’s best chess player. First, we will look which algorithms made that success possible and how they are still used within Stockfish, one of the leading chess engines. Here, we will cover Minimax and AlphaBeta pruning.
However, the emphasis of this talk will be on Monte Carlo Tree Search and its advanced use in AlphaZero that relies on zero human heuristics and without even an opening library. You will learn how it trains using self play on a convolutional ResNet architecture. At the end, we will briefly look at a great game between Stockfish and AlphaZero and why the era of classic chess engines might be over.
😊 Come, join us at the next Machine Learning Conference | mlconference.ai
👉 Follow us on Twitter | / mlconference
👍 Like us on Facebook | / mlconference

Опубликовано:

 

19 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 67   
@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 💫
@LouigiVerona
@LouigiVerona 4 года назад
An incredible lecture, thank you!
@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.
@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 4 месяца назад
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
@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 4 месяца назад
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
@A_Swarm_of_Waspcrabs
@A_Swarm_of_Waspcrabs 4 года назад
Great lecture- that hour whizzed by too fast.
@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.
@ruffianeo3418
@ruffianeo3418 Год назад
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.'
@berndmayer3984
@berndmayer3984 10 месяцев назад
the best investigation yielded approx. 10^42 positions and that is what counts.not the rough estimate of 10^120 possible games.
@christrifinopoulos8639
@christrifinopoulos8639 Год назад
about the stockfish evaluation function, is it completely prewritten or are there some (handwritten) parameters that can be optimised through learning? (
@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!
@vladimirtchuiev2218
@vladimirtchuiev2218 2 года назад
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.
@amanbansal82
@amanbansal82 Год назад
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.
@desertplayz3955
@desertplayz3955 Год назад
I wanna see stockfish pull a Jerome opening now
@A_Swarm_of_Waspcrabs
@A_Swarm_of_Waspcrabs Год назад
There's a RU-vidr Joe Kempsey that forced Stockfish 14 to play the Jerome Gambit against MagnusApp
@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 4 месяца назад
@@samreenrehman6643they might suck at chess but than again they probably have a greater understanding of the elements the man is speaking on
@peterwinters8587
@peterwinters8587 5 лет назад
Monte Carlo probability has been around decades
@danruth1089
@danruth1089 6 месяцев назад
tHANK YOU, but I disagree that rook usage
@michaelmassaro4375
@michaelmassaro4375 4 месяца назад
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
@beattoedtli1040
@beattoedtli1040 25 дней назад
Nice talk, but in 2024, Stockfish is still better than alpha zero. Why?
@GNU_Linux_for_good
@GNU_Linux_for_good 4 года назад
sacrifice the rook [Rc1+] in order to prevent an immediate mate.
@michaelmassaro4375
@michaelmassaro4375 4 месяца назад
After Queens captures than stalemate Whites king can not move correct
@avlavas
@avlavas 2 года назад
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
@urimtefiki226
@urimtefiki226 3 месяца назад
I play and I do not think, just repeat the same things wasting my time while waiting for the bullshiter since 2016
@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 4 месяца назад
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
@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 3 года назад
you only need to read three books
@AshikVetrivelu
@AshikVetrivelu 3 года назад
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
@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 Год назад
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 2 года назад
and what problem is there with a 1 hour video? I find it great..not sure why it needs editing?
Далее
Alpha Zero and Monte Carlo Tree Search
23:35
Просмотров 42 тыс.
How AlphaZero Completely CRUSHED Stockfish
33:48
Просмотров 4,3 млн
Hikaru vs Stockfish
22:30
Просмотров 1 млн
Chess Engines Are Wrong About These Positions
15:05
Просмотров 228 тыс.
AlphaZero: An Introduction
9:56
Просмотров 42 тыс.
Coding Adventure: Chess
29:22
Просмотров 3,8 млн
HIKARU TRICKED THE STRONGEST CHESS ENGINE: HOW???
15:53