Using the lichess API and lichess embedded games to create something great
This blog is about GeoChessr, a free and open source chess piece location guessing game made possible by lichessThe amazing thing about free software like lichess is not just the amazing chess playing platform it provides, but also that it enables others to build on it to make their own ideas a reality. Over time I've seen many such great examples like pychess , which lets you play all kinds of wild chess variants, or lidraughts , bringing the magic of lichess to the draughts community.
But a few weeks ago, I realized that it was time for me to seize that opportunity. A few friends and I came up with the idea of GeoChessr on discord: We would send each others screenshots of small areas of the board from chess games on lichess and then have the others guess where on the board the screenshot was made. Given how fun this was, I realized that this is actually a great idea for a game. So I sat down with some AI coding tools and got going and made this into a real game. GeoChessr.io was born.

But to keep my game fresh, I need a constant supply of games. Using the lichess API , I grab the newest lichess games from tournaments played that day each night, to automatically create a new daily run. Now after I attempt to solve GeoChessr puzzle, especially when I fail, it is always the most fun to explore how the players got their pieces into this position I did not expect. Normally, to make this possible on geochessr.io, I would have to write a whole chess game engine for that. However, thanks to lichess embedded games , I can just show the user the game from lichess directly on my website, initialized to the move where to position of the puzzle appeared.
Overall, this is just an appreciation post for free and open source software and software that is designed to let others build on it. Right now I still don't know if GeoChessr will ever become popular or if it will stay a niche thing that my friends and I enjoy. In any case, it was worth the journey. Btw. all the source code of GeoChessr is of course also published under and open source license at https://github.com/yannikkellerde/geochessr
