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

Moderators: Elijah, Igbo, timetraveller

Nemesis

Top contribute Forum Top Active Users
Forum Contributions
Points: 33 999,00 
Posts: 2585
Joined: 05/02/2020, 10:42
Status: Offline (Active 1 Month, 3 Days, 9 Hours, 45 Minutes ago)
Medals: 2
Topics: 194
Reputation: 7481
Has thanked: 6579 times
Been thanked: 6863 times

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

Post by Nemesis »

popcorm1


jja: Convert CTG Books To PolyGlot Format


Go here >> https://crates.io/crates/jja


[Doesnt work as intended for me - the resultant BIN shows as either 0kb or 1kb .. wa_ll ]
sarona

Top contribute Forum
Chief moderators
Points: 20 167,00 
Forum Contributions
Posts: 227
Joined: 14/08/2022, 20:09
Status: Offline (Active 4 Hours, 25 Minutes ago)
Medals: 1
Topics: 8
Reputation: 1784
Has thanked: 360 times
Been thanked: 1463 times

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

Post by sarona »

It works for me with a CTG around ~8 MB. Did not try with larger books.

Image

I used D:\jja>jja edit comrades.ctg -o comrades.bin

cd [your path to jja.exe]
jja.exe
jja edit {name_of_ctg).ctg -o (name of bin).bin
FritzUser

Top contribute Forum
Forum Contributions
Points: 107,00 
Posts: 171
Joined: 03/12/2022, 1:38
Status: Offline (Active 5 Hours, 1 Minute ago)
Medals: 1
Topics: 27
Reputation: 794
Has thanked: 296 times
Been thanked: 973 times

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

Post by FritzUser »

SkyNet wrote: 28/05/2023, 20:15 lol I must be blind or something.. Can you upload the jja.exe file somewhere? :beer:
This is where it's located:
https://www.chesswob.org/jja/
Nemesis

Top contribute Forum Top Active Users
Forum Contributions
Points: 33 999,00 
Posts: 2585
Joined: 05/02/2020, 10:42
Status: Offline (Active 1 Month, 3 Days, 9 Hours, 45 Minutes ago)
Medals: 2
Topics: 194
Reputation: 7481
Has thanked: 6579 times
Been thanked: 6863 times

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

Post by Nemesis »

thankyou


The package jja here >> https://ufile.io/8su3tvnx
Antique

Top contribute Forum
Forum Contributions
Points: 12 460,00 
Posts: 55
Joined: 27/02/2023, 12:15
Status: Offline (Active 19 Hours, 57 Minutes ago)
Medals: 1
Topics: 12
Reputation: 11
Has thanked: 7 times
Been thanked: 70 times

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

Post by Antique »

A question: the bin resulted book will have the same marks as in ctg book ?
JairoSawka

Top contribute Forum
Forum Contributions
Points: 29 726,00 
Posts: 893
Joined: 22/11/2019, 14:59
Status: Offline (Active 13 Hours, 21 Minutes ago)
Medals: 1
Topics: 65
Reputation: 6340
Has thanked: 66 times
Been thanked: 7242 times

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

Post by JairoSawka »

Doesn't run on my pc
My 3 Passions are Chess , Bodybuilding, and Cycling. dance2
FritzUser

Top contribute Forum
Forum Contributions
Points: 107,00 
Posts: 171
Joined: 03/12/2022, 1:38
Status: Offline (Active 5 Hours, 1 Minute ago)
Medals: 1
Topics: 27
Reputation: 794
Has thanked: 296 times
Been thanked: 973 times

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

Post by FritzUser »

It ran for me, but it created a 0 KB file.

Code: Select all

D:\_Test>jja-0.5.0.exe edit "Immortal 2015 v28.ctg" -o "Immortal 2015 v28.bin"
Creating output PolyGlot opening book...
Success creating output PolyGlot opening book.
Searching for positions in the CTG input file. This may take a while.
Found 0 chess positions in the CTG input file.
Saving 0 entries from input book to the output book...
Success copying entries from the input book to the output book.
Saving done.    [0/?] 0/s [00:00:00]
This might be a lack of understanding on my part, though. Here is the list of options and commands:

Code: Select all

jja: swiss army knife for chess file formats

Usage: jja-0.5.0.exe [OPTIONS] <COMMAND>

Commands:
  info   Show brief information about the given file
  edit   Edit the given chess file
  find   Query the given file
  make   Compile PGN files into an opening book
  merge  Merge two opening books
  match  Arrange book matches using random playouts
  play   Make random playouts, optionally using books
  hash   Calculate Zobrist of the given chess position
  open   Browse ECO classification
  quote  Print a chess quote
  help   Print this message or the help of the given subcommand(s)

Options:
      --porcelain[=<FORMAT>]  Give the output in an easy-to-parse format for scripts [default: auto] [possible values: auto, csv]
  -v, --verbose...            Run verbosely, may be specified multiple times [env: JJA_VERBOSITY=]
  -T, --threads <threads>     Specify maximum number of threads [env: JJA_NPROC=] [default: 16]
  -h, --help                  Print help
  -V, --version               Print version
sarona

Top contribute Forum
Chief moderators
Points: 20 167,00 
Forum Contributions
Posts: 227
Joined: 14/08/2022, 20:09
Status: Offline (Active 4 Hours, 25 Minutes ago)
Medals: 1
Topics: 8
Reputation: 1784
Has thanked: 360 times
Been thanked: 1463 times

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

Post by sarona »

Where is your CTG book located?

Judging by your output, the program found no CTG positions. You are pointing at D:\_Test directory. Is the CTG book located there?

Sorry, I am travelling back from Manitoba and may be delayed in answering any questions.

Also, the Windows executable runs from the command line (terminal). Create a batch file to auto start it.
FritzUser

Top contribute Forum
Forum Contributions
Points: 107,00 
Posts: 171
Joined: 03/12/2022, 1:38
Status: Offline (Active 5 Hours, 1 Minute ago)
Medals: 1
Topics: 27
Reputation: 794
Has thanked: 296 times
Been thanked: 973 times

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

Post by FritzUser »

sarona wrote: 29/05/2023, 1:17 Where is your CTG book located?

Judging by your output, the program found no CTG positions. You are pointing at D:\_Test directory. Is the CTG book located there?
Yes. The executable (on its own) and the four files that make up the CTG are all in that directory, on their own.
sarona

Top contribute Forum
Chief moderators
Points: 20 167,00 
Forum Contributions
Posts: 227
Joined: 14/08/2022, 20:09
Status: Offline (Active 4 Hours, 25 Minutes ago)
Medals: 1
Topics: 8
Reputation: 1784
Has thanked: 360 times
Been thanked: 1463 times

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

Post by sarona »

Can you post a screenshot of the directory where the program and book are located?

Also, (provided the CTG is not a commercial product), can you post a link to said CTG you are using? This way I can try it on my laptop.
FritzUser

Top contribute Forum
Forum Contributions
Points: 107,00 
Posts: 171
Joined: 03/12/2022, 1:38
Status: Offline (Active 5 Hours, 1 Minute ago)
Medals: 1
Topics: 27
Reputation: 794
Has thanked: 296 times
Been thanked: 973 times

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

Post by FritzUser »

sarona wrote: 29/05/2023, 1:44 Can you post a screenshot of the directory where the program and book are located?

Also, (provided the CTG is not a commercial product), can you post a link to said CTG you are using? This way I can try it on my laptop.
Sure thing. Here's a screenshot:

Image

The CTG is located here on the forum:

http://outskirts.altervista.org/forum/viewtopic.php?f=21&t=4027

If it makes any difference, I changed the name of the CTG manually, i.e. without doing it through CB17 or Fritz 18. So that might have made a difference.
sarona

Top contribute Forum
Chief moderators
Points: 20 167,00 
Forum Contributions
Posts: 227
Joined: 14/08/2022, 20:09
Status: Offline (Active 4 Hours, 25 Minutes ago)
Medals: 1
Topics: 8
Reputation: 1784
Has thanked: 360 times
Been thanked: 1463 times

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

Post by sarona »

Sorry, FritzUser. Not sure what the problem is. That book is very large (over 9 GB). Maybe it is a memory issue. I tried to convert an old HIARCS14zf CTG (slightly under 2 GB) and succeeded after a long time processing (old, traveling laptop for road trips). It apparently found a few illegal moves during processing!
Image

There is a thread at Talkchess. Perhaps contact the author there for assistance. https://talkchess.com/forum3/viewtopic.php?f=7&t=81702
Or go to his homepage.

For those who want to autostart the program just create a one line batch file (with Notepad or whatever) and save the BAT in the directory containing jja.exe

Type
start "jja.exe"

Then name the file jja.bat and save it in the jja home directory. Double click the jja.bat file and the program should start.
Nemesis

Top contribute Forum Top Active Users
Forum Contributions
Points: 33 999,00 
Posts: 2585
Joined: 05/02/2020, 10:42
Status: Offline (Active 1 Month, 3 Days, 9 Hours, 45 Minutes ago)
Medals: 2
Topics: 194
Reputation: 7481
Has thanked: 6579 times
Been thanked: 6863 times

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

Post by Nemesis »

Nemesis wrote: 26/05/2023, 23:40 popcorm1


jja: Convert CTG Books To PolyGlot Format


Go here >> https://crates.io/crates/jja


[Doesnt work as intended for me - the resultant BIN shows as either 0kb or 1kb .. wa_ll ]
Image
sarona

Top contribute Forum
Chief moderators
Points: 20 167,00 
Forum Contributions
Posts: 227
Joined: 14/08/2022, 20:09
Status: Offline (Active 4 Hours, 25 Minutes ago)
Medals: 1
Topics: 8
Reputation: 1784
Has thanked: 360 times
Been thanked: 1463 times

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

Post by sarona »

Image

I will look at it with the Threadripper when I return home. Perhaps certain flags may need to be added with very large books.
SkyNet

Top contribute Forum Engines Maker Book Maker
Forum Contributions
Points: 33 208,00 
Posts: 326
Joined: 11/11/2022, 1:55
Status: Offline (Active 13 Hours, 5 Minutes ago)
Medals: 3
Topics: 6
Reputation: 3153
Location: 3th dimension.
Has thanked: 5209 times
Been thanked: 2367 times

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

Post by SkyNet »

My attempt on Windows 7 XP 64 bit (on Windows 10 haven't tried yet). pardon
► Show Spoiler
Image
"Work smart - not hard."
Post Reply

Return to “Programming, Technical Discussions, Chess related questions etc.”