Grandmaster-Level Chess Without Search

(github.com)

84 points | by lawrenceyan 5 hours ago ago

33 comments

  • hlfshell 4 hours ago

    I did a talk about this! (And also wrote up about my talk here[1]). This paper is a great example of both knowledge distillation. It's less of a paper about chess and more about how complicated non linear search functions - complete with whatever tuning experts can prepare - can be distilled into a (quasi-linear, if it's a standardized input like chess) transformer model.

    [1]: https://hlfshell.ai/posts/deepmind-grandmaster-chess-without...

    • janalsncm 3 hours ago

      I think the vs. humans result should be taken with a huge grain of salt. These are blitz games, and their engine’s elo was far higher against humans than against other bots. So it’s likely that time was a factor, where humans are likely to flag (run out of time) or blunder in low time situations.

      It’s still very cool that they could learn a very good eval function that doesn’t require search. I would’ve liked the authors to throw out the games where the Stockfish fallback kicked in though. Even for a human, mate in 2 vs mate in 10 is the difference between a win and a draw/loss on time.

      I also would’ve liked to see a head to head with limited search depth Stockfish. That would tell us approximately how much of the search tree their eval function distilled.

      • hlfshell 3 hours ago

        The reason the time (blitz) games make sense is because the distilled functionality is of a 50ms Stockfish eval function. The engine likely would perform worse as only the human would benefit from the additional time.

        As for limited search tree I like the idea! I think it's tough to measure, since the time it takes to perform search across various depths vary wildly based on the complexity of the position. I feel like you would have to compile a dataset of specific positions identified to require significant depth of search to find a "good" move.

        • janalsncm 3 hours ago

          My point is that if the computer never flags it will have an inherent advantage in low time controls. If not, why not just test it in hyperbullet games? Games where humans flag in a drawn or winning position need to be excluded, otherwise it’s unclear what this is even measuring.

          And limited depth games would not have been difficult to run. You can run a limited search Stockfish on a laptop using the UCI protocol: https://github.com/official-stockfish/Stockfish/wiki/UCI-%26...

  • tzs 2 hours ago

    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 enough but it generally feels like they were still outplaying you for much of the game and you won because they made one or two blunders.

    What I want is a computer opponent that plays at a level of my choosing but plays a game that feels like that of a typical human player of that level.

    Are there such engines?

    • rococode 2 hours ago

      Maia does this reasonably well! You can play against it on Lichess. I have gotten a few "feels like a human" moments when playing against it - for example, getting it to fall into a trap that could trick a human but would easily be seen by a traditional search algorithm. It's not adjustable but there are a few different versions with different ratings (although it's not a very wide range).

      https://www.maiachess.com/

      https://lichess.org/@/maia1

    • rtlaker 2 hours ago

      No, not with adjustable rating. The best human-like engine is fairymax, but its Elo is estimated between 1700-2000.

    • danielmarkbruce 2 hours ago

      It doesn't seem that difficult to pull off - take one of the existing engines, get the top y moves, choose randomly. For each level down increase y by 1.

      • ajkjk 2 hours ago

        No, it doesn't work at all. Human mistakes are not at all like computer mistakes. Like -- blundering a piece in a 1-2 move combination will straight up never show up in the stockfish move tree, no matter what you set `y` to.

      • agubelu 2 hours ago

        It doesn't work that way. There are many positions with lots of moves that are reasonable, but many others with only 1-2 sensible moves. It would make lots of obvious blunders that an amateur human would never make.

        • chmod775 2 hours ago

          Also attention. Lower level human players are more likely to make a move close to their own/their opponent's recent move. They're focused on one area of the board.

          Basic computer opponents on the other hand can make moves all over the place. They look at the board state holistically. This can be very frustrating to play against as a human who has enough problems just thinking their way through some subset of the board, but is thrown off by the computer again and again.

          It's not that bad in chess at least (compared to Go), but still something worth to keep in mind if you're trying to make an AI that is fun to play against as an amateur.

      • dullcrisp 2 hours ago

        Seems this might still have the problem of moves being either extremely good or extremely bad depending on how many good moves are found, rather than playing at a consistent level. Or for example in a degenerate case where there are only two moves and one leads to mate, the computer will be picking randomly.

      • bobmcnamara 2 hours ago

        Your engine would only mate once it had y options to mate.

        • dullcrisp an hour ago

          Or y chances. They did say it’d pick randomly. Still not great though, if a bit less funny.

  • osti an hour ago

    https://lczero.org/blog/2024/02/how-well-do-lc0-networks-com...

    The best neural network chess engine's authors wrote about this deepminds publication.

  • jackmalpo 24 minutes ago

    what i would love is an engine that thinks more like a human. presumably since this uses stockfish annotated games, it basically ends up thinking like a computer. thinking like a human would be awesome for game reviews to walk through things to note in different positions (tuned to my elo).

  • YeGoblynQueenne 42 minutes ago

    Excellent work but I suggest a slightly different title:

    "What would Stockfish Do?"

    A more appropriate title; because Stockfish is a search-base system and DeepMind's approach wouldn't work without it.

    Oh, btw, this is (yet another) a Neurosymbolic system of the "compiling system 2 to system 1" type.

  • ChrisArchitect 3 hours ago

    Associated discussion on the paper:

    Grandmaster-Level Chess Without Search

    https://news.ycombinator.com/item?id=39301944

  • joelthelion 4 hours ago

    I wonder if you could creatively combine this model with search algorithms to advance the state of the art in computer chess? I wouldn't be surprised to see such a bot pop up on tcec in a couple years.

    • janalsncm 3 hours ago

      The advantage of this flavor of engine is that it might make parallel position evaluation extremely efficient. Calculate 1024 leaf positions and batch them to the model, take the top 10% and explore their sub-trees either via further GPU batching or minimax eval.

      NNUE already tries to distill a subtree eval into a neural net, but it’s optimized for CPU rather than GPU.

    • alfalfasprout 3 hours ago

      The thing is classical chess (unlike eg; go) is essentially "solved" when run on computers capable of extreme depth. Modern chess engines play essentially flawlessly.

      • KK7NIL 3 hours ago

        The developers of stockfish and lc0 (and the many weaker engines around) would disagree, we've seen their strength improve considerably over the last few years.

        Currently there's a very interesting war between small neural networks on the CPU with high search depth alpha-beta pruning (stockfish NNUE) and big neural networks on a GPU with Monte Carlo search and lower depth (lc0).

        So, while machines beating humans is "solved", chess is very far from solved (just ask the guys who have actually solved chess endgames with 8 or less pieces).

        • GaggiX 3 hours ago

          Stockfish and lc0 would always draw if they are not put in unbalanced starting positions, the starting position will be swapped in the next game to make it fair.

          • KK7NIL 3 hours ago

            In classical controls (what TCEC mainly uses), yes. They can play pretty exciting bullet chess without a forced opening though.

      • janalsncm 3 hours ago

        Chess is not “solved”. Solved doesn’t mean computers can beat humans, it means for any chess board position we can tell whether white wins, black wins, or the game is drawn with perfect play. We would know if the starting position was drawn, for example.

        No computers now or in the foreseeable future will be capable of solving chess. It has an average branching factor over 30 and games can be over 100 moves.

      • solveit 3 hours ago

        We really have no way to know this. But I would be very surprised if modern chess engines didn't regularly blunder into losing (from the perspective of a hypothetical 32-piece tablebase) positions, and very very surprised if modern chess engines perfectly converted tablebase-winning positions.

        • KK7NIL an hour ago

          We do know this, there are many positions (primarily sharp middle game one's) where SF/lc0 will significantly change their evaluation as they go deeper. This problem gets better the more time they spend on one position but it's an inevitable consequence of the horizon effect and it's why (except for 8 pieces or less), chess is far from solved.

        • janalsncm 3 hours ago

          The fact that TCEC games aren’t all draws suggests that computers aren’t perfect. Stockfish loses to Leela sometimes for example.

          • grumpopotamus an hour ago

            Tcec games are deliberately played from imbalanced opening positions. The draw rate would be much higher for the top participants if this wasn't forced. However, I agree that engines are not perfect. I have heard this claim many times before a new engine came along that showed just how beatable the state of the art engines still were at the time.

        • __s 3 hours ago

          not only blunder into losing positions, but also blunder from winning positions into draws

          even in human chess people sometimes mistaken draw frequency to reflect both sides playing optimally, but there are many games where a winning advantage slips away into a draw

      • primitivesuave 3 hours ago

        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.

      • __s 3 hours ago

        compared to humans yes, but between themselves in TCEC progress continues. TCEC has AIs play both sides of random openings, rather than stick to playing chess's initial position. The same happens for checkers amongst humans, where opening positions are randomized

  • dgraph_advocate 3 hours ago

    This is missing a makefile to automate the manual installation steps