Live data from Hacker News

Grandmaster-level chess without search

github.com

151–160 of 171 posts

Re: Grandmaster-level chess without search

#151
This repository provides an implementation of our paper Grandmaster-Level Chess Without Search. https://arxiv.org/abs/2402.04494

The recent breakthrough successes in machine learning are mainly attributed to scale: namely large-scale attention-based architectures and datasets of unprecedented scale. This paper investigates the impact of training at scale for chess. Unlike traditional chess engines that rely on complex heuristics, explicit search, or a combination of both, we train a 270M parameter transformer model with supervised learning on a dataset of 10 million chess games. We annotate each board in the dataset with action-values provided by the powerful Stockfish 16 engine, leading to roughly 15 billion data points. Our largest model reaches a Lichess blitz Elo of 2895 against humans, and successfully solves a series of challenging chess puzzles, without any domain-specific tweaks or explicit search algorithms. We also show that our model outperforms AlphaZero's policy and value networks (without MCTS) and GPT-3.5-turbo-instruct. A systematic investigation of model and dataset size shows that strong chess performance only arises at sufficient scale. To validate our results, we perform an extensive series of ablations of design choices and hyperparameters.

Re: Grandmaster-level chess without search

#152
post #150

Earlier quoted context omitted.

How could it be possible to encode a search tree like this though.

Imagine you collected a billion unique, feasible board positions (all positions is intractable, but most possible positions are impractical) and the best nest move for each. That "best next move" is the result of a tree search. Now use a transformer to "compress" that information into its model. It sounds like that is approximately what is going on here. Certainly, the model is likely to generalize some aspects of th…

Exactly, the title says "without search" but in the paper it says "without explicit search", having a system learn to play chess at a grandmaster-level without any search for play or training would be far more impressive, what this does seems pretty obvious that it would work.

Re: Grandmaster-level chess without search

#153
post #90
post #77

But the gigantic synthetic dataset that is used for training is created with plenty of traditional search. So it is all a bit silly but I guess cool none the less ...

It's a knowledge distillation. You can then use this smaller, more efficient models instead of the larger one.

Is this network smaller than stockfish and by what metric is that?

Re: Grandmaster-level chess without search

#154
post #20

OT: what's the state of the art in non-GM level computer chess? Say I want to play chess with an opponent that is at about the same skill level as me, or perhaps I want to play with an opponent about 100 rating points above me for training. Most engines let you dumb them down by cutting search depth, but that usually doesn't work well. Sure, you end up beating them about half the time if you cut the search down enoug…

As a complete amateur I'd love a chess engine that can point out my mistakes, explain its own moves, and suggest better moves, in human terms. Like, this move would pin the white bishop. I don't know if this would be AI based or simply a search-based engine that scores in abstracted ways such as giving points for tactics like pins and forks, controlling the center, protecting the king, etc. (Typical chess search just scores based on piece and position and looks ahead farther than a human brain can handle.)

Re: Grandmaster-level chess without search

#155

Earlier quoted context omitted.

The thing is the heuristic done by a huge network might be insanely complex and doing all kinds of calculations. it's just that it's one function call so we ignore all those calculations. It's not immediately obvious that deploying a transformer to solve for next best move means that a human mind can avoid difficult calculations and just play by gut. There's just too much wordplay going on with "heuristic"

Arguably intuition and gut feeling are also insanely complex systems doing all kinds of calculations.

Sure, but apples and oranges have a lot in common too, and if we call everything fruit, it's unnecessarily hard to differentiate them ... is all I'm saying.

Re: Grandmaster-level chess without search

#156
post #72

Earlier quoted context omitted.

Really nice work! The tabs other than "play" don't seem to be working, but I was able to try some novelty openings and it certainly felt like it was responding with human moves. It would be great to have the ability to go back/forth moves to try out different variations. I'm curious how you combined Stockfish with your own model - but no worries if you're keeping the secret sauce a secret. All the best to you in buil…

I'm happy you enjoyed it! There are definitely a few rough edges, yes. Since the whole thing is executed in the browser (including the model) there aren't a ton of secrets for me to keep. Essentially it is expectation maximization: the bot tries to find the move with the highest value. What is "value"? Essentially, it is the dot product between the probability distribution coming out of the model and the centipawn ev…

Thank you for the explanation! I completely understand the rough edges, I have some rough ideas out there myself. Would it be alright if I add a link to your site to our chess club's list of online resources?

I can also make a note of it privately and check back in with you in the future. I found it pretty remarkable that it played a human-like response to some niche openings - I actually ended up checking against Stockfish and it played different moves, which is pretty neat.

Re: Grandmaster-level chess without search

#157

Earlier quoted context omitted.

This is accurate for endgames only. In complicated positions, there is still room for improvement - the recent game of lc0 vs stockfish where lc0 forced a draw against an impending checkmate is a good example. There is currently no way for a chess engine searching a massive game tree can see how an innocuous pawn move enables a forced stalemate 40 moves down the line.

Honestly SF plays better in middle game positions on average I would guess. I think usually there's a bigger draw margin in middle games

I think you are correct as I recall there is a set of middle game chess puzzles where Stockfish outperformed the other chess engines by a wide margin - I can't find the link as it was years ago. Not sure how the state-of-the-art has progressed since then. But I do believe the "horizon effect" plays a role in whether an engine decides to forcibly draw a game, which afforded Stockfish + NNUE a distinct advantage (at least at the time).

Re: Grandmaster-level chess without search

#159

Earlier quoted context omitted.

But that's not the relevant thing if we're talking about storing a best move per possible position.

Unless you’ve calculated every line to a forced win or draw you don’t actually know the objective evaluation of a position and so you can’t determine “best move”. That’s what a tablebase is.

Yes, I figured that he would need a tablebase anyway. But that's still a few bits per position, the number of possible games doesn't come in to it.

Re: Grandmaster-level chess without search

#160

Earlier quoted context omitted.

Unless you’ve calculated every line to a forced win or draw you don’t actually know the objective evaluation of a position and so you can’t determine “best move”. That’s what a tablebase is.

Yes, I figured that he would need a tablebase anyway. But that's still a few bits per position, the number of possible games doesn't come in to it.

A tablebase does include every possible move from every possible position. There are many transpositions, saving space but still every single possible line from a position is represented in a tablebase. How is that different from every possible game from that position?

A 6-piece tablebase is 150GB. A 7 piece is 18TB. An 8 piece is thought to be 2PB, but we don't have one yet. How big do you think a 32-piece tablebase will be?

Post reply on HN