Dear Lichess Tools developers,
I have a question regarding the "Play all variations" feature in Lichess Tools. I want to ensure that I understand how the selection mechanism works:
When no percentage (like prc:90) is provided for a variation, the selection probability is evenly distributed across all available variations. If a percentage is specified using the format prc:x, where x is a number between 0 and 100, I can manually set the selection probability for that specific variation.
If I understand correctly, I should place the prc:x comment directly at the branching move where the variations split, not at the end of the variation. Is that right?
For example:
- Nf3 cxd4 7. Nxc4 ...
a) 7... Bb4 (prc:41 as comment) 8. Bd2
b) 7... Kf6 (prc:35 as comment) 8. 0-0
c) 7... Bc5 (prc:12 as comment) 8. 0-0
Here, the total of all percentages is only 88%. Does the mechanism automatically scale the selection probabilities to 88, meaning it chooses move a) with a probability of 41/88 instead of 41/100?
Thank you for your clarification! :)
Dear Lichess Tools developers,
I have a question regarding the "Play all variations" feature in Lichess Tools. I want to ensure that I understand how the selection mechanism works:
When no percentage (like prc:90) is provided for a variation, the selection probability is evenly distributed across all available variations. If a percentage is specified using the format prc:x, where x is a number between 0 and 100, I can manually set the selection probability for that specific variation.
If I understand correctly, I should place the prc:x comment directly at the branching move where the variations split, not at the end of the variation. Is that right?
For example:
6. Nf3 cxd4 7. Nxc4 ...
a) 7... Bb4 (prc:41 as comment) 8. Bd2
b) 7... Kf6 (prc:35 as comment) 8. 0-0
c) 7... Bc5 (prc:12 as comment) 8. 0-0
Here, the total of all percentages is only 88%. Does the mechanism automatically scale the selection probabilities to 88, meaning it chooses move a) with a probability of 41/88 instead of 41/100?
Thank you for your clarification! :)
Additionally, is it possible to set selection probabilities for chapter selection in a study, similar to how it works for moves in a variation?
Additionally, is it possible to set selection probabilities for chapter selection in a study, similar to how it works for moves in a variation?
Hi!
So for your first question, the answer is yes. You have to place the prc:N text in the first move that starts the variation, where N is a number from 0 to 100. And yes, the mechanism will scale.
But also remember that if you don't specify the prc, the number of variations in the PGN for certain depth is used to auto determine the probability. That depth is configurable:
https://i.imgur.com/An5Jrw6.png
For your second question, I am not sure I understand it :) What do you mean probabilities for chapter selection? For the random chapter button? If yes, then I am afraid that functionality does not exist and can't easily be implemented, as there is no simple API to get comments from arbitrary chapters, only for the currently selected one.
Hi!
So for your first question, the answer is yes. You have to place the prc:N text in the first move that starts the variation, where N is a number from 0 to 100. And yes, the mechanism will scale.
But also remember that if you don't specify the prc, the number of variations in the PGN for certain depth is used to auto determine the probability. That depth is configurable:
https://i.imgur.com/An5Jrw6.png
For your second question, I am not sure I understand it :) What do you mean probabilities for chapter selection? For the random chapter button? If yes, then I am afraid that functionality does not exist and can't easily be implemented, as there is no simple API to get comments from arbitrary chapters, only for the currently selected one.
The first answer about the prc:N works perfectly for me, so that's great!
As for the second question, yes, I was referring to the random chapter button. I would really need a function where I can set the selection probability for each chapter individually. This would be extremely useful for me, especially for my opening repertoire study, which has 50 chapters. If I can only assign whole percentages, it would be too coarse because I would end up having to give most chapters 1%, even though some should only have, for example, 0.2%, and others should have 7%. Otherwise, I would quickly go over 100%.
I know this might be a complex challenge, but I would be incredibly grateful if it could be implemented! Maybe there’s a way to add a comment to the entire study that contains the selection probabilities for the chapters? Or could there be another method to manually set the chapter selection probabilities in a study? Perhaps even using a special command outside the normal API?
I’m not a programmer, so I can’t solve this issue myself, and it seems quite difficult. But maybe there’s a way you could work around it? I would appreciate any help or solution you could offer!
Thank you again for your amazing work!
The first answer about the prc:N works perfectly for me, so that's great!
As for the second question, yes, I was referring to the random chapter button. I would really need a function where I can set the selection probability for each chapter individually. This would be extremely useful for me, especially for my opening repertoire study, which has 50 chapters. If I can only assign whole percentages, it would be too coarse because I would end up having to give most chapters 1%, even though some should only have, for example, 0.2%, and others should have 7%. Otherwise, I would quickly go over 100%.
I know this might be a complex challenge, but I would be incredibly grateful if it could be implemented! Maybe there’s a way to add a comment to the entire study that contains the selection probabilities for the chapters? Or could there be another method to manually set the chapter selection probabilities in a study? Perhaps even using a special command outside the normal API?
I’m not a programmer, so I can’t solve this issue myself, and it seems quite difficult. But maybe there’s a way you could work around it? I would appreciate any help or solution you could offer!
Thank you again for your amazing work!
The only alternative I can think of, although it’s not a good one, would be to manually combine all the variations from the 50 chapters into one or two chapters (one with all the White variations and one with all the Black variations). But that would be an enormous effort! Additionally, I’m worried that Lichess might not even be able to handle such a large chapter. Could that be the case? I mean, I would be merging the variations and subvariations from 25 other chapters into one! That would be around 25,000 characters, as each chapter's PGN file has an average of about 1,000 characters.
The only alternative I can think of, although it’s not a good one, would be to manually combine all the variations from the 50 chapters into one or two chapters (one with all the White variations and one with all the Black variations). But that would be an enormous effort! Additionally, I’m worried that Lichess might not even be able to handle such a large chapter. Could that be the case? I mean, I would be merging the variations and subvariations from 25 other chapters into one! That would be around 25,000 characters, as each chapter's PGN file has an average of about 1,000 characters.
Actually, it's not a big effort at all. You can merge games in PGN Editor :)
Another option is to add a prc:X string in the chapter title, but I feel like that's overkill.
Actually, it's not a big effort at all. You can merge games in PGN Editor :)
Another option is to add a prc:X string in the chapter title, but I feel like that's overkill.
Yes, but that doesn’t really solve the problem, because I can't just merge the chapters in a PGN Editor. The chapters start with different positions, and the merging process would need to automatically recognize when a position from one chapter occurs and then merge from there. That seems far too complex, right?
Additionally, if I merge everything, I’d lose the chapter titles, which are important because each chapter has a specific opening variation name.
For these reasons, it would be much better for me if you could implement the prc:x string for chapters. I know it might be overkill, but compared to the tedious manual merging of chapters, which would be a huge effort, it seems like the lesser evil.
Yes, but that doesn’t really solve the problem, because I can't just merge the chapters in a PGN Editor. The chapters start with different positions, and the merging process would need to automatically recognize when a position from one chapter occurs and then merge from there. That seems far too complex, right?
Additionally, if I merge everything, I’d lose the chapter titles, which are important because each chapter has a specific opening variation name.
For these reasons, it would be much better for me if you could implement the prc:x string for chapters. I know it might be overkill, but compared to the tedious manual merging of chapters, which would be a huge effort, it seems like the lesser evil.
The PGN Editor merging does that indeed. It looks for positions where to merge various chapters. But sometimes there are no common positions, like in puzzle studies. I know that's not a solution.
So would you be OK to having a rand:X string in the chapter title? I find it a bit ugly. I don't know of another solution for this, though.
The PGN Editor merging does that indeed. It looks for positions where to merge various chapters. But sometimes there are no common positions, like in puzzle studies. I know that's not a solution.
So would you be OK to having a rand:X string in the chapter title? I find it a bit ugly. I don't know of another solution for this, though.
In my study, each chapter has at least one position in common with another chapter, so there is overlap (though for 25 chapters from White’s perspective and the others from Black’s perspective), so merging might work. However, it would probably still be chaotic. How would I see where the merges happened so that I could set the prc:x for each case? Plus, I’d lose the chapter titles. So, this seems like a suboptimal solution.
Yes, of course, I’d be fine with having a rand:X string in the chapter title. It wouldn’t be visible later, right? My main goal is to solve the problem, no matter how ugly the solution may be ;) as long as it works!
In my study, each chapter has at least one position in common with another chapter, so there is overlap (though for 25 chapters from White’s perspective and the others from Black’s perspective), so merging might work. However, it would probably still be chaotic. How would I see where the merges happened so that I could set the prc:x for each case? Plus, I’d lose the chapter titles. So, this seems like a suboptimal solution.
Yes, of course, I’d be fine with having a rand:X string in the chapter title. It wouldn’t be visible later, right? My main goal is to solve the problem, no matter how ugly the solution may be ;) as long as it works!
Dear TotalNoob69,
I wanted to let you know that I’ve tried merging the PGNs using the Lichess PGN Editor, and it worked successfully. While this approach does indeed result in the loss of chapter titles and the positions now always start from move 1 (whereas some chapters originally began at move 5, for example), it’s manageable. Practicing from move 1 is acceptable for me.
However, I still have a concern regarding the automation of the prc:N command without having to use Ctrl or any other keyboard shortcuts. The current process is somewhat cumbersome, and having to manually activate this feature each time is not ideal.
Would it be possible to implement a system where the prc:N command is automatically recognized and applied to each move without requiring additional keystrokes? I understand this might be a complex request, but it would significantly streamline the use of probability settings in studies and analyses.
Thank you for your assistance and for considering this enhancement.
Dear TotalNoob69,
I wanted to let you know that I’ve tried merging the PGNs using the Lichess PGN Editor, and it worked successfully. While this approach does indeed result in the loss of chapter titles and the positions now always start from move 1 (whereas some chapters originally began at move 5, for example), it’s manageable. Practicing from move 1 is acceptable for me.
However, I still have a concern regarding the automation of the prc:N command without having to use Ctrl or any other keyboard shortcuts. The current process is somewhat cumbersome, and having to manually activate this feature each time is not ideal.
Would it be possible to implement a system where the prc:N command is automatically recognized and applied to each move without requiring additional keystrokes? I understand this might be a complex request, but it would significantly streamline the use of probability settings in studies and analyses.
Thank you for your assistance and for considering this enhancement.