Each puzzle, as far as I know, has a 5-character code. I would like to know how it is calculated and if it uniquely defines a position. I am not asking if I can search a position using the code. I mean to ask if the code actually encodes a position uniquely. Does lichess use Zobrist hashing or any other known algorithm?
Each puzzle, as far as I know, has a 5-character code. I would like to know how it is calculated and if it uniquely defines a position. I am not asking if I can search a position using the code. I mean to ask if the code actually encodes a position uniquely. Does lichess use Zobrist hashing or any other known algorithm?
you can probably figure this out from the source code on github
you can probably figure this out from the source code on github
<Comment deleted by user>
@pkill said in #3:
github.com/ornicar/lichess-puzzler
This is where I was looking but could not find. I will search more.
@pkill said in #3:
> github.com/ornicar/lichess-puzzler
This is where I was looking but could not find. I will search more.
Of course, I understand that the number of legal positions is enormous, and a 5-character id won't be sufficient. But it could still be useful and unique in practice.
Of course, I understand that the number of legal positions is enormous, and a 5-character id won't be sufficient. But it could still be useful and unique in practice.
<Comment deleted by user>
I would guess it's a hash sum (see on wikipedia: hash function) of the original game where the puzzle is taken from.
I would guess it's a hash sum (see on wikipedia: hash function) of the original game where the puzzle is taken from.
or maybe it's just a random string :)
https://github.com/ornicar/lichess-puzzler/blob/8ba76ed1b81a2e3458b19743a131622f07d2b0ab/bin/migrate-ids.js#L5
@RandomProcess said in #8:
or maybe it's just a random string :)
github.com/ornicar/lichess-puzzler/blob/8ba76ed1b81a2e3458b19743a131622f07d2b0ab/bin/migrate-ids.js#L5
Thank a lot you for the information.
@RandomProcess said in #8:
> or maybe it's just a random string :)
> github.com/ornicar/lichess-puzzler/blob/8ba76ed1b81a2e3458b19743a131622f07d2b0ab/bin/migrate-ids.js#L5
Thank a lot you for the information.