lichess.org
Donate

Exploring the python-chess module

I like the opening statement of tangential learning objective. Good application of attention engagement not always having to be directly on the learning objective, but allowing it. In other words carrots.

I would like to know you opinion or impression about the relevance of getting familiar with python-chess, if intending to work with position databases (not necessarily huge, and not chess books) linked also as games with all attached related data. In order to break free of chess speciality database software toward more mainstream relation databases, and eventually graph databases like neo4j, where one could ask new questions of the data, that are not typically the user case of traditional chess software. I would have to learn a bunch, but wonder it I could avoid non-efficient paths given limited amount of time to put on such learning before getting to the gist of the interesting data questions.

Would I be able from python chess to dispatch data being processed like grinding PGNs into position pair databases, and are there already libraries to connect to other software standard database formats..

All of which I might have to get familiar with again. Are there home computing concerns hidden in my ask.
@dboing said in #4:
> I like the opening statement of tangential learning objective. Good application of attention engagement not always having to be directly on the learning objective, but allowing it. In other words carrots.
>
> I would like to know you opinion or impression about the relevance of getting familiar with python-chess, if intending to work with position databases (not necessarily huge, and not chess books) linked also as games with all attached related data. In order to break free of chess speciality database software toward more mainstream relation databases, and eventually graph databases like neo4j, where one could ask new questions of the data, that are not typically the user case of traditional chess software. I would have to learn a bunch, but wonder it I could avoid non-efficient paths given limited amount of time to put on such learning before getting to the gist of the interesting data questions.
>
> Would I be able from python chess to dispatch data being processed like grinding PGNs into position pair databases, and are there already libraries to connect to other software standard database formats..
>
> All of which I might have to get familiar with again. Are there home computing concerns hidden in my ask.

Your questions are interesting but complex and I am not sure I am the most qualified person to answer them. So take my views with a pinch of salt.

Also I will probability cover stuff you already know but I prefer it like that as it can also be helpful to other people.

Python-chess fundamentally will allow you to read games/positions, play thought games and analyze games/positions with an engine. Everything else you would probably have to build yourself.

Having said that, if you already know python, learning to use python-chess wouldn't be a big effort.

There are modules in python to deal with different types of databases. You can find a good overview here: www.apriorit.com/dev-blog/web-python-libraries-for-database-management.

I would imagine that the most used chess software are ChessBase and SCID.

ChessBase sells it's megadatabase and others, but you can create a ChessBase database from PGNs. ChessBase software itself is also not free.

SCID is free and open source, doesn't come with any database and it would have to be created from PGNs.

A good source of games is The Week in Chess (theweekinchess.com) and you could get games from 25/06/2012 for free.

I have no idea how chess games are stored in chessbase or SCID databases (although since SCID is open source you could probably find out). Hence I don't know if those formats would be suitable for your needs. They are both quite fast when searching for a given position. They wouldn't be able to relate positions that are similar but not the same, similar pawn structures and things like that.

In conclusion I don't think what you want exists and python-chess probably wouldn't help you very much.
I find salt might be a relic from ancient times that stuck to our culinary cultures, but with multilateral thinking is always needed.

Words need detours that might distract from the meaning when the dust settles, meaning that was the sought after thing anyway. I have a love hate relationship with language, specially the string concatenation kind. It feels often like a 3D printing process when ones is trying to point to the final product. Anyway. thanks for your answer. Right on, thinking multiple audience and not helpdesk is something I also try to aim at, with probably mixed results.

I was thinking the R programming version might be my best bet. I do not wish to learn a new full programming language to get to do things I can already understand need doing. You answer is perfect. I wanted to avoid the specialty software that you describe, but that is good that you made it explicit. Thanks for your point of view, I was already going in that direction.

from scratch using things I can deal with already, is still best to do it seems. (All those past ideas about not reinventing the wheel, e.g. object programming mission statements, and what not, and we are still needing to build our own building blocks, it never ends).

SCID SCID vs PC both now have 2023 updated versions (I have difficulty cerning** the differences, both GUI seem to have fixed the font to windows sizes old problems, something about dpi nightmare). I have not checked for what was updated as I would need to learn each of them. On the content side, they are catering to individual uses of chess databases. And that might be my fundamental problem with a lot of chess software user case.

** dictionary.cambridge.org/us/dictionary/french-english/cerner
(the figurative meaning, can't find the English word for it).