lichess.org
Donate

Learning openings with bots ?

Lately I had been using memchess.com to learn openings. It was nice, but sadly the website has been down lately. I wish lichess had a similar feature, that is using spaced repetition to learn openings.

en.wikipedia.org/wiki/Spaced_repetition

I thought about creating a bot for that, but before I try I should ask if there are any existing already, and if someone has ever tried it.

There would be a bot for each specific opening, with the name of the bot indicating what it plays. Like for instance BlackKID (for a bot always playing the Kings Indian Defense as black).

The bot would only play moves in its library, offers draw when its opponent played an unexpected move, and resign when the opponent played all the moves all the way to the leaf of the branch tree.

The bot would also keep a record for each of its opponents in order to implement the spaced repetition algorithm for each of them.
I wanted to reply to this also but I couldn't do it at the time because I had to start playing some games. I, too, was really interested in memchess (until recently). I see a lot of these advanced tutorials and in the analysis, you can see the opening. Is anyone here that would be against me or grondilu from building this?
memchess was great and I hope that either they find hosting capacity or they release their source so someone else may host it...
#1 Awesome idea, I would love to have such a feature on the Lichess. So far I have been using Chess Position Trainer, but some positions are not showing in training, even though they are marked as a candidate moves from my side.
The idea is nice, but it raises several questions that would need to be worked out.

1. What specific line of the opening would the bot play (i.e., only the main line, or variations thereof?), and how would the person playing the bot know that? As an extreme example, I'm not sure a bot named "Scillian Defense, Richter-Rauzer Variation, Neo-Modern Variation, Early Deviations" (or using your naming format, "BlackScillianDefenseRichterRauzerVariationNeoModernVariationEarlyDeviations") would be terribly practical to find or to play. In addition, there are over 400 openings in the ECO (which I'm guessing you would use as a reference)--so who is going to create, maintain, troubleshoot, etc. 400 bots? Will Lichess even approve of having 400 bots added to its site? I doubt it.

2. If the other approach is taken (having one bot named BlackScillianDefense, for instance, that plays any given variation of the Sicillian), then for how many moves does the bot play for before resigning? 10? 20? The Lichess opening book automatically cuts out at 25, should we end it there? If that is the case, there are hundreds of potentially valid openings, such that trying to categorize them all and deem certain ones to be "right" and other ones to be "wrong" would be impossible.

3. You'll also very quickly run into the issue of usernames already being taken. Case in point: BlackKID is already registered as a username. What will you do in that case?

4. You say that the bot will offer a draw if the opponent plays an unexpected move. What happens if the player declines the draw? Will the bot simply freeze? Play on? Resign? (And if the lattermost option, what's the point of it offering the draw to begin with?)

5. You also say that the bot will keep a record for each opponent it plays. First off, there are currently about 18,700 players on Lichess currently, and if just 0.1% of them play 10 games against your bot within the next year, you're going to have to store 1,870 data points. Where are you going to store these? Will you keep these synced between all 400 bots, and if so, how? And if a player, say, changes the capitalization of their username, how will you deal with that? What about if a player closes their account?

So yes, while the idea is nice, I currently believe the idea is probably infeasible (or at least unnecessarily complicated, considering that, as mentioned above, websites like listudy.org already exist).
#6

1. Indeed having one bot for each variation seems impractical. The bot needs to be able to play a complete repertoire. There needs to be a way for its opponent to select a sub repertoire. A command interface through the in-game chat can be considered, but it would be a hassle to learn, and people don't like command interfaces these days.
I'm sure there can be a simple solution. What about the take back option ? Like you play 1.e4 the bot plays 1...e6 but you felt like learning the Sicilian. Then you offer a take back, the bot accepts, plays something else and remembers your dislike for the French.

2. The cutoff would be kind of arbitrary. That's already how opening books are made anyway.

3. This bot naming scheme I suggested was a bad idea, indeed. All information about the bot should be on its lichess page, as for all bots.

4. The draw offer idea is not particularly useful. The bot could just not play, let its clock run for down or something. It could also say in the chat : "I don't have this move in my book" There are several ways to deal with this.

5. Don't bots necessarily run on a machine somewhere anyway ? It should not cost much in terms of memory to store opening preferences and spaced repetition relevant data for each opponents.

Regarding listudy, I've tried it and I don't like it at all. I very much preferred memchess.
Hello, I am playing with my bot without opening book, I don't know how it is configured, the parameters, where they go etc, who can help me with that? thanks
Hi all and sorry for the late reply,

I wanted to point out that most of the points that I think would be considered solved using AWS DynamoDB. Each username on lichess is a unique identifier based on what Nel_S points out. Furthermore, another NoSQL database is used for storing unique identifiers on the ECO. I have an automated script that updates this routinely. Further implementation details can be discussed over PM.

The "trick", if you will, is interfacing these storage points with, let's just say it's a much-simplified version of AlphaZero. But, the main takeaway is that there isn't a need to store data points on the lichess mainframe and there need only be one, maybe two bots. No stupid names like blacksicilliandefensewhateverelsemaygohere.

Hope this explains better my implementation. Thanks.

This topic has been archived and can no longer be replied to.