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

preview_player
Показать описание

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.

Рекомендации по теме
Комментарии
Автор

This is still by far the best lecture I've seen on the topic so far

YourMakingMeNervous
Автор

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. :)

philj
Автор

It's because of content like this that I'll never get bored of trying to solve complex problems, really insightful and thought provoking 💫

Frost_Byte_Tech
Автор

attending such a lecture for me is a dream, I can't believe that most of them don't play chess !!

mohamedyasser
Автор

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.

allorgansnobody
Автор

the best investigation yielded approx. 10^42 positions and that is what counts.not the rough estimate of 10^120 possible games.

berndmayer
Автор

Great lecture- that hour whizzed by too fast.

A_Swarm_of_Waspcrabs
Автор

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.

sunnysunnybay
Автор

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?

ruffianeo
Автор

about the stockfish evaluation function, is it completely prewritten or are there some (handwritten) parameters that can be optimised through learning? (

christrifinopoulos
Автор

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!

kevingallegos
Автор

Two take aways from this is that humans seem to have a very good understanding of the game of chess and are able to competitively handcraft evaluation functions that play as good as reinforcement learning engines. Second, is that two CNN using Montecarlo could evolve into completely different solutions using the same exact implementation 😮

di
Автор

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?

vladimirtchuiev
Автор

10:45 as someone who is actually making a chess engine: Haha no.

MEWMERE
Автор

Monte Carlo probability has been around decades

peterwinters
Автор

I wanna see stockfish pull a Jerome opening now

desertplayz
Автор

tHANK YOU, but I disagree that rook usage

danruth
Автор

sacrifice the rook [Rc1+] in order to prevent an immediate mate.

GNU_Linux_for_good
Автор

Nice talk, but in 2024, Stockfish is still better than alpha zero. Why?

beattoedtli
Автор

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

avlavas