jja: convert CTG books to PolyGlot format (and more!)

Discussion of chess software programming and technical issues.

Moderator: Ras

chesskobra
Posts: 347
Joined: Thu Jul 21, 2022 12:30 am
Full name: Chesskobra

Re: jja: convert CTG books to PolyGlot format (and more!)

Post by chesskobra »

I am using linux. I downloaded the jja-glibc binary and made it executable (chmod +x file). I am not sure if on windows you have to make it executable.
User avatar
alpltl
Posts: 57
Joined: Tue Mar 14, 2023 3:04 pm
Location: Berlin
Full name: Ali Polatel

Re: jja: convert CTG books to PolyGlot format (and more!)

Post by alpltl »

chesskobra wrote: Wed May 03, 2023 12:36 pm Thanks a lot. I have downloaded and tested the command that you gave above. I will test more on the weekend. This is wonderful.
You're welcome. Please test it and let me know of any bugs or any ideas to improve it.
chesskobra wrote: Sat Apr 15, 2023 10:46 pm Another question: some time ago I had asked a few questions about getting opening lines in PGN out of an opening book. I was wondering if jja can do this.
I am happy to inform you that as of 1fffa5e, jja can export opening books as PGN. Again this is supported for all opening book formats jja supports (abk, ctg, bin, and obk). To use the functionality, simple specify a file with .pgn extension as --output argument to "jja edit". You can customize the PGN generation further with the arguments:

Code: Select all

      --event <pgn-event>
          Specify the Event tag for PGN output, defaults to book name
      --site <pgn-site>
          Specify the Site tag for PGN output, defaults to host name
      --date <pgn-date>
          Specify the Date tag for PGN output, defaults to last modification date
      --black <pgn-black>
          Specify the Black tag for PGN output [default: ?]
      --white <pgn-white>
          Specify the White tag for PGN output [default: ?]
      --result <pgn-result>
          Specify the Result tag for PGN output [default: *] [possible values: *, 1/2-1/2, 0-1, 1-0]
jja keeps track of the "Round" PGN tag automatically. Note, this change is not in a released version yet so to test it you need a git build. Browse to the respective operating system build, windows, linux-glibc, or linux-musl, and download the artifact on the left.
Caissa-AI, Caissa-Test, and Caissa-X on LiChess
ChessWoB: Chess without Boundaries
jja: Jin, Jîyan, Azadî!
Follow @alip on Mastodon!
User avatar
alpltl
Posts: 57
Joined: Tue Mar 14, 2023 3:04 pm
Location: Berlin
Full name: Ali Polatel

Re: jja: convert CTG books to PolyGlot format (and more!)

Post by alpltl »

Engine wrote: Wed May 03, 2023 2:11 pm Why doesn't this work for me on Windows, what do you open it with?
jja.exe is a standalone executable, you don't have to install it or open it with something.

Without further details, it's really hard to say what the problem is. Here are a couple of questions:
1. Which version of jja are you trying to use? Is it a release version or a git build?
2. Which version of Windows are you using? Is it 32 bit or 64 bit?
3. How are you trying to invoke jja? What error output do you get?
Caissa-AI, Caissa-Test, and Caissa-X on LiChess
ChessWoB: Chess without Boundaries
jja: Jin, Jîyan, Azadî!
Follow @alip on Mastodon!
Engine
Posts: 12
Joined: Fri Mar 24, 2023 9:09 pm
Full name: Oleg Olegovich

Re: jja: convert CTG books to PolyGlot format (and more!)

Post by Engine »

alpltl wrote: Sat May 06, 2023 11:44 am
Engine wrote: Wed May 03, 2023 2:11 pm Why doesn't this work for me on Windows, what do you open it with?
jja.exe is a standalone executable, you don't have to install it or open it with something.

Without further details, it's really hard to say what the problem is. Here are a couple of questions:
1. Which version of jja are you trying to use? Is it a release version or a git build?
2. Which version of Windows are you using? Is it 32 bit or 64 bit?
3. How are you trying to invoke jja? What error output do you get?
1. I have tried all versions.
2. Windows 11 Pro 64-bit.
3. Double click on the executable file jja.exe , nothing happens.
User avatar
alpltl
Posts: 57
Joined: Tue Mar 14, 2023 3:04 pm
Location: Berlin
Full name: Ali Polatel

Re: jja: convert CTG books to PolyGlot format (and more!)

Post by alpltl »

Engine wrote: Sat May 06, 2023 2:52 pm 3. Double click on the executable file jja.exe , nothing happens.
Can you try running it on the terminal?
Caissa-AI, Caissa-Test, and Caissa-X on LiChess
ChessWoB: Chess without Boundaries
jja: Jin, Jîyan, Azadî!
Follow @alip on Mastodon!
Engine
Posts: 12
Joined: Fri Mar 24, 2023 9:09 pm
Full name: Oleg Olegovich

Re: jja: convert CTG books to PolyGlot format (and more!)

Post by Engine »

alpltl wrote: Sat May 06, 2023 3:35 pm
Engine wrote: Sat May 06, 2023 2:52 pm 3. Double click on the executable file jja.exe , nothing happens.
Can you try running it on the terminal?
:?: :?: :?:
chesskobra
Posts: 347
Joined: Thu Jul 21, 2022 12:30 am
Full name: Chesskobra

Re: jja: convert CTG books to PolyGlot format (and more!)

Post by chesskobra »

alpltl wrote: Sat May 06, 2023 10:38 am
I am happy to inform you that as of 1fffa5e, jja can export opening books as PGN.
I have now tried this artifact, and it is working fine. Addition of ECO code in the output would be nice, although it is not essential (one can always pass the output pgn through pgn-extract and have them added or split by ECO code).

Regarding the tabular output (that you implemented in the previous artifact), does the position have to be specified as a sequence of moves? Is it easy to print the table from an FEN string? I don't know how the database is organised, so I am not sure if that would be more complicated.

I have not tested other features of the tool, but do plan to test them slowly. Let me add that I am just a hobbyist (both in chess and in chess tools). So suggestions and some testing by more serious players and chess engineers would be more useful to you.
User avatar
alpltl
Posts: 57
Joined: Tue Mar 14, 2023 3:04 pm
Location: Berlin
Full name: Ali Polatel

Re: jja: convert CTG books to PolyGlot format (and more!)

Post by alpltl »

Engine wrote: Sat May 06, 2023 7:28 pm
alpltl wrote: Sat May 06, 2023 3:35 pm
Engine wrote: Sat May 06, 2023 2:52 pm 3. Double click on the executable file jja.exe , nothing happens.
Can you try running it on the terminal?
:?: :?: :?:
jja is a console application, read more about console applications here: Wikipedia:Console_application. You are supposed to run it in the console.
Read more about the console here: Wikipedia:Windows_Console. Hope this helps.
Caissa-AI, Caissa-Test, and Caissa-X on LiChess
ChessWoB: Chess without Boundaries
jja: Jin, Jîyan, Azadî!
Follow @alip on Mastodon!
User avatar
alpltl
Posts: 57
Joined: Tue Mar 14, 2023 3:04 pm
Location: Berlin
Full name: Ali Polatel

Re: jja: convert CTG books to PolyGlot format (and more!)

Post by alpltl »

chesskobra wrote: Sun May 07, 2023 12:05 am I have now tried this artifact, and it is working fine. Addition of ECO code in the output would be nice, although it is not essential (one can always pass the output pgn through pgn-extract and have them added or split by ECO code).
Indeed, this is easily achieved using pgn-extract and as a principle I am against reinventing the wheel. However, since we already include an ECO table, there's no added complexity in implementing this feature. I have opened an issue for this but this is no priority.
chesskobra wrote: Sun May 07, 2023 12:05 am Regarding the tabular output (that you implemented in the previous artifact), does the position have to be specified as a sequence of moves? Is it easy to print the table from an FEN string? I don't know how the database is organised, so I am not sure if that would be more complicated.
You can query a FEN string using the -f, --fen command line option. Below is an excerpt from "jja find --help":

Code: Select all

  -f, --fen <EPD>             Query the given position in EPD format
  -p, --pgn <PGN>             Query the leaf node of the given PGN line
chesskobra wrote: Sun May 07, 2023 12:05 am I have not tested other features of the tool, but do plan to test them slowly. Let me add that I am just a hobbyist (both in chess and in chess tools). So suggestions and some testing by more serious players and chess engineers would be more useful to you.
It's great to hear that you plan on testing more features of the tool in the future. Please remember that every user's perspective is valuable, whether you're a hobbyist or a professional. Your insights as a chess enthusiast and someone interested in chess tools are still very useful to me.

Of course, suggestions and testing from more experienced players and chess engineers are always welcome, but your contributions should not be underestimated. The tool is designed to cater to users of various skill levels and backgrounds, so your feedback as a hobbyist is just as important.

I appreciate your continued support and involvement. I'm looking forward to hearing about your experiences with the other features of the tool as you explore them. Thank you for your valuable input.
Caissa-AI, Caissa-Test, and Caissa-X on LiChess
ChessWoB: Chess without Boundaries
jja: Jin, Jîyan, Azadî!
Follow @alip on Mastodon!
Engine
Posts: 12
Joined: Fri Mar 24, 2023 9:09 pm
Full name: Oleg Olegovich

Re: jja: convert CTG books to PolyGlot format (and more!)

Post by Engine »

alpltl wrote: Sun May 07, 2023 6:58 am
Engine wrote: Sat May 06, 2023 7:28 pm
alpltl wrote: Sat May 06, 2023 3:35 pm
Engine wrote: Sat May 06, 2023 2:52 pm 3. Double click on the executable file jja.exe , nothing happens.
Can you try running it on the terminal?
:?: :?: :?:
jja is a console application, read more about console applications here: Wikipedia:Console_application. You are supposed to run it in the console.
Read more about the console here: Wikipedia:Windows_Console. Hope this helps.
Show better step-by-step actions in the video tutorial and at the same time how to convert from CTG to BIN — this will be a real and visual help for everyone.