Live data from Hacker News

Show HN: ChessCoach – A neural chess engine that comments on each player's moves

chrisbutner.github.io

61–70 of 92 posts

Re: Show HN: ChessCoach – A neural chess engine that comments on each player's moves

#61
post #2

This took about a year and a half – a little over a year coding in between experiments and training. It's a chess engine with a primary neural network just like AlphaZero or Leela Chess Zero's, but it adds on a secondary "commentary decoder" network based on Transformer architecture to comment on positions and moves. All of the code and data for training and search is from scratch, although it does use Stockfish code…

Can you have it play more games by giving it less time per turn (~2500 rating is plenty good for an opponent/coach) and playing games concurrently while it waits for human to play?

how much does a game cost in CPU time money?

How do I get the commentary for a game I played? Oh, it's in Analysis page.

It plays chess very well, but the commentary is incoherent and doesn't match the game well -- The attacks described are nonsense and the coordinates are wrong. It seems a little confused about which side is which? It thinks a rook can diagonally attack a bishop, and seems to name squares opposite from their actual name.

Re: Show HN: ChessCoach – A neural chess engine that comments on each player's moves

#62

Earlier quoted context omitted.

It must be tough for you to function in everyday life if you find such mundane thing distracting.

Not really, no. Singular "they" is pretty much everywhere now, despite some people's best efforts.

It seems delusional to think there are many instituional efforts that try to prevent singular "they".

Re: Show HN: ChessCoach – A neural chess engine that comments on each player's moves

#63
post #61
post #2

This took about a year and a half – a little over a year coding in between experiments and training. It's a chess engine with a primary neural network just like AlphaZero or Leela Chess Zero's, but it adds on a secondary "commentary decoder" network based on Transformer architecture to comment on positions and moves. All of the code and data for training and search is from scratch, although it does use Stockfish code…

Can you have it play more games by giving it less time per turn (~2500 rating is plenty good for an opponent/coach) and playing games concurrently while it waits for human to play? how much does a game cost in CPU time money? How do I get the commentary for a game I played? Oh, it's in Analysis page. It plays chess very well, but the commentary is incoherent and doesn't match the game well -- The attacks described ar…

That's a good idea. A bigger problem than time-slicing is probably GPU/TPU device ownership issues and GPU/TPU memory usage with multiple games going in parallel. There may be some ways to multiplex it intelligently though.

Costs are difficult to work out - it depends on cloud vs. self-hosting, what kind of TPUs/GPUs, how long you're calculating over.

The advantage that classical/NNUE engines have is that they can more easily spread over distributed frameworks like Fishtest.

Re: Show HN: ChessCoach – A neural chess engine that comments on each player's moves

#64

We used to call it when people stand around your chess board talking about you game “kibitzers” https://en.m.wikipedia.org/wiki/Kibitzer

TIL Where chibitz comes from in Romanian. To us it's the annoying people that comment on the game (cards, football or whatever it is) and usually hope it goes badly for the target of their comments.

Same in Hungarian

Re: Show HN: ChessCoach – A neural chess engine that comments on each player's moves

#67
post #45

So do I understand correctly: This is a new head on top of the AlphaZero model? That is, in addition to the usual evaluation and policy heads, this takes the intermediate board representation and outputs a seed vector that is fed into a transformer text generator? Or do other things go into the seed? Like the search tree somehow? Otherwise I suppose the commentary will not be able to comment on deeper tactics? Or may…

The original hope was for this to be a third head on top of the AlphaZero model, but I couldn't think of a way to generate commentary during self-play (such that it would gradually improve), and trying to rotate supervised commentary training into the main schedule ended up hurting both sides because of the disjoint datasets. So, now the commentary decoder is just trained separately on the final primary model. The pr…

I think training this as a separate head on top of a frozen AlphaZero model makes a lot of sense. I don't think anyone has figured out to do language learning with reinforcement training.

Actually, I can't figure out from your explanation why you trained the whole network yourself instead of just using Leela's network and training the commentary head on top?

If you wanted to in-cooperate the search, maybe you could just take the 1800 or so probabilities output by the MCTS and add some layers on top of that before concatenating with the other data fed into the transformer.

In either case, this is a fantastic project and perhaps an even more impressive write up! Congrats and thank you!

Re: Show HN: ChessCoach – A neural chess engine that comments on each player's moves

#68
post #45

Earlier quoted context omitted.

The original hope was for this to be a third head on top of the AlphaZero model, but I couldn't think of a way to generate commentary during self-play (such that it would gradually improve), and trying to rotate supervised commentary training into the main schedule ended up hurting both sides because of the disjoint datasets. So, now the commentary decoder is just trained separately on the final primary model. The pr…

I think training this as a separate head on top of a frozen AlphaZero model makes a lot of sense. I don't think anyone has figured out to do language learning with reinforcement training. Actually, I can't figure out from your explanation why you trained the whole network yourself instead of just using Leela's network and training the commentary head on top? If you wanted to in-cooperate the search, maybe you could j…

It was partly because I was looking to improve self-play and training tractability on a home desktop with 1 GPU (complete failure), and partly to learn about everything from scratch. I would be interested to see how strong it is with the same search but with Leela's inference backend (for GPU at least) and network.

In terms of search-into-commentary, concatenating like that may be interesting, as long as it can learn to map across - definitely plausible without too much work. I was originally thinking of something more complicated, combining multiple raw network outputs across the tree through some kind of trained weighting, or additional model via recurrence, and punted it.

Ignore my BLEU comment, mixed those up between replies - that was the other potential use of search trees for commentary, an MCTS/PUCT-style alternative to traditional sequential top-k/top-p sampling, once you have logits and are deciding which paragraph to generate.

Thanks!

Re: Show HN: ChessCoach – A neural chess engine that comments on each player's moves

#70
Very interesting. For humans, analyzing concrete positions with a player that's > 400 rating points above you is fairly useless. You're way better off with a player that's some 200 rating points higher. The reason is that they still, sort of have the same type of understanding of chess than you do, while the high rated player plays another game.

A remark about opening preparation: The best metaphor I've seen here is the one about snooker. Ronnie O'Sullivan needs a good safety game because his opponent can clear the table. You don't.

Post reply on HN