Live data from Hacker News

Show HN: Chessdream – Generate realistic chess positions with AI

chessdream.ai

1–10 of 20 posts

Show HN: Chessdream – Generate realistic chess positions with AI

#1
For no specific reason, I trained a neural network to generate random chess positions that look similar to positions from actual games (from lichess db). I also made it so you can condition it on some fixed pieces, and adjust the number of pieces.

It turned out to be quite effective and I find it surprisingly fun and instructive to generate e.g. endgame positions with a certain pawn structure (set low temperature, place some pawns and position the kings, adjust number of pieces to get an endgame), and then figure out how to win vs. the computer in those positions.

I hooked it up so that you can easily play vs. a computer, either via lichess analysis → continue from here, or via my own project Noctie.

I’m thinking about whether I could develop it further to create position variants on a certain theme that the AI thinks I need to practice, or maybe make a PvP feature where you play a random position vs. a human. Ideas or feedback?

Show HN: Chessdream – Generate realistic chess positions with AI
chessdream.ai

Re: Show HN: Chessdream – Generate realistic chess positions with AI

#3
This looks amazing! To generate multiple (almost) equal positions with a given set of pieces can be handy while practicing. I love that there is a way to analyze it on Lichess as well. Would it make sense to export a PGN file of the position as well?

I'm not sure how to put it, but would be great to also include an option to simulate a position with a given opening. For example, 15 moves down the line of playing Queen's Gambit accepted variation with the given pieces on the board would be instructive in learning what's an equal position and how to improve middle game etc. Maybe too hard to implement, I understand.

I saw your submission on r/chess also.

Re: Show HN: Chessdream – Generate realistic chess positions with AI

#4

This looks amazing! To generate multiple (almost) equal positions with a given set of pieces can be handy while practicing. I love that there is a way to analyze it on Lichess as well. Would it make sense to export a PGN file of the position as well? I'm not sure how to put it, but would be great to also include an option to simulate a position with a given opening. For example, 15 moves down the line of playing Quee…

Thanks! Good idea, I could add FEN / PGN export in addition to lichess. I haven't tried conditioning the network on opening but given my training data, that should be possible. For now, you can simulate openings somewhat, by trying to fix pawns and pieces in their typical positions, but it would be better if I could do it like you suggested "QGA, 15–20 moves" etc. I might try this out!

Re: Show HN: Chessdream – Generate realistic chess positions with AI

#5

It sometimes adds too many pieces: https://noctie.ai/play?newGameDialogState_customGame=true&ne... I'm pretty sure black should have at most eight pawns.

This feels like a perfect example of just whacking a neural net on something without actually applying and understanding of the domain and validating things.

Re: Show HN: Chessdream – Generate realistic chess positions with AI

#6
Your software (noctie) was pretty fun to play against, but it's probably no more than ~1600 ELO. Having it assess me as 2574 after beating it was nice on the ego, but a bit silly. The comparison to Lichess ratings also seems a bit off. 2574 ELO is probably much higher than 2809 Lichess unless there's been some serious rating deflation going on over there (been a while since I played on that site).

I assume you're using an accuracy correlation, but those fail in lots of situations. For instance if somebody is substantially better than somebody else, they're probably going to have near 0 pawn loss, but that's only because the opponent never posed any problems to them.

Style issue also tend to break these correlations. E.g. - Capablanca was much more accurate, by this metric, than Kasparov. But that's because Capablanca had an extremely solid style. In reality, he would probably not fare well against Kasparov or most modern super GMs, even though many of them are far less accurate on paper.

Re: Show HN: Chessdream – Generate realistic chess positions with AI

#7

It sometimes adds too many pieces: https://noctie.ai/play?newGameDialogState_customGame=true&ne... I'm pretty sure black should have at most eight pawns.

I wonder whether that could be fixed by using an approach like this [1] [2], to guarantee the model output meets a schema.

[1] https://news.ycombinator.com/item?id=37125118 [2] https://blog.normalcomputing.ai/posts/2023-07-27-regex-guide...

Re: Show HN: Chessdream – Generate realistic chess positions with AI

#9

It sometimes adds too many pieces: https://noctie.ai/play?newGameDialogState_customGame=true&ne... I'm pretty sure black should have at most eight pawns.

There is something wrong with the rendering of the color of pieces : In https://chessdream.ai/?dreamId=ab86d6a2-470a-4238-9181-8b4d3... there are two white kings, and queens. The position is correct though when viewed on Noctie.

Edit : In fact, the kings and queen are neither black or white but a third color : grey

Edit 2: There is probably some issue with the adjust piece count, when opening the same dreamId in multiple windows. As following the same link doesn't have the same number of pieces.

Re: Show HN: Chessdream – Generate realistic chess positions with AI

#10
post #8

It sometimes adds too many pieces: https://noctie.ai/play?newGameDialogState_customGame=true&ne... I'm pretty sure black should have at most eight pawns.

Or two bishops of the same color

That is possible with pawn promotion
Post reply on HN