nguyenpham / ocgdb

Open Chess Game Database Standard (OCGDB)
MIT License
31 stars 8 forks source link

Is there a version for xiangqi available? #37

Open agogugu opened 5 months ago

agogugu commented 5 months ago

Hi Pham, my name is Agostino. I'm a fun of xiangqi game. My wife is GM Lin Ye 1981 Chinese xiangqi Champion and 1997 World xiangqi Champion. I think it would be very great if you could write an Open Chess Game Database (OCGDB) version for xiangqi. Do you think it's possible?

Best whishes

Agostino

nguyenpham commented 5 months ago

Wow, good information about your wife GM! I have found two games by your wife from my databases.

OCGDB could be used directly for Xiangqi. What we need is a standard for Xiangqi only - how to encode and decode Xiangqi moves into/from 2 bytes. I will publish a guide about that, to avoid there being so many sub-standards.

I have been developing two freeware using OCGDB for Xiangqi, one for desktop computers (Windows/Mac/Linux) and one for iOS (there is not yet for Android). They just need a few steps/shiny works before release.

ocgdb-ios

ocgdb-mac
agogugu commented 5 months ago

Hi Nguyen Pham, thank you for your nice answer.

From what I understood from your email, OCGDB can already be used as a database for storing xiangqi games. Great! So the only caveat is to use a standard for inserting the moves of a xiangqi game into the OCGDB database. (In this case a guide would really be useful). By the way, can EGTB also be used as a database for xiangqi games by giving the FEN of an initial game pretending it's a "puzzle"? I'm looking forward to seeing and getting the freeware for windows in order to use the OCGDB database. Will it be just a freeware or will it also be an open source? I use Visual Studio 2022. Do you have a ".sln" file for Visual Studio in order to compile OCGDB?

I'm glad you have 2 Ye games in your database. We published a book in English with 60 of her (annotated and commented) games.

[image: image.png]

(If you wish, I can send you some Ye games.)

Finally, I have to tell you that you are a chess programming legend to me. If I'm not wrong, you wrote a great program: Saola! Furthermore, many years ago I studied all the C++ and Pascal code you wrote about xiangqi.

I'm really looking forward to getting the application for OCGDB (and maybe also for EGTB?). It would be kind of you to let me know as soon as it becomes available.

Thanks so much again. Greetings

Agostino Guberti

On Sat, Feb 17, 2024 at 1:10 PM nguyenpham @.***> wrote:

Wow, good information about your wife GM! I have found two games by your wife from my databases.

OCGDB could be used directly for Xiangqi. What we need is a standard for Xiangqi only - how to encode and decode Xiangqi moves into/from 2 bytes. I will publish a guide about that, to avoid there being so many sub-standards.

I have been developing two freeware using OCGDB for Xiangqi, one for desktop computers (Windows/Mac/Linux) and one for iOS (there is not yet for Android). They just need a few steps/shiny works before release.

ocgdb-ios.jpeg (view on web) https://github.com/nguyenpham/ocgdb/assets/1370755/b9ceca13-ea99-4345-a544-4f4d40cba4d3 ocgdb-mac.png (view on web) https://github.com/nguyenpham/ocgdb/assets/1370755/2f4b5b62-42c0-474b-b763-59073c672cbc

— Reply to this email directly, view it on GitHub https://github.com/nguyenpham/ocgdb/issues/37#issuecomment-1950008422, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6ARYDAFJHQT4MCOERYD5X3YUCM2VAVCNFSM6AAAAABDG2AS36VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJQGAYDQNBSGI . You are receiving this because you authored the thread.Message ID: @.***>

nguyenpham commented 5 months ago

For quick comparison we can consider that OCGDB is equally to PGN. What you can do with PGN you can do with OCGDB. If you can store your puzzles with PGN, you can do the same with OCGDB.

However, sometimes people want to store chess positions in the form of EPD. We have create a new database format for that type. The SQLite file will have the extension of .epd.db3. Sometimes I see it is good for storing puzzles too. You may read more here:

https://talkchess.com/forum3/viewtopic.php?f=7&t=78464&start=280#p927684

The code of EPD format have been pushed here for long time. However, I forgot (and was lazy) to update the standard.

All code here is pure C/C++ 17. They don't have the GUI code and can integrate into any C/C++ project in any OS, including Visual Studio ones. Just add the code into your project and then add all files. They should be compiled easily.

Thank a lot about good words to me!!!

Yes, I love to have those games of your wife, as well any games from high rank Xiangqi players. I have been building a new database too. Just sen them to me and thank a lot in advance. If you could, please translate all player names into Latin words since I can't read Chinese.

agogugu commented 5 months ago

Hi Nguyen Pham, thank you for your kind answer. I will send you the games that we used for the Lin Ye book in one or two weeks. (I need to select and re-arrange them). Looking at the image of the link you sent me ( https://github.com/nguyenpham/ocgdb/assets/1370755/b9ceca13-ea99-4345-a544-4f4d40cba4d3 ) some questions come to my mind:

1) Does your app manage variations and sub variations + comments? And if it does, do you use a tree or a graph for the nested variations? 2) What do you use to classify the openings? Does your app manage it? And if it does, how? 3) Is your database of xiangqi games public?

I'll try to compile your OCGDB program with visual studio. I already did it successfully for EPD code.

Well, that's all at the moment.

Best wishes Agostino

On Tue, Feb 20, 2024 at 2:06 PM nguyenpham @.***> wrote:

For quick comparison we can consider that OCGDB is equally to PGN. What you can do with PGN you can do with OCGDB. If you can store your puzzles with PGN, you can do the same with OCGDB.

However, sometimes people want to store chess positions in the form of EPD. We have create a new database format for that type. The SQLite file will have the extension of .epd.db3. Sometimes I see it is good for storing puzzles too. You may read more here:

https://talkchess.com/forum3/viewtopic.php?f=7&t=78464&start=280#p927684

The code of EPD format have been pushed here for long time. However, I forgot (and was lazy) to update the standard.

All code here is pure C/C++ 17. They don't have the GUI code and can integrate into any C/C++ project in any OS, including Visual Studio ones. Just add the code into your project and then add all files. They should be compiled easily.

Thank a lot about good words to me!!!

Yes, I love to have those games of your wife, as well any games from high rank Xiangqi players. I have been building a new database too. Just sen them to me and thank a lot in advance. If you could, please translate all player names into Latin words since I can't read Chinese.

— Reply to this email directly, view it on GitHub https://github.com/nguyenpham/ocgdb/issues/37#issuecomment-1954178036, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6ARYDDZ5Z7YA4DFLFDQCPLYUSNVTAVCNFSM6AAAAABDG2AS36VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJUGE3TQMBTGY . You are receiving this because you authored the thread.Message ID: @.***>

nguyenpham commented 5 months ago

1) Yes. Recently all my apps (BanksiaGUI, new apps for iOS) can work with variations. I just use a simple solution, quite similar to parenthesises in PGN for storing variations. However, the code is tricky to work with. I have just implemented recently, thus there is no update for OGCDB. I may mention as a part of the standard I don't have any Xiangqi game with variations at the moment, you may see the one for chess

2) Chess has ECO system. Xiangqi has ECCO (Encyclopaedia of Chinese Chess Openings). The ECCO is in both English and Chinese. I have added Vietnamese

3) I have been collecting games for building a new Xiangqi database. Thus it has not been published yet. The hard point I can't use ones with player names in Chinese since I can't read them as well as my friends. If there is a dictionary for referencing between Chinese and Latin/English names it will be so useful for me

IMG_4638

IMG_4636

agogugu commented 5 months ago
  1. Interesting :-)
  2. I know Xiangqi has ECCO. As a matter of fact there exist two different ECCO classifications (unfortunately). The first from A00 a E48. The second from A01 to D20 + N02 for the horse openings + P01 and P02 for the pawn openings. What I'd like to know is: does your application automatically classify a game with the correct ECCO opening name? And if it does, how did you do?
  3. Unfortunately I have to use tools like Google translate (or others) to translate Chinese into PinYin form names.

One question: do you think you will upgrade Saola to play with nnue in the future?

Please find attached some games from my wife Lin Ye.

Best wishes

Agostino Guberti

On Thu, Feb 22, 2024 at 11:46 PM nguyenpham @.***> wrote:

1.

Yes. Recently all my apps (BanksiaGUI, new apps for iOS) can work with variations. I just use a simple solution, quite similar to parenthesises in PGN for storing variations. However, the code is tricky to work with. I have just implemented recently, thus there is no update for OGCDB. I may mention as a part of the standard I don't have any Xiangqi game with variations at the moment, you may see the one for chess 2.

Chess has ECO system. Xiangqi has ECCO (Encyclopaedia of Chinese Chess Openings). The ECCO is in both English and Chinese. I have added Vietnamese 3.

I have been collecting games for building a new Xiangqi database. Thus it has not been published yet. The hard point I can't use ones with player names in Chinese since I can't read them as well as my friends. If there is a dictionary for referencing between Chinese and Latin/English names it will be so useful for me

IMG_4638.jpg (view on web) https://github.com/nguyenpham/ocgdb/assets/1370755/080a764d-c6c6-4185-9226-1be4db2a6313

IMG_4636.PNG (view on web) https://github.com/nguyenpham/ocgdb/assets/1370755/edaa2b4f-b988-4422-8cf3-35ed90403187

— Reply to this email directly, view it on GitHub https://github.com/nguyenpham/ocgdb/issues/37#issuecomment-1960458262, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6ARYDDUWETI2BEQTTT3AVTYU7DEFAVCNFSM6AAAAABDG2AS36VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRQGQ2TQMRWGI . You are receiving this because you authored the thread.Message ID: @.***>