Skip to content

Remove non-existent opening from starting positions #638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

benediktwerner
Copy link
Member

@benediktwerner benediktwerner commented Mar 14, 2025

This used to be known as "Nimzo-Indian Defense: Sämisch Variation, Accelerated" but was removed from the openings db in lichess-org/chess-openings#219.

This starting position therefore now resolves to an empty optional and isn't actually used.

Side note: This actually caused the order of all the daily opening tournaments to be reshuffled completely.

This used to be known as "Nimzo-Indian Defense: Sämisch Variation, Accelerated"
but was removed from the openings db in lichess-org/chess-openings#219.

This starting position therefore now resolves to an empty
optional and isn't actually used.
@lenguyenthanh
Copy link
Member

thanks! did you use sync-openings.py to sync it or just removed it manually?

@benediktwerner
Copy link
Member Author

sync-openings.py only syncs openings, not the starting positions, no? Hence why it has to be removed manually now and wasn't already removed when the opening was removed and synced previously.

@lenguyenthanh
Copy link
Member

oh, I didn't know that, maybe we should have a way to derive starting position from openings db instead of hard coding it.

@lenguyenthanh lenguyenthanh merged commit 4512821 into lichess-org:master Mar 14, 2025
3 checks passed
@benediktwerner
Copy link
Member Author

Yeah, it definitely doesn't seem like a bad idea to improve this somehow. But the starting positions aren't part of the openings db, so it can't really be synced. And not sure there's a good way to automatically select openings.

But I guess what might make sense is a test that checks that all the starting positions are still valid openings? A very simple option would be to just check that the size of StartingPosition.featurable is 129. That way, we'd at least immediately see when an opening sync removes an opening that's used as a starting position and can then consider whether we want to remove it as a starting position or maybe rather keep the opening in some form. Although just comparing the length ofc doesn't show which opening was removed. But at least with the current implementation, it's not really possible to automatically determine which starting positions are not valid openings since they are already immediately removed via the .flatten when creating the starting positions list.

@benediktwerner benediktwerner deleted the remove-removed-opening-from-starting-positions branch March 14, 2025 10:10
@lenguyenthanh
Copy link
Member

yeah, tests should be a good starting point.
p/s I'm releasing a new version for this pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants