Hacker News new | past | comments | ask | show | jobs | submit login
Sinclair ZX81 1KB Chess vs. Stockfish Chess Engine (2018) [video] (youtube.com)
160 points by cpeterso on April 20, 2019 | hide | past | favorite | 29 comments

For a far more interesting matchup, with advanced long term oriented strategic play, consider watching a match between AlphaZero and Stockfish: https://youtube.com/watch?v=JacRX6cKIaY

The video linked here focuses on the ability of AlphaZero in making long-term optimal piece sacrifices against Stockfish, which is largely incapable of understanding these types of moves due to its hard coded bias towards losing pieces defined in its value function, causing AlphaZero to be able to consistently outmaneuver and ultimately handily defeat StockFish in almost every single game it plays against it.

It's kind of sad to see these statements repeated so often ...

* "ultimately handily defeat StockFish in almost every single game it plays against it" the vast majority of the games were draws actually

* Regarding "stockfish is too materialistic" ... if you watch last TCEC's premier division and superfinal, you'll find games where stockfish offered to sacrifice a lot of material, lc0 accepted the sacrifice and went on to lose far later in the game.

* It's unknown (except for people at deepmind, probably) if a0 is still stronger than stockfish. stockfish gained a lot of elo since the published match (and would beat the stockfish version a0 played against in more games than a0 did)

Yeah, the parroting is sad. Perhaps people have belt buckles engraved with "In Google we trust".

Related to AlphaZero is the Leela Chess Zero project, an independent project people from across the glob contribute CPU/GPU resources to: https://lczero.org/#tab-elo-estimates. One of the main developers on LCZero is also one of the Stockfish developers.

It's been having an interesting time in various competitions, and much like the match you point out, it makes some decidedly more "human" moves, little stabs to try and get out of a draw situation that Stockfish won't due to its hard-coded biases. Here's an interesting game from TCEC 14 https://www.youtube.com/watch?v=rhI4DKGSjtk Ultimately it came second to Stockfish, but that was the highest placing it has had so far, and they keep refining and improving it all the time.

TCEC[0] 15 is ongoing now:


Stockfish is currently leading, but all games vs. LCZero so far have been draws, and the winner is decided by the "Superfinal": a series of 100 games between the two top engines of the round-robin stage. Stockfish won TCEC 14, but with both engines improved since then it's still uncertain who will win.

[0] https://en.wikipedia.org/wiki/Top_Chess_Engine_Championship

Contribute to the go site of leela zero and play using it with gui. Not sure how to start chess part.

But open one is better than closed one as we can have other experiment such Facebook go, darkgo and minigo etc. Not sure there is any similar chess open net engine.

Both stockfish and LC0 are open source.

While it is to a degree true, it is also worth noting that the stockfish vs alphazero matches did get criticism for various reasons.

The one I remember most was that alphazero was running on a supercomputer, while it's opponents didn't get that luxury. This is said to be why alphazero didn't make it far when put on similar hardware as other ais.

The other criticism I remember was from stockfish's dev saying that the settings they have for stockfish where suboptimal, most notably they had a set 1 minute think time per turn. This is apparently not how stockfish works, because like a human player it will also calculate on which turns it will spend its time thinking.

So while alphazero may very well be better, there's not really a way to confirm this with these matches sadly. The matches whet still helpful to the chess community, though. Definitely still worth checking out

At runtime, both the Stockfish and AlphaZero agents were given equivalent hardware, which was a standard commercial CPU. There were no super computers involved there.

I think what you might be mistakenly thinking of is, with some articles erroneously reporting when the games/paper were first publicly released, the fact that training a model of AlphaZero requires a considerable amount of self-play that takes up a lot of compute cycles.

It’s important to make the distinction between training and inference time here though. For the analogous comparison to how Stockfish works, it has been trained for more than a decade now with humans iteratively refining and manually creating features and strategies. The primary achievement of what Alphazero represents, is that it was able to train itself completely independent of humans and come up entirely with its own features/strategies.

At inference time too though, we see a large increase in benefit for AlphaZero against Stockfish. As even though both agents had exactly the same hardware and time allotted, AlphaZero is far more efficient at exploring its search space due to the value/pruning function it learned by itself through training. Stockfish also has its own value and pruning functions, but because of the fundamental nature of how expert systems work, it’s very difficult to create generalized features that address every possible variable. That’s the other benefit of training a model to learn things itself through self-play as opposed to manually engineering the features ourselves by hand. This is why AlphaZero performed far better than StockFish here given the same time, and one of the reasons why it was deemed to be more “human-like”. Because as humans we don’t brute force possible moves, but rather immediately discount a large majority of plays and focus in on a very small subset that we know to be the optimal path to go towards, all through a sort of ingrained “intuition” built up over the countless games we’ve played.

I hope I was able to help clarify things with this short summary, and if you’re interested, I definitely recommend reading the paper itself for more in depth detail/information! You can find it freely available here at: https://deepmind.com/documents/260/alphazero_preprint.pdf

Those criticisms arose from the preprint - the timing criticism (at least) was resolved in the final paper - both sides were given 3 hours (+ 15s increment).

And for even more interesting games, watch human chess instead of computer chess. Grenke Chess Classic is happening right now.

It should be noted that newer versions of Stockfish are generally slightly stronger than neural net based approaches (Leela). Although perhaps this is a temporary state of things.

Given a list of moves, do you think you could tell which are computer v. computer and which are humans?

Not for individual moves, no. Top human players play so accurately, it would be almost impossible. Not to mention the fact that vast swathes of the opening are memorised computer moves. But over the course of a game there are usually one or two moves that are very much tells. Even top humans occasionally blunder. While 'computer moves' are characterised by having a lack of 'conventional' logic to them, and instead relying on a non-intuitive or long-term combination.

Many of AlphaZero's matches were also notable because it managed to achieve very clean strategic positions in a way that seem to be longer term and require more multitasking than a human game (AZs bishops, for example). I bet I could score (a little) more than 50% just shown a mid game board position, no moves.

So it is not 100% by any means. And AlphaZero did seem to be slightly more 'human' than Stockfish, and the games more entertaining as a result. Though still recognisably superhuman.

But I would say, the excitement in human chess is not just a set of moves, but the meta. What the players have played before, how fast they play, their use of time, where their mistakes happen, how risky do they need to play to make up points. This is often more apparent in either short time controls, long game series such as the world championship, or tournaments.

Like watching a good pitching duel in October baseball. A random number generator and pitching machine could conceivably statistically play better, but would miss the point.

Given a camera focused on the players, given commentators on set, given known histories of the players, their recent successes and failures, their past encounters against each other, given stakes, given a ticking timer and the psychological effect of time trouble, the psychological effect of a tricky move, the psychological effect of exhaustion after a six hour game, given knowledge of the players' different playing styles and my preferences... I can tell the difference between human chess and computer chess.

My enjoyment of chess is not simply a scalar function of chess moves.

With Stockfish and other traditional engines, yes. With Leela and AlphaZero, no.

Not with Stockfish or even Houdini. They both play magical moves. Note that Stockfish 9/10 can currently beat Leela and possibly even AlphaZero

That wasn’t the question being asked.

Games played by computers (with the exception of NN-based programs) have a generally-discernible feel to them that I believe most grandmasters can spot a mile away.

And that was my point too. Stockfish and houdini both play very human like moves; that's if we can even define human like moves.

Stockfish frequently sacs pawns and minor pieces for space advantage

When I was in college and playing more single player video games, I hated the fact that essentially my job as a player wasn’t to beat the bad guys by cheesing the AI. That’s why it was always 10 against one, because the game wasn’t fair for the computer.

Modern games have multiple character builds where the only way to play is to cheese (all characters that must kite have a cheese mechanic. I’m not gonna chase someone until I die. Fuck that. I’ll hide and try to pick em off)

Watching one AI cheese another doesn’t make me happy. It makes me sad for what I thought we’d have now.

Halo 2 I think, they pre-computed the strategic value of every spot on the map and the AI would use the terrain. First and last time I’ve heard someone do something like that.

In 2001 HAL was programmed to lose at chess sometimes. I think that’s the ultimate desirable AI; one that plays like a human that is a little bit smarter than you (or a little bit dumber than you).

There were multiple chess-related submissions in SIGBOVIK 2019: http://www.sigbovik.org/2019/

In particular, there was one that played a bunch of chess engines against each other, and came up with a better metric than Elo, for when players aren't going to change skill.

Another classic mismatched match-up:


...but I was more impressed by the Atari 2600 chess game which had castling and en passant. Having 256 bytes seems like a good excuse to leave out such nonsense.

256 bytes of RAM, plus insane amounts of ROM (a whopping 4kB, acccording to https://en.wikipedia.org/wiki/Video_Chess)

Dang, 4kB... In 32 bit depth, you could encode that with a measily 32x32 image. Think of how many more bytes a smartphone from even several years ago has in it's framebuffer, that it is more than capable of filling 60 or even more times per frame.

Relevant (and mentioned at the end of the video): https://gist.github.com/ecelis/f2428c38fd7777b20ace

I had those three mags, and I typed it in. A wonderful introduction to what you can do in Z80 machine code.

Happy days

Would much rather an explanation of what the code does to achieve this miracle.

http://users.ox.ac.uk/~uzdm0006/scans/1kchess/ - use the source, luke?

also maybe some previous hn discussion may have some analysis https://news.ycombinator.com/item?id=9151552

I am not interested to watch the video; PGN would be more useful (with comments added), I think. Then you can print out, too, if you want to do.

Applications are open for YC Summer 2021

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact