12 ms·
Chess-playing neural network LC0 beats Stockfish in 100-game match
- bonzini 7y ago53-46, one game to go
- Someone 7y agoLast one is a draw. Weird ending, with one of them refusing to take a pawn because the resulting end game is in a table base and is 100% known to be a draw, and the computer evaluates the position where it doesn’t take the pawn as a 0.x% win and a 99.y% draw.
- umanwizard 7y agohttps://cd.tcecbeta.club/archive.html?season=15&div=sf&game=100 https://cd.tcecbeta.club/archive.html?season=15&div=sf&game=... Weird indeed. Can anyone explain why LC0 thought it had a chance? It seems obvious (thinking like a human) that white can't make progress: it can't move its rook off the h file without losing the pawn, and it can't promote its pawn without moving its rook. And it can't bring its king up to help the h-pawn without letting black's pawn promote. LC0 evaluates the final position at 0.04, which I guess is close enough to 0 for it to agree to a draw, but I wonder why Stockfish is able to see that it's truly 0.00 and LC0 isn't.
- ClassyJacket 7y agoI know nothing of this system other than reading this page, but my basic understanding is that Stockfish is more of a traditional algorithm that simulates possibilities and finds the most likely path to a win ('IF I move my knight here, they could do X or Y or Z...'), but LC0 is a neural network, which don't really process absolutes, just probabilities in terms of floating point numbers. It might be something to do with that.
- nikki93 7y agoStockfish's evaluation function is; though; ultimately a floating point accumulation of such decision processes. In fact the leaf level scores are themselves floating point. eg. check out the scores here: https://github.com/official-stockfish/Stockfish/blob/master/src/evaluate.cpp https://github.com/official-stockfish/Stockfish/blob/master/... ... actually realized it uses an int typedef for the 'Score' type so it's "fixed-point" I guess.
- ClassyJacket 7y agoSure, but it still makes sense that that number would still result in a flat zero - or be disregarded - since Stockfish is (presumably?) capable of evaluating and realizing the absolute 0 chance, no? I'm not claiming to have special knowledge of these algorithms but it makes at least intuitive sense to me.
- Someone 7y ago”it can't move its rook off the h file without losing the pawn” Nitpick: I agree there’s nothing for white in that position, rook a6, b6 or c6 seem possible moves in the end position (if black takes the pawn, the rook gives chess on row 5 and takes black’s rook in the next move). From there, it could move the rook to row 5 to defend the pawn. If so, the rook can get away from the h file. Also, if black’s king were to walk towards the black pawn, the rook has to move from the h file to give chess. In general, LC0 seems to be way more optimistic in its scoring function than Stockfish. As an extreme, look at game 70. Stockfish sees it as a 100.0% draw after move 49, but play goes on until move 202 (!), with LC0 at some stage thinking it has a 25% chance at winning (around move 106)
- umanwizard 7y agoRE your nitpick: Fair point. I hadn’t seen the pinning tactic after 140. Ra6 Rxh5??? 141. Ra5+ As is probably obvious from that oversight, I am not a very strong player. However, I still see no way for white to make progress. After 140. Ra6, black just walks its king towards the white pawn. White’s only options then are to give perpetual check with the rook, or to give up the pawn. It’s plausible to me why lc0 doesnt see this — I guess it is just searching down random paths involving useless rook moves forever, and never gets to the end of the tree. I’m more curious about how Stockfish is able to prove it’s a draw. Edit: after poking around the Stockfish code a bit, I think what's going on is that Stockfish sees that down every non-pruned path of the tree, either player has the ability to give check, so neither player can be ahead (basically each side has a perpetural check). Would love if any Stockfish expert reading this can comment on whether that's a valid understanding.
- ganeshkrishnan 7y agoIt's really amazing and impressive what LC0 has achieved with almost no money and only community pooled training matches. They were struggling to pay $600 per month for the cloud server so have a baremetal server. Pretty sure it can beat AlphaZero at this point of time.
- mda 7y agoPretty sure Alpha zero would destroy Leela.
- mitchellgoffpc 7y agoMaybe so, but Deepmind isn’t training AlphaZero chess any further! Leela will hopefully just keep on getting better and better :)
- mda 7y agoEh, If they want, they can train Alpha zero in one day Leela can be trained in 10 years. In any case indeed Leela's progress is impressive.
- mot524 7y agoTraining AlphaZero for more than 4 hours on DeepMind's system didn't improve its strength. Makes you wonder if that's as close to ideal chess as we're ever going to get...
- deleted 7y ago[deleted]
- ganeshkrishnan 7y agoNo, I don't think so. Remember that AlphaZero played stockfish 8 which is pretty outdated. Some of it's moves against SF was pretty amazing and you could be right but everything is speculative right now. My only vote for LC0 is that it can win against the latest iteration of SF
- dragontamer 7y agoLC0 and AlphaZero work on the following principles: * GPU-based compute -- Deep Learning scales very well on GPUs, which are known to have superior parallelism over CPUs. * MCTS -- "Monte Carlo Tree Search", which is a different tree-search compared to Minimax. MCTS seems closer to "human-like play", with regards to search order. IMO, it is inelegant to use CNNs / neural nets as the evaluation layer. However, its difficult to imagine an evaluation function that would scale to GPUs. I'm curious how to use the SIMD-compute model to evaluate chess positions, but it doesn't seem like very much research exists on the subject. GPUs have significantly higher compute power than CPUs. Chess positions can largely be represented by just a few 64-bit integers (!!). (An 8x8 bitboard is 64-bits, one bitboard per piece). So the compute-density of chess-evaluation is very very high, there just aren't any algorithms that are well suited to the GPU-architecture aside from deep learning right now. ------- I really think MCTS is the superior search tree algorithm. The only issue is the evaluation function. Its certainly cool that Deep Learning / CNNs are being used as a "universal" GPU-function (self-learn / self-train so that a large CNN can "deeply" use a ton of GPU resources to make up its own evaluation function). But as far as I'm concerned, its a crutch. ---------- EDIT: If I had oceans of free time... I'd love to see what "translating" Stockfish's algorithms (ex: backwards pawn check. Bishop moves check. Paired Bishop advantage check. Etc. etc.) to a GPU would be like. A GPU probably could evaluate a million boards for "backwards pawns". Then evaluate the million boards for "paired bishops". Then evaluate the million boards for "knight outpost". Etc. etc. In effect: calculate the millions of positions in parallel, by lining them up and batching them together. Stockfish's parallelism is CPU-based, with lots of if-statements. Batching these checks into individual units would remove the if-statements and potentially make it amendable to SIMD-compute. The tree-evaluation would try to evaluate ~1-million boards at a time, to keep the GPU busy. Maybe ~1-million boards per CPU-thread (somehow self-tuning the evaluation process for an optimal mix of CPU + GPU time used). Again: if I had mountains of free time, lol.
- nwallin 7y ago> I'm curious how to use the SIMD-compute model to evaluate chess positions, but it doesn't seem like very much research exists on the subject. I disagree very strongly with this statement. Evaluation heuristics have been studied extensively, but the overwhelming consensus is that the simpler the heuristic, the better. If you make your heuristic worse, but fast enough to give you +1 on your search depth, you will almost always be better. So our evaluation heuristics are almost trivial because thirty years of research has demonstrated that the trivial heuristics are the best ones. SIMD doesn't help us for a few reasons. First, because bitboards are extremely sparse. You'll have at most 8 pawns in your pawn bitboards, 1 king in your king bitboards, and only under exceedingly rare circumstances will you have more than 2 pieces in your other 8 bitboards. Under no circumstances will you have more than 32 1s in your twelve bitboards, a density of one 1 per 24 zeroes. Second, you have a lot of loops with depths determined at runtime. You won't know how many squares your bishop can move until you're evaluating the position. SIMD isn't very good at that. > I really think MCTS is the superior search tree algorithm. The only issue is the evaluation function. The issue is move ordering. In minimax + alpha-beta pruning + PVS + hash table move cache, you don't need a near-perfect heuristic to tell you which order to evaluate moves. If there are 20 legal moves, it's fine if the best move is the 4th-8th move you search, although alpha-beta is faster if you search the best move first, which is why PVS+hash table is such a strong improvement. MCTS requires a good heuristic. If you have 20 legal moves, MCTS will evaluate maybe 2 of them, and if they're the 4-8th best moves, your AI will always be terrible, always. PVS+hash tables can't help you, because the only thing they can tell you was what move was good in the past. There isn't a good way to sit down and get a human to write a good heuristic. NNs are really good at it though. IMHO, if you want MCTS, you either need NNs or something like it. There's no way to jury-rig classical evaluation functions into it. (by "classical evaluation functions" I mean everything from Deep Blue to Stockfish) Replacing NNs in this context will likely mean replacing NNs in every other context. This would be a good thing, a great thing even, but it would require a new paradigm in the AI/ML world, not just something unique to chess. I actually agree with you about the elegance of MCTS and bitboards, and the inelegance of NNs and minimax. (and all of minimax's accompanying optimizations) But there's not really a good way forward.
- mrob 7y agoFIDE Candidate Master Kingscrusher (Tryfon Gavriel) has been posting analysis videos for some of these games on Youtube. LC0's win as black against the Trompowsky Attack was particularly impressive: https://www.youtube.com/watch?v=rz51_wFgNrQ https://www.youtube.com/watch?v=rz51_wFgNrQ
- ganeshkrishnan 7y agoI have been following kingscrusher for years and I never knew his real name.
- mindgam3 7y agoAnyone have a direct link to the games? Current article link goes a generic TCEC landing page.
- joe_the_user 7y agoI cannot figure out what exactly is happening from the site. I see a table showing "Gull 3" (presumably using the LC0 enginer) with five wins and few other engines with 1-2 losses. I can't see draws on the table. A lot of engines show no wins or losses. All this matters somewhat considering that there was talk in AlphaZero match about whether the win percentage was realistic and whether the Stockfish was given it's full opening book. The thing is by the time you're 3000+ elo points, chess tends to be pretty drawish. One program might better than another but it can take while to get anything a draw.
- bwasti 7y agoI think that link expired and now shows the wrong games. Here's a link to the final game between LC0 and Stockfish https://cd.tcecbeta.club/archive.html?season=15&div=sf&game=100 https://cd.tcecbeta.club/archive.html?season=15&div=sf&game=...
- symplee 7y agoOfficial website: http://lczero.org/ http://lczero.org/ GitHub: https://github.com/LeelaChessZero/ https://github.com/LeelaChessZero/ Still a very active community project. Didn't see the link posted here in the comments yet, definitely worth checking out. Most of the devs and serious contributors are active in the discord channel.
- ngcc_hk 7y agoSome of the discussion seems forget that the lc0 use neural network. There is essential no logic and there is no mtcs in the core part. Just play. And it is called zero ad it does not read any human game, like alpha go zero. It is just play and play to train the neural network ... you may say it want to find a function by itself that play the game. And the function is in the weights.
- tim333 7y agoAnyone know how the LC0 vs Stockfish hardware compares? I believe a criticism of the Stockfish vs AlphaZero games was that AlphaZero had fancier hardware.
- mot524 7y agoI believe LC0 was being run on dual RTX 2080 Tis and Stockfish was being run on "43 cores" which I take to mean a workstation with dual Intel 22-core processors. So you're talking about two $1200 graphics cards vs. two $3000+ CPUs. So you could make an argument that LC0 was running on inferior hardware, at least dollar-wise.