Live data from Hacker News

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

chrisbutner.github.io

81–90 of 92 posts

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

#81
post #53

Earlier quoted context omitted.

The engine itself is in C++, but it calls in to TensorFlow via Python as a portability/distribution vs. performance trade-off. Next steps could be using one of Lc0's backends for GPU scenarios, or taking the other side of the trade and using the C++ API for TPU. There's also your typical CPU and memory optimizations that could be made - some baseline work there but not targeted.

I see. I guess compute intensive stuff is usually implemented in c++. By the way, if you don't mind, could you share your experience in learning RL? I am struggling through Sutton and Barto's text right now and wondering if I'll progress faster if I just "dive into things." Also, nice project!

I found "Foundations of Deep Reinforcement Learning - Theory and Practice in Python" by Laura Graesser and Wah Loon Keng quite helpful in that it was somewhat like get a excellent summary course in about 6 years of RL advancements. I will say that it's quite forthcoming with the math. Anyway, I just wanted to know how they (not sure exactly who did it first, I just meant people with machines) got RL to play Atarti Pitfall. So take any recommendation I make with a grain of salt.

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

#82

Earlier quoted context omitted.

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".

I'm talking to several individuals in this very thread

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

#83
post #79

Remarkably cool. My only bit of feedback is that it's unfortunate so much of the commentary uses masculine pronouns (I found it distracting). Is that just a consequence of the training data?

Would 'queen' be considered masculine or feminine? Bishops? Knights (joan of arc excepted)? Are pawns slaves? Ahhh, the sport of kings, reduced to 2021.

Unsure how any of those are relevant? I pointed out the descriptions of the current player being trained - a pretty important part of this project.

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

#84
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…

I’d like to self host. Will this run with a gpu?

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

#86
post #4

Earlier quoted context omitted.

Thank you! I do get that itch to jump in and improve things whenever I see it lose a game, but I don't have further plans (development or commercial) in the near-term. The goal originally was to see whether I liked ML, to decide on my next industry/career move, but there was a lot of "one more month". I'm actually hopeful that some search techniques such as SBLE-PUCT[1] or better derivations can make their way into o…

You estimate it’s rated 3400-ish and it loses games????

It loses some games to Stockfish 13 and 14, and Lc0 - rarely at slow time control, and more often at blitz and bullet (actually, it has losses all the way down to Stockfish 9 in blitz).

Partly because of the way it tries to search more widely to avoid tactical traps, it can also be a little sloppy in holding advantages or minimizing losses (this could use some more work and tuning). This ends up making it a little drawish, so it loses less than you'd expect to Stockfish 14, but also doesn't beat up weaker engines as well as Stockfish 14 does.

You can see some of this in the raw tournament results[1]. At 40 moves per 15 minutes, repeating, each engine draws with the ones above and below it, but starts to win and lose at a distance of 2 or 3.

At 5+3 time control, ChessCoach goes 1-0-29 vs. Stockfish 12, but Stockfish 12 is better at beating Stockfish 8-11 than ChessCoach is, so CC ends up between SF11 and SF12 in the end.

On Lichess, where there's no "free time" to get ready for searches, ChessCoach's naïve node allocation/deallocation makes it waste time, and means it can't ponder for very long on the opponent's time - a big opportunity for improvement (it needs a multi-threaded pool deallocator that can feed nodes back to local pools for the long-lived search threads). I think it's also hitting a bug with Syzygy memory mapping that Stockfish works around via reloading every "ucinewgame" (which I don't trigger on Lichess). So, overall, its performance on Lichess is worse.

Also, you can't read too much into this data - very few games, and no opening book.

[1] https://chrisbutner.github.io/ChessCoach/data.html#appendix-...

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

#87
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…

I’d like to self host. Will this run with a gpu?

Yes! I haven't done as much testing with GPU, but did validate running with 4x V100s. You just need to adjust the "search_threads" option to the number of GPUs, but set it to at least 2.

Installation for GPU is covered here: https://github.com/chrisbutner/ChessCoach#installation (a little messy, sorry)

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

#88

Very cool project. I'm currently reading The Alignment Problem by Brian Christian on AI (very well written and easy to read), and also (very slowly) My Great Predecessors, Vol 1 by Garry Kasparov. This is a great combination of the two topics! I'm particularly interested in the second neural net that generates explanations. Is it only a neural net to generate the natural language using artifacts from the original eng…

The commentary net inspects the final state of the engine net, but not internal layers.

Deeper introspection is a really important goal, but by the time you make serious progress there, chess is the least of your worries.

I do really like the work people have put into introspection and visualization so far though: DeepDream comes to mind. There was also another great paper or page that I can't find.

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

#89

Earlier quoted context omitted.

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

I'm talking to several individuals in this very thread

It seems like you are the only one in this thread who cares so much about pronouns to put effort into using them.
Post reply on HN