AlphaZero - Tactactical Abilities

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

pinkfloydhomer
Posts: 8
Joined: Mon Dec 11, 2017 8:34 pm

AlphaZero - Tactactical Abilities

Post by pinkfloydhomer »

First, let me get this out of the way:

Of course it is impressive and interesting whenever a chess engine beats (a version of) Stockfish 28/72/0, whenever a newer approach shows promise against and older approach, whenever a new engine comes up with novelties or a different style of play than most other engines and so on.

On the other hand, I think it is too early to conclude anything definite for a lot of reasons that have already been discussed: It is impossible at the moment for scientific peers to reproduce the results, it is impossible for peers to experiment with the engines in other ways, far from all games have been published, Stockfish had multiple handicaps such as hardware (I know it is hard to make a direct comparison between the hardware platforms, but AlphaZero relies heavily on specialized hardware at the moment and the combined (hardware/software) approach of AlphaZero is not as interesting as an approach that can readily be used on regular hardware, from smartphones to powerful PCs like competing approaches), older version, tiny hashtable, fixed time control, no opening book, no EGTB and so on.

This is not meant as some sort of conspiracy theory on my part, I don't think there is a conspiracy of any kind, I just think that it is early days for this approach, interesting enough for Google to publish and get marketing on, and rather sloppy from a scientific standpoint because that's not their primary focus at the moment.

Now for my main point of this thread:

Many people (at least in comment threads on YouTube) seem to assume that AlphaZero just takes a look at the position and magically from its neural network gets the best move. They disregard the overwhelming significance of tactics in chess. And simply the shape and nature of the game tree itself.

Even if you have the best positional understanding in the world, you will still have to take tactics into account. Of course the notions of positional and tactical are only approximations. Until we have objectively solved chess, so-called positional understanding is only an approximation of the entire game tree from a given position. And tactics are the specific detailed discrete assessment that comes from applying this positional understanding to the (tiny) part of the game tree that you choose to visit in the allotted time. And for this, depth is still important no matter how you cut it. No matter what tree search algorithm you use. Note that I say depth and not nodes visited or nodes per second. If you somehow is very accurate in disregarding huge parts of the tree (which AlphaZero seems to be with its 80 knps) you can still look very deep into the most important variations. But this is a _tactical_ edge, not a positional edge as such.

In many of the games published, AlphaZero surely seems to have a better positional understanding. But in my opinion it would be impossible for it to win as comfortably as it did without also having a better tactical understanding, simply looking deeper into the important variations. In several of the games, AlphaZero _does_ make tactical moves that Stockfish seem to miss and by tactical I here mean moves that Stockfish would reasonably find by searching a little deeper. In my opinion there is a huge difference in an engine simply outsearching an opponent by looking a little deeper (which is not that impressive) and then in either looking a lot deeper (a real breakthough) or looking about as deep as the opponent but consistently so good positional understanding that the advantage eventually turns into inevitable tactics (also a breakthrough, but can only be useful if at the same time at least as tactically strong as the opponent).

It is unclear to be what was the case in these games.

Maybe AlphaZero just outsearched Stockfish a little bit. Just like Stockfish would against itself on better hardware. An engine outsearching another engine _will_ often look like better positional understanding.

Maybe AlphaZero looked a lot deeper, we don't know, there are no published search trees or variations or evaluations.

What _is_ a real breakthrough is the effectiveness of the selectivity of AlphaZero's approach, the small nps and hence size of the searched subtree. It is very impressive to _tactically_ play on par with or beat any recent version of Stockfish looking at only 80.000 nodes per second. To see deep enough in such a small number of nodes and still not make tactical errors for Stockfish to exploit.

It might not have been the positional understanding gained from deep learning and the neural network that made the difference. It could be tactical superiority from the effectiveness of the chosen tiny subtree to search.
User avatar
hgm
Posts: 27787
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: AlphaZero - Tactactical Abilities

Post by hgm »

It is difficult to make a distinction between very deep tactics and positional play. In the end, material balances are only altered by captures and promotions, which by definition is tactics. Modern engines can get away with very scanty positional kowledge, because the very large depth they search brings the tactical consequences of their strategic choices within their horizon.

A trained NN can be expected to have good strategic knowledge, but that would not help in the face of tactical inaccuracy; strategic evaluation scores log-term features, and when tactics is soon to alter the features, the scoring will be meaningless. It is very difficult to predict tactical outcomes statically. (Algorithms like SOMA and Super-SOMA were never very successful.) So the tactical ability of AlphaZero will mainly come from the MCTS search. But it is not unlikely that it is much easier to statically identify when a position is quiet with high accuracy, or when you should not trust it and search. So the NN will be very valuable in guiding the search, applying it only where it is needed.

Fig 2 of the paper shows how at fast TC the strength of Alpha Zero drops fast, to below that of Stockfish. I interpret this as that the reduction of the search tree eventually makes it impossible for Alpha Zero to reach 'tactical sufficiency', and its superior positional play isn't sufficient compensation for the number of tactical mistakes it makes. At longer TC the number of tactical mistakes goes down to an insigificant level, and the positional superiority surfaces. Because of the better selectivity, the tactical accuracy of AlphaZero increases faster with TC than that of Stockfish.

I don't think you can deduce from that whether AlphaZero will ever outsearch Stockfish. Because is is not know how much the better positional understanding is worth. It would be interesting to run Stockfish' search with AlphaZero's evaluation (however much time that might take), to see how much better the evaluation is. The we could see how much difference it makes to replace the one search by the other, and thus who really searches better at a given TC.
shrapnel
Posts: 1339
Joined: Fri Nov 02, 2012 9:43 am
Location: New Delhi, India

Re: AlphaZero - Tactactical Abilities

Post by shrapnel »

pinkfloydhomer wrote:Maybe AlphaZero just outsearched Stockfish a little bit. Just like Stockfish would against itself on better hardware.
Sorry, but I totally disagree.
It was much more than just a matter of outsearching Stockfish ; it was the whole, overall STYLE of Play that AlphaZero showed that was so impressive and breath-taking.
The Brilliant moves themselves like the famous 19. Re8 played in one of the Games, could be found by other Engines like Komodo and Houdini after suitable Tweaks to the Parameters.
But just finding those moves didn't make the tweaked Komodo or Houdini into a AlphaZero !
What impressed me the most was the almost complete disregard for Material Balance that AlphaZero exhibited.
This, more than any deficiencies in Search and Evaluation, I am convinced , completely unsettled Stockfish which was burdened with conventional ideas of material value.
It was as if AlphaZero, looking at the Board, foresaw ( I can't think of any other word) a Position that was favorable to it, and immediately started making (tactical) moves that would lead to that Position, without caring in the least how much material it threw away in the Process !
It was like putting the Brain of Mikhail Tal/Bobby Fischer into a Robot and calling it AlphaZero.
The Brilliance of the Human was there, but without any human weaknesses.
If you actually play through those Games, you can almost SENSE the discomfort, in a manner of speaking, that Stockfish was experiencing in playing against such an unusual opponent.
All the technical mumbo-jumbo about hardware differences or a lack of an Opening Book, or Time Control not suiting Stockfish or other such rubbish excuses can't hide the FACT that Stockfish was absolutely and comprehensively out-classed by the amazing AlphaZero.
Stockfish simply didn't know what hit it !
The people still having a vested interest in the now obsolete chess engines, fully realize this even if they don't admit it, and are desperately looking for excuses to explain this catastrophe (for them) and are hiding behind fake Analysis, calculations and other Technical mumbo-jumbo.
But Chess is more than just scientific calculations and one doesn't have to be a Programmer, just a reasonably good chess player, to know the Truth.
i7 5960X @ 4.1 Ghz, 64 GB G.Skill RipJaws RAM, Twin Asus ROG Strix OC 11 GB Geforce 2080 Tis
jdart
Posts: 4366
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: AlphaZero - Tactactical Abilities

Post by jdart »

There was a lot of concern that it wasn't an even contest, given the very different hardware.

There are some situations in which human players have found moves that even now are difficult for computers. They can be inspired, and they can use their own deep experience to intuit that something is going to work and give them a long-term advantage. So that is part of chess.

But: one of the beauties of chess is that as you look deeper into the position, sometimes you find that it is not what it appears. The position value can actually only be determined if you look at all the successor positions, or at least all that can't be safely pruned away with alpha-beta or exactly evaluated. Maybe NN really will change computer chess a lot, but it can't change this basic fact about the game.

And as you look deeper, there is always the chance that one of those successor nodes has a deep sacrifice or a surprising move that is the key to the whole position and changes its evaluation.

You see this quite a bit in correspondence games, where the eval looks good for a long time then drops to a draw, or looks drawish and then all of a sudden one side is seen to be ahead. Likely one of the players at least has seen this, but it takes very deep search.

For this reason you can't discount search even as you are adding positional understanding.

--Jon
User avatar
Guenther
Posts: 4605
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: AlphaZero - Tactactical Abilities

Post by Guenther »

Welcome back. I still remember my first tests with Chezzz long ago.

Guenther
https://rwbc-chess.de

trollwatch:
Chessqueen + chessica + AlexChess + Eduard + Sylwy
chessmobile
Posts: 73
Joined: Mon Mar 24, 2014 9:48 am
Location: New Zealand

Re: AlphaZero - Tactactical Abilities

Post by chessmobile »

I have looked at the games , just the wins by A0. My impression is that we don't enough information to make conclusions. The whole 80000 n/s could mean that it classes the moves done by playing out positions in its motecarlo stage as actual nodes so 80000 could mean it self played 1000 games of 80 moves every second and just gives impression that it has amazing tactical abilities. Some games SF lost could have been saved if SF was not handicapped. Also A0 seemed to aim for unclear unbalanced positions and was using probabilities that opponent will trip up on certain positions that require precise only moves to survive so if 2 continuations are = then it went for the complicated little line on purpose. I hope more information from Deepmind will be released to explain more.
syzygy
Posts: 5557
Joined: Tue Feb 28, 2012 11:56 pm

Re: AlphaZero - Tactactical Abilities

Post by syzygy »

chessmobile wrote:I have looked at the games , just the wins by A0. My impression is that we don't enough information to make conclusions. The whole 80000 n/s could mean that it classes the moves done by playing out positions in its motecarlo stage as actual nodes so 80000 could mean it self played 1000 games of 80 moves every second and just gives impression that it has amazing tactical abilities.
What it means is pretty clear from the papers.

AlphaZero does not play out any games at all. (Yes, they call it MCTS, but no, they don't use any Monte Carlo principles.)

When it searches, it builds a tree in memory. This tree has the current board position as root node. It expands this tree by traversing a path from the root node to a leaf node (using the UCB1 rule to select its path). The leaf node is expanded by calling the NN. The NN returns a winning probability and "move probabilities". These move probabilities are assigned to the edges from the leaf node being expanded to the newly added leaf nodes. The winning probability is backed up to the root of the tree (how this is done precisely I have not yet tried to understand, but it seems to be standard stuff).

So 80,000 nodes per second means 80,000 node expansions/NN evaluations per second.
pinkfloydhomer
Posts: 8
Joined: Mon Dec 11, 2017 8:34 pm

Re: AlphaZero - Tactactical Abilities

Post by pinkfloydhomer »

shrapnel wrote: Sorry, but I totally disagree.
It was much more than just a matter of outsearching Stockfish ; it was the whole, overall STYLE of Play that AlphaZero showed that was so impressive and breath-taking.
The Brilliant moves themselves like the famous 19. Re8 played in one of the Games, could be found by other Engines like Komodo and Houdini after suitable Tweaks to the Parameters.
But just finding those moves didn't make the tweaked Komodo or Houdini into a AlphaZero !
What impressed me the most was the almost complete disregard for Material Balance that AlphaZero exhibited.
This, more than any deficiencies in Search and Evaluation, I am convinced , completely unsettled Stockfish which was burdened with conventional ideas of material value.
It was as if AlphaZero, looking at the Board, foresaw ( I can't think of any other word) a Position that was favorable to it, and immediately started making (tactical) moves that would lead to that Position, without caring in the least how much material it threw away in the Process !
It was like putting the Brain of Mikhail Tal/Bobby Fischer into a Robot and calling it AlphaZero.
The Brilliance of the Human was there, but without any human weaknesses.
If you actually play through those Games, you can almost SENSE the discomfort, in a manner of speaking, that Stockfish was experiencing in playing against such an unusual opponent.
All the technical mumbo-jumbo about hardware differences or a lack of an Opening Book, or Time Control not suiting Stockfish or other such rubbish excuses can't hide the FACT that Stockfish was absolutely and comprehensively out-classed by the amazing AlphaZero.
Stockfish simply didn't know what hit it !
The people still having a vested interest in the now obsolete chess engines, fully realize this even if they don't admit it, and are desperately looking for excuses to explain this catastrophe (for them) and are hiding behind fake Analysis, calculations and other Technical mumbo-jumbo.
But Chess is more than just scientific calculations and one doesn't have to be a Programmer, just a reasonably good chess player, to know the Truth.
These are the kinds of posts I am talking about. The above is much too imprecise, almost fangirling :)

The approach of AlphaZero is not magic. It consists of two very concrete things: A tree search algorithm and a function that evaluates positions. It's tactical abilities come mainly from the first, it's "understanding" of a chess position from the second.

It would be very impressive if it could just look at each of the legal moves in the position it is currently playing and then just pick the best one or at least good enough to beat the best opponents. But that is far from the case. It needs to do a tree search to figure out the tactics, even if they are tactics only according to its own valuation of positions.

Even a positionally weaker engine will often win against a positionally better one if the first is just allowed to search a little deeper. And it will look as if it is positionally smarter doing so. When AlphaZero plays its king to e3 against the French defense, it might not automatically be because that's the brilliant thing to do by some novelty general principles, but primarily because it saw no tactics against it. It might even be a bug in the engine that ended up not being a problem because AlphaZero was tactically strong enough to avoid it in the rest of the game. I am not saying that that is definitely the case. I am just saying that it is very hard to tell the difference between an engine just searching a little deeper in the important lines handling all important tactics and then an engine that has the godlike, magical positional understanding that people wants to believe that AlphaZero has. If AlphaZero had played the king to e3 and then much later in the game lost because of some unrelated positional feature or even tactics, the king to e3 move would not have been praised as uncritically as it has.

My point is not to suggest that AlphaZero has bugs or that it is weak or something like that. My point is that we know very little at this stage about how strong it really is and why that is. People hear that it is a new approach, they hear AI, neural networks, deep learning, that it has only trained for four hours (which is debatable) and so on. And they want to believe. So they read all sorts of things into the very few published games played.
pinkfloydhomer
Posts: 8
Joined: Mon Dec 11, 2017 8:34 pm

Re: AlphaZero - Tactactical Abilities

Post by pinkfloydhomer »

Guenther wrote:Welcome back. I still remember my first tests with Chezzz long ago.

Guenther
Thanks :) Unfortunately I haven't done any chess programming for years, life happened. But it was a very fun and interesting experience back then :)
pinkfloydhomer
Posts: 8
Joined: Mon Dec 11, 2017 8:34 pm

Re: AlphaZero - Tactactical Abilities

Post by pinkfloydhomer »

jdart wrote: And as you look deeper, there is always the chance that one of those successor nodes has a deep sacrifice or a surprising move that is the key to the whole position and changes its evaluation.

[]

For this reason you can't discount search even as you are adding positional understanding.

--Jon
Exactly.