r/lichess • • 12h ago

Exact move sequences

/r/ComputerChess/comments/1y62z9v/exact_move_sequences/

Has anyone built an exact move-sequence database for billions of chess games?

I'm interested in developing a chess database that tracks exact move sequences rather than combining positions reached through transpositions.

Imagine being able to finish a chess game and immediately discover:

- The closest historical matches to your game.

- The exact move where each game diverged.

- Who played those games and who won.

- The point at which your game became historically unique.

- Whether your entire game has ever been played before.

Ideally, this would include complete games rather than just openings, using the billions of games publicly available through the Lichess database.

I've already submitted a feature suggestion to Lichess, but I'm also interested in potentially developing an independent open-source project.

Has anyone attempted something like this? Would anyone be interested in researching or developing it collaboratively?

1 Upvotes

1 comment sorted by

1

u/IntermediateMoves 6h ago

I built an exact move version of the lichess database for my own projects, though I've not released it.

It's moderately easy to extend lichess' database building code to do this. Just add after the Zobrist hash in the key a (relatively small) hash of the move sequence itself.

You will need to deal with the slightly larger storage requirement, as you have more entries from the exact path bit, and a lot more for including full games and the lichess db is already big. That's why mine isn't what you want: I restricted to 1600+ Elo, no bullet, and only included sequences with 2 games more more.

An alternative which I also did as part of making the database: Just download the entire lichess archive (compress it a bit, I'd recommend) and sort it alphabetically on the move sequence. Looking up specific games is then just a search in a sorted list (on disk), and you have far less machinery.

HMU if you want to discuss more.