benini / scid

Other
43 stars 12 forks source link

Question about identifying novelty #122

Closed tomyan7950 closed 1 year ago

tomyan7950 commented 1 year ago

Dear Fulvio,

Hello, my name is Tom Taiyi Yan and along with Blaine Landis , we are two organizational psychologists from University College London. We are both massive fans of SCID because we are chess enthusiasts ourselves and more importantly, we are now working together on a research project examining when and why individuals engage in creative problem-solving and innovation. We believe chess is the perfect context to study this because there is already this idea of "novelty moves" in chess theory.

Of course, this is where SCID comes in, you already built an amazing algorithm to identify "novelty moves"! We are so thrilled about this but we are not very familiar with C++ and the tcl/tk framework (we are more python users) so we wonder if we could ask a couple of quick questions? Thank you so much for your time.

  1. In collaboration with Opening Masters, we need to write code to identify novelty moves in a very large dataset of chess games (~9 million games) so it's not realistic for us to click through SCID's GUI interface millions of times. Is it possible for us to interact with SCID with command line in a programmatic fashion? My apologies if this is a rookie question.

  2. If that's not possible, would it be too much trouble to ask you to point us to the algorithm you developed to identify novelty so that we might hope to recreate it in Python? Thanks for the open-source nature of SCID, we've tried to search through the depository but again because of our lack of experience, we aren't sure if we are even looking in the right direction.

Thank you so much for your consideration and time. You are doing AMAZING work. If you could help us, we would be more than happy to include you and SCID in our research acknowledgements!

You can contact me at tom.taiyi.yan@ucl.ac.uk, or tom.taiyi.yan@gmail.com. Looking forward to hearing from you :)

Best, Tom

benini commented 1 year ago

Dear Tom Taiyi Yan and Blaine Landis,

Thank you for your kind words and interest in SCID. It's great to hear that you're leveraging chess as a tool for your research in creative problem-solving and innovation.

To address your second question first, the novelty identification algorithm is located in the tkscid.cpp file, starting at line 3219: https://github.com/benini/scid/blob/github/src/tkscid.cpp#L3219. It works by advancing through each move of a game, and at each position, it checks how many games in the database reach that position. The first position that is reached by only one game (the current one) is considered a novelty. If the olderGamesOnly option is enabled, it only counts games that were played before the date of the current game​.

Regarding your first question, yes, it is possible to interact with SCID from the command line in a programmatic way. You can write scripts using Tcl, the scripting language that SCID is built with, and run them through SCID. Here is an example of a script that extracts tactical positions from a database: https://github.com/benini/extract_tactics/blob/main/extract.tcl.

ChatGPT is capable of writing Tcl scripts and with the right prompt, it may be able to write the script you need. The command "sc_game novelty" moves the game to the first unknown position and "sc_game UCI_currentPos" returns the moves leading to that position.

Good luck with your research project.

tomyan7950 commented 1 year ago

Hi Fulvio,

Great to hear from you and thank you SO MUCH for your amazing help!

What we’ve learned from doing this research is that the chess community is genuinely so sophisticated and so collaborative it honestly inspires us to be even more committed to this work and pay the good will forward.

Thanks again and have a wonderful day!

Best, Tom


From: Fulvio Benini @.> Sent: Saturday, May 27, 2023 9:53:36 AM To: benini/scid @.> Cc: tomyan7950 @.>; Author @.> Subject: Re: [benini/scid] Question about identifying novelty (Issue #122)

Dear Tom Taiyi Yan and Blaine Landis,

Thank you for your kind words and interest in SCID. It's great to hear that you're leveraging chess as a tool for your research in creative problem-solving and innovation.

To address your second question first, the novelty identification algorithm is located in the tkscid.cpp file, starting at line 3219: https://github.com/benini/scid/blob/github/src/tkscid.cpp#L3219. It works by advancing through each move of a game, and at each position, it checks how many games in the database reach that position. The first position that is reached by only one game (the current one) is considered a novelty. If the olderGamesOnly option is enabled, it only counts games that were played before the date of the current game​.

Regarding your first question, yes, it is possible to interact with SCID from the command line in a programmatic way. You can write scripts using Tcl, the scripting language that SCID is built with, and run them through SCID. Here is an example of a script that extracts tactical positions from a database: https://github.com/benini/extract_tactics/blob/main/extract.tcl.

ChatGPT is capable of writing Tcl scripts and with the right prompt, it may be able to write the script you need. The command "sc_game novelty" moves the game to the first unknown position and "sc_game UCI_currentPos" returns the moves leading to that position.

Good luck with your research project.

— Reply to this email directly, view it on GitHubhttps://github.com/benini/scid/issues/122#issuecomment-1565287270, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARN2VMLO72BNCGAII2KZOH3XIG6JBANCNFSM6AAAAAAYQCKTVI. You are receiving this because you authored the thread.Message ID: @.***>