Skip to content

Comment on When do "brains beat brawn" in chess? An experiment

Comments

I wonder if there would be a way to train Stockfish to be better at playing with odds. I do not know much about chess, but I doubt the AI was trained on how to play openings when starting at a disadvantage, so maybe one could see a vast improvement on AI playing with odds if the AI was specifically trained/designed to do so

Chess AI is not machine learning as in "it watched thousand of games and extracted some patterns to be good".

It basically explores all possible moves and all possible countermoves and selects the best one. Of course it is extremely well engineered and optimized, but this is the main concept.

As a consequence, it does not to be "trained" on a dataset with odds to play without a piece.

... Sort of. Yes, you're right to bring up minimax/alpha-beta pruning, but things like the correct values for piece square tables and the opening book are chosen based on data that is analogous to ML model training (sometimes these are directly chosen using ML models).

Removing a piece may mess up the values chosen for the piece square tables and certainly messes up with the opening book - but on the other hand, it makes it sooner for the engine to end up using it's tablebases in the end game!

I thought it does need to be trained (via self-play) to recognize patterns bc the game space is too large to exhaustively visit

Looks like it used to be brute force, as you say, but has since incorporated an NN after ita loss to AlphaZero

https://www.chess.com/terms/stockfish-chess-engine

It uses alpha-beta pruning[0], which requires an evaluation function. Stockfish traditionally used a man-made evaluation function, but added a small type of NN called an NNUE[1] for better results. The actual search method is still the same, though.

[0]https://en.wikipedia.org/wiki/Alpha%E2%80%93beta_pruning

[1]https://www.chessprogramming.org/NNUE

w00t, much better. thanks!

Good names in there :)

Right. It's not intelligent. It just brute forces down a decision tree of possible moves / outcomes and picks the best next move that is most likely to result in victory. With a super computer (e.g., IBM's Watson) the program is able to go deeper down the tree and explore more branches in less time.

Nothing fancy. Just pure brute force.

Brute force alone is not very good for chess: you need some means of evaluating a position to prune your tree, otherwise you will not be able to plan very far ahead at all. The evaluation function is in large part what makes one chess engine better or worse than another, and nowadays that includes some neural nets for the top engines (stockfish, which is still the best AFAIK, uses a relatively small net and still evaluates some 100s of millions of positions, while Alphazero has a relatively larger net and evaluates about a thousand or so positions, and is also far better than any humans)

Gotta nitpick :)

Brute force is good enough, at any given moment the # of possible moves is finite. The limiting factor is how much hardware you have and how quick you need the next move.

Sure, but unless you wanna wait a few thousand years on a pretty large cluster you're not going to get a chess engine that's gonna beat the best humans. The number of moves is finite but very, very large.

Opening books definitely play a significant part of chess AI. The early game is where the game tree is largest while the variation is lowest.

Stockfish doesn't need improvement at playing with odds to beat all humans with odds.

The author is playing a 2-year old version (stockfish 14 vs 16 is current) on low depth (22 vs for the strength they use to get max rating I think they use at least 48 or so, which is clearly much stronger). If they played stockfish 16 on a decent depth it would be an annhilation I'm sure.

To understand the depth number, this is how deep in the move tree the model looks forward in order to evaluate positions. I think depth 22 corresponds to 22 ply ie 11 moves by each player. At each depth it might evaluate 8-10 candidate moves or so, so a depth of 48 is clearly vastly stronger, not just "a bit more than twice as strong" which it might sound like.

I'm a very average chess player, and there are moves I play that stockfish at depth 16 things are a blunder that at depth 32 it thinks are a brilliancy. These are typically things in openings I play a lot where I've had a chance to do some homework and learn the best moves on a high depth.

I imagine this could be done with MuZero[edit: turns out I meant AlphaZero] without much fundamental difficulty?

(Uh, I mean, could be done by a team which is able to train MuZero)

Leela Chess Zero has been around for a while, and it's almost as strong as Stockfish. It used to be very bad at handicap games because it's trained to maximize the odds of winning and couldn't handle totally lost positions, but they improved it recently. Now it can play at GM level with knight odds.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.