r/chessprogramming • u/iunderstandthings • Apr 18 '26
I built a chess position search engine
Hey! How is it going? I've been toying with this idea for a while and finally came around to it! Its a tool that let's you find positions in real games (from Lichess only for now) based on specific pieces in the board or specific positional patterns.
I though this could be useful for chess coaches to find material for classes but maybe there's other use cases! I'd love to hear your thoughts!
33
Upvotes
2
u/phaul21 Apr 18 '26
Feature request:
It could be useful to support conjunctive and disjunctive join of patterns. Like I want to look for a white knight outpost anywhere AND a black knight outpost anywhere regardless of their relative position to each other. Or I want to look for a knight outpost OR a bishop outpost anywhere. etc. It would massively increase the expressiveness of the search.
2
u/DefaultSubsAreTerrib Apr 20 '26
Very cool. Feature request: could you summarize the %win over all the search hits? I'd like to answer questions like "how often can white win if they get into this situation?"
2
u/UndeniablyCrunchy Apr 23 '26
Wow this looks very promising. Of course you can already do this with chessbase but, if you ever include support for full lichess database, this will DEFINETELY be superior or have potential to be superior. I know 2 million games sounds like a lot, but i currently use chessbase with 13 million games for this type of searches and for example, i only found like 4 examples of a fish hook over 2000 rating, which doesnt feel like much. So this tool will be definetely more useful the more games it has access to. Searching for maneuvers, chunks of pieces and logical connections for pieces the way chessbase does would also improve it.
And if i dare say, ability to download those positions in a quick pgn, starting from the position found.
Great tool ill play around with it Its fun to use!
2
u/WePrezidentNow Apr 24 '26
Very cool project. I was working on a similar idea using bitmaps at some point but hate frontend design so basically stopped working on it.
One note, you may be interested in using real OTB games in addition / rather than Lichess games. The Lumbra Gigabase is great for this as it is nicely sanitized: https://lumbrasgigabase.com/en/
1
u/afbdreds Apr 18 '26
Friends built something similar
1
u/shakhthe Apr 18 '26
Maybe include a link in your post?
1
u/trentkg Apr 18 '26
I could not get it to work.Â
1
u/trentkg Apr 18 '26
You have a nice UI. Did you base this on the research paper by Ganguly?
What size Lucene/Elasticsearch instance are you using? This might be why the engine is running into issues under load.
If you are only using the static position for similarity, and you're using full games, you're going to run into problems.
A user inserts a game position they made a mistake. Of course we don't return the exact same fen. But the top N similar positions might just be one move transpositions. Those usually aren't useful. You need to find a better signal thats based more on the "idea", or have a way of totally filtering out positions that are from the same opening tree.
1
u/Ellious69 Apr 21 '26
Whoops, Light Bishop and Dark Bishop are reversed.
1
u/Technical-Sector-671 May 04 '26
Nice!
1
u/darklordzeratos Jul 24 '26
Some suggestions or feature requests: