user-1: Stockfish analyses many positions per second and chooses the best line. Lc0 is a neural network that immediately ignores moves which don't work, but is slower. However, somehow Stockfish is better. How come that is true, when most of the positions it looks through are actually useless?

user24693: I'll expand on a few things that Allure already mentioned:
From the question: "Stockfish analyses many positions per second and chooses the best line. Lc0 is a neural network that immediately ignores moves which don't work, but is slower."
This is not really true. Leela and Stockfish are more similar than some people seem to assume: Both will eventually look at all moves. However both spend varying amounts of time on different moves, i.e., they will spend more time on moves they think are good. The difference between the two is: Stockfish uses "humanly chosen" heuristics (of course those are also tuned, but they are still based on human ideas) to determine which move to search how much, while Leela uses a neural network to determine which move to search how much. Both engines then search that move and based on the results (that is, the evaluation) decide how much to search that move moving forward. (obviously, the better a move the more it will be searched)
The other difference is the search backup, Stockfish uses a minimax based backup, meaning it's evaluation of a line is exactly the evaluation of the final position of that assumed best variation. Meanwhile Leela uses an averaging based backup, meaning also evaluations from positions that are not part of the best line can influence the evaluation. This latter algorithm is not really possible with Stockfish since it requires storing the entire search tree, which given Stockfish's speed isn't possible. However due to the lower nodes per second of Leela because of the NN, it is possible there. Which of the two is preferable is debatable, Leela's search algorithm does have some issues.
Of course new versions of Stockfish now also use a NN, albeit one with a very different structure. That doesn't really change the answer at all though.

user15223: Because Stockfish searches a LOT more positions.
Just check the latest TCEC superfinal between the two. In a typical position Leela might search 40k positions per second. Comparatively, Stockfish searches ~200 million positions per second. That's about 5000 times more positions per second. It means that Stockfish can afford to be wrong 4999 times as long as it searches the moves that are right. (This is of course simplified since it assumes there is a "right" move.)
Also worth pointing out is that it is by no means obvious that selectively searching the "best" moves is a better approach than simply searching tons and tons of them. Remember several decades ago when computer chess was new, there were two ways to approach search. The first was to get computers to "think" like humans and consider only the best candidate moves. The other, and the one that eventually came to dominate, is to search as many moves as possible. You can see similar tensions in the real world: humans only have a few babies, but some species (such as ferns) have lots of children, most of which die, but those that survive propagate the species successfully.
Finally, one should note that Leela's neural network is not always right. See this Leela blunder vs. GM Andrew Tang, along with an explanation of why Leela blundered.

But how come Leela blundered such a simple tactic? Looking at the chess clocks, we can see that Leela spent less than 0.1 seconds thinking before making the move. Under such time constraints, Leela is not really able to consider and evaluate many different moves, but instead relies heavily on her "instincts". Looking under the hood after the match, we could see that Leela thinks Qxd4 is the correct move 90% of the time in the critical position. Furthermore, Leela thinks Bh7+ is the correct reply only 10% of the time. If she had more time to double check her assumptions, she would not have blundered, but she didn't - so she did. In our estimation, Leela would have avoided the blunder if she had spent 0.25 seconds thinking before making a a move.

As this paragraph shows, Leela's instincts are not always right. Leela compensates for this by searching the other moves anyway, it just searches them less. If Leela really did ignore "moves that don't work", it would be decisively lose repeatedly.

-1: <p>Stockfish analyses many positions per second and chooses the best line. Lc0 is a neural network that immediately ignores moves which don't work, but is slower. However, somehow Stockfish is better. How come that is true, when most of the positions it looks through are actually useless?</p>
 24693: <p>I'll expand on a few things that Allure already mentioned:
From the question: &quot;Stockfish analyses many positions per second and chooses the best line. Lc0 is a neural network that immediately ignores moves which don't work, but is slower.&quot;</p>
<p>This is not really true. Leela and Stockfish are more similar than some people seem to assume: Both will eventually look at all moves. However both spend varying amounts of time on different moves, i.e., they will spend more time on moves they think are good. The difference between the two is: Stockfish uses &quot;humanly chosen&quot; heuristics (of course those are also tuned, but they are still based on human ideas) to determine which move to search how much, while Leela uses a neural network to determine which move to search how much. Both engines then search that move and based on the results (that is, the evaluation) decide how much to search that move moving forward. (obviously, the better a move the more it will be searched)</p>
<p>The other difference is the search backup, Stockfish uses a minimax based backup, meaning it's evaluation of a line is exactly the evaluation of the final position of that assumed best variation. Meanwhile Leela uses an averaging based backup, meaning also evaluations from positions that are not part of the best line can influence the evaluation. This latter algorithm is not really possible with Stockfish since it requires storing the entire search tree, which given Stockfish's speed isn't possible. However due to the lower nodes per second of Leela because of the NN, it is possible there. Which of the two is preferable is debatable, Leela's search algorithm does have some issues.</p>
<p>Of course new versions of Stockfish now also use a NN, albeit one with a very different structure. That doesn't really change the answer at all though.</p>
 15223: <p><strong>Because Stockfish searches a LOT more positions.</strong></p>
<p>Just check the latest TCEC superfinal between the two. In a typical position Leela might search 40k positions per second. Comparatively, Stockfish searches ~200 million positions per second. That's about 5000 times more positions per second. It means that Stockfish can afford to be wrong 4999 times as long as it searches the moves that are right. (This is of course simplified since it assumes there is a &quot;right&quot; move.)</p>
<p>Also worth pointing out is that it is by no means obvious that selectively searching the &quot;best&quot; moves is a better approach than simply searching tons and tons of them. Remember several decades ago when computer chess was new, there were two ways to approach search. The first was to get computers to &quot;think&quot; like humans and consider only the best candidate moves. The other, and the one that eventually came to dominate, is to search as many moves as possible. You can see similar tensions in the real world: humans only have a few babies, but some species (such as ferns) have lots of children, most of which die, but those that survive propagate the species successfully.</p>
<p>Finally, one should note that Leela's neural network is not always right. See this <a href="https://chess.stackexchange.com/questions/33116/famous-grandmaster-games-of-torturous-winning-or-flaunting-out-of-arrogance/33132#33132">Leela blunder vs. GM Andrew Tang</a>, along with an <a href="https://lichess.org/blog/WtzZAyoAALvE8ZSQ/gm-andrew-tang-defends-humanity-against-leela-chess-zero" rel="noreferrer">explanation</a> of why Leela blundered.</p>
<blockquote>
<p>But how come Leela blundered such a simple tactic? Looking at the chess clocks, we can see that Leela spent less than 0.1 seconds thinking before making the move. Under such time constraints, Leela is not really able to consider and evaluate many different moves, but instead relies heavily on her &quot;instincts&quot;. Looking under the hood after the match, we could see that Leela thinks Qxd4 is the correct move 90% of the time in the critical position. Furthermore, Leela thinks Bh7+ is the correct reply only 10% of the time. If she had more time to double check her assumptions, she would not have blundered, but she didn't - so she did. In our estimation, Leela would have avoided the blunder if she had spent 0.25 seconds thinking before making a a move.</p>
</blockquote>
<p>As this paragraph shows, Leela's instincts are not always right. Leela compensates for this by searching the other moves anyway, it just searches them less. If Leela really did ignore &quot;moves that don't work&quot;, it would be decisively lose repeatedly.</p>
