Live data from Hacker News

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

chrisbutner.github.io

51–60 of 92 posts

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

#52
post #17
post #16

Earlier quoted context omitted.

> It only plays one game at a time, so you may need to wait a little bit Why this limitation? Is it fairly computationally expensive to run?

Yes, each bot uses a v3-8 Cloud TPU VM, and tries to be constantly playing a game. The search tree is also very memory-hungry. And right now it's also using the Python API for TensorFlow, which is likely wasting a lot of potential. Lots of room for improvement!

Could using something like AlphaZero.jl make it more efficient?

https://github.com/jonathan-laurent/AlphaZero.jl

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

#53
post #17

Earlier quoted context omitted.

Yes, each bot uses a v3-8 Cloud TPU VM, and tries to be constantly playing a game. The search tree is also very memory-hungry. And right now it's also using the Python API for TensorFlow, which is likely wasting a lot of potential. Lots of room for improvement!

Could using something like AlphaZero.jl make it more efficient? https://github.com/jonathan-laurent/AlphaZero.jl

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.

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

#54

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?

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.

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

#55
post #53

Earlier quoted context omitted.

Could using something like AlphaZero.jl make it more efficient? https://github.com/jonathan-laurent/AlphaZero.jl

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!

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

#56

Looking at the screenshot, I was briefly hopeful that they used actual Chess commentary and gpt3 or something. But it looks like a simple rule engine is translating "user did X but I (the AI) would have done Y" into a slightly nicer phrasing. Meh. Still cool.

Huh? There's tons of commentary that isn't just translating "what he did vs what I would have done":

"This is a good move for black. It attacks the center and attacks the pawn on e4. It also allows the development of the knight to c6."

"The main line. I don't know why I played this. But, I know that it's not a good idea to block in your own pieces, and that's what I would've done. But, this is a mistake because of what I'm about to do." (This is after its own move, and sounds very GPT3-ish.)

"He decides to kick my knight, but this is not a good move. It is also a very good move because it threatens my knight and threatens my pawn on e5. I am not worried about the knight fork on f2."

"I'm not sure what I'm doing, so I thought that I could castle, and try to defend it with a pawn, but I don't think it's worth it."

"The pawn on e5 is pinned to the king, so it is time to castle."

These samples are from the first ten lines or so of a single game.[1] They're all like that. Don't know what you were reading.

1. https://lichess.org/4l1urWeU#5

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

#57
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 think it always helps to have a project to apply things to as you're learning something, even if it means coming up with something small. While preparing, I found it helpful to read for at least an hour each morning, and then divided the rest of the day into learning vs. "diving in" as I felt like it.

Getting deep into RL specifically wasn't so necessary for me because I was just replicating AlphaZero there, although reading papers on other neural architectures, training methods, etc. helped with other experimentation.

You may be well past this, but my biggest general recommendation is the book, "Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow" to quickly cover a broad range of statistics, APIs, etc., at the right level of practicality before going further into different areas (for PyTorch, I'm not sure what’s best).

Similarly, I was familiar with the calculus underpinnings but did appreciate Andrew Ng's courses for digging into backpropagation etc., especially when covering batching.

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

#59

Earlier quoted context omitted.

Probably not. The issue with always using one set of pronouns is that people with other pronouns may feel isolated. For example, always assuming software devs are male could cause female devs to feel like they don't belong. Realistically, it's really hard to fix this encoded bias in language models.

Yeah it’s always annoyingly jarring when people assume that. You can even see in the comments on this topic that people attack the suggestion of gender neutral language, which further compounds on the feeling like we don’t belong or are explicitly unwanted.

There are certain people whose disapproval is a badge of honor. They show up in threads like this.

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

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

[deleted]
Post reply on HN