Not logged inRybka Chess Community Forum
Up Topic Rybka Support & Discussion / Aquarium / Using .ctg Opening Books in the Aquarium Stand Alone Adapter
- - By Charles (**) Date 2009-08-19 16:26
There isn't anything in the below post that I came up with myself, except for the xml file edit/hack, all information was gotten from other people's post in the Rybka/Aquarium forum.

I would expect a forthcoming official guide from ChessOK/Rybka people to supercede the information in the below post.

Basically to get the Aquaruim Stand-alone Adpapter functioning with a .ctg opening book all that needs to be done is import the .ctg book into the Aquarium program so that the Aquarium program can import the .ctg book details into a tree_configurations.xml file, and then move a few files to a different location on the harddrive. The below post will show how to do it.

The below has a lot of words and graphics but it isn't a difficult process to do...quite easy to do actually. Adapt the information in the below post to your own needs, and way of doing things.

********************************************

This post will attempt to show how to set up the Aquarium book adapter to prepare the adapter for use with GUIs, such as Arena, that allow the importing/use of UCI engines. Chessbase .ctg format opening books are used in the example but Aquarium format opening books can also be used with the Aquarium book adapter.

Note 1: The book adapter is for use with UCI chess engines only. It cannot be used with Winboard chess engines.

Note 2: All links below worked at the time this post was made.

What is needed:

1). The Convekta/ChessOK Aquarium Book Adapter - This post will be using the "Stand Alone" book adapter.

2). The Convekta/ChessOK Aquarium Program - This post will be using the free demo version of the program.

3). An .ctg format opening book - If one is not handy, plenty of these can be found for free download on the Internet. In this post the Sedat Canbaz "Perfect 2009" .ctg opening book will be used and the free download "Rybka II" .ctg opening book.

Step 1:

Download the stand alone version of the Aquarium book adapter. The download link can be found in this Rybka Forum thread.

http://rybkaforum.net/cgi-bin/rybkaforum/topic_show.pl?tid=11192

[Should it be preferred to use the "Integrated" version of the adapter it can also be downloaded from the above link. The instructions for installing the integrated version of the adapter can be found here: http://rybkachess.com/index.php?auswahl=Book+Adapter ]

Shown below I have made a folder named "Book Adapter" (name the folder what you want). And in that folder I have made another folder named "ctg books". In this post I will put the .ctg format books in this folder, but the .ctg books can be kept anywhere on the harddrive. And in the ctg books folder I have made individual folders for each .ctg format book.









I have downloaded the "BookAdapterStandalone.zip" zip file from the above posted Rybka forum thread link and I have extracted the zip file's contents into the "Book Adapter" folder.

I have also made a folder named "Config" in the adapter's folder.



Step 2:

Now that the above is done I download and install the demo version of the Convekta Aquarium program.

The Aquarium program can be found on the ChessOK website:

http://www.chessok.com/ - Clicking the "Software" button at the top of the home page should bring up a page where the "demo" version of the program can be downloaded.

With the Aquarium program open, click the "Sandbox" tab:



Then click the "Tree" tab that appears at the top of the program menu:



Then click the "Load CTG" tab that appears:



A dialog box should pop up, navigate to where the .ctg book is that you want to install and double-click the opening book file.



This box should pop up, click "Next".



This box has the name of the opening book as it will be displayed in the selection box. Do what you want here with the naming, then click "Finish".



To load another .ctg book repeat the process by clicking the "Load CTG" button again. Not shown here, but I also repeated the process and loaded the "Rybka II" opening book.

Now that all of the .ctg books that are going to be used are loaded into Aquarium, close/exit the program.

Step 3:

Open the Aquarium program directory and copy the "ATrees" folder to the folder that has the Aquarium Book Adapter in it. [Now I'm not so sure that this step is necessary but from what I have read it is. Just copy the "ATrees" folder to the book adapter folder, unless you know for sure otherwise. No harm done in copying it to the other directory anyway.]



In my case I copied the "ATrees" folder to the "Book Adapter" folder that I had made.



Now in the Aquarium program folder locate and open the "Config" folder, and then locate the "tree_configurations.xml" file and copy this one file to the "Config" folder that was made in the folder that has the book adapter in it.



Showing the "tree_configurations.xml" file has been copied to the book adapter's "Config" folder.



Note: At this point with all of the CTG books that will be used loaded, and all of the necessary files copied over to the folder that has the "Aquarium Stand Alone Book Adapter" in it, the Aquarium program could be uninstalled. Though we would want to use the Aquarium program for other things its use for setting up the stand alone adapter is over with.

Step 4:

Now going to the book adapters folder the "ABAGui.exe" file is double-clicked and the book adapter GUI should open up:



I'm not going to go into detail about the different settings in the adapter GUI. A lot of information detailing what the different settings are about can be found here:

http://rybkachess.com/index.php?auswahl=Book+Adapter

Step 5:

All I am going to do from here is tidy things up a bit. DISCLAIMER: The below is how I tidy things up. It does not mean that it is the correct way of doing it. Follow what comes next at your own choosing and dare I say, risk.

Since only the Perfect 2009 and Rybka II books are wanted to be used with the adapter in this example. Looking at the below selection box from the adapter GUI can be seen a lot of other opening books, too. These other opening books will be wanted to be removed from the selection list so that the ones wanted to be used can be clearly seen.



Before starting the below, close/exit the book adapter's GUI.

To remove the other opening books from the selection list go to the "Config" folder (That is the "Config" folder that is in the stand alone book adapter's folder), and open the "tree_configurations.xml" file with a text editor. [BTW, you will now also find in the "Config" folder a file named "RBaseTrees.xml". This "RBaseTrees.xml" file was created when the adapter's GUI was opened. Just leave the new file where it is.]

With the tree_configurations.xml file open with a text editor remove every book that will not be used from the file.

Do this first by finding the <item name= tag and next to this tag will be the name of the opening book. You should be able to distinguish the books you want to keep in the selection list from those you do not want to be in the GUI selection list. In the text editor carefully highlight all of the text from the <item name= tag, to the closing tag </item> for that particular opening books entry. And delete the highlighted text from the xml file. Delete the text for each book you do not want to be in the list.

For example, if I wanted to remove the - NoAnnotations - opening book entry from the GUI selection list I would remove this, and only this, from the "tree_configurations.xml" file:

    <item name="NoAnnotations" opening_book="0" book_width="1" book_alpha="2" main_tree="maintree" discarded_tree="discarded" only_main_tree="0">
      <column name="mf" display_name="flg" column_type="16" tree_path="maintree" weight="0" visible="1" lookup_column="" function="" Width="25"/>
      <column name="md" display_name="disc" column_type="19" tree_path="maintree" weight="0" visible="1" lookup_column="" function="" Width="78"/>
      <column name="mc" display_name="col" column_type="18" tree_path="discarded" weight="0" visible="1" lookup_column="" function="" Width="78"/>
      <column name="mo" display_name="ord" column_type="17" tree_path="maintree" weight="0" visible="1" lookup_column="" function="" Width="78"/>
      <column name="5" display_name="Eval" column_type="4" tree_path="statistics\Eval" weight="0" visible="1" lookup_column="" function="" Width="42"/>
      <column name="t" display_name="Total" column_type="0" tree_path="statistics\d2m" weight="0" visible="1" lookup_column="" function="" Width="47"/>
      <column name="tperc" display_name="Total%" column_type="13" tree_path="statistics\d2m" weight="0" visible="0" lookup_column="" function="" Width="0"/>
      <column name="s" display_name="Success" column_type="1" tree_path="statistics\d2m" weight="0" visible="1" lookup_column="" function="" Width="61"/>
      <column name="r" display_name="Rating" column_type="2" tree_path="statistics\d2m" weight="0" visible="0" lookup_column="" function="" Width="45"/>
      <column name="y" display_name="Year" column_type="3" tree_path="statistics\d2m" weight="0" visible="0" lookup_column="" function="" Width="0"/>
      <column name="6" display_name="CAP" column_type="5" tree_path="cap" weight="0" visible="1" lookup_column="" function="" Width="47"/>
      <column name="result" display_name="Play %" column_type="12" tree_path="" weight="1" visible="1" lookup_column="" function="" Width="52"/>
      <column name="7" display_name="dEval" column_type="8" tree_path="" weight="1" visible="0" lookup_column="5" function="std.diff_eval(%width%)" Width="33"/>
      <column name="8" display_name="EvalCap" column_type="8" tree_path="" weight="1" visible="0" lookup_column="5,6" function="std.eval_minus_cap(%width%)" Width="36"/>
      <column name="9" display_name="dCAP" column_type="8" tree_path="" weight="1" visible="0" lookup_column="6" function="std.diff_eval(%width%)" Width="33"/>
      <column name="10" display_name="NoStat" column_type="8" tree_path="" weight="1" visible="0" lookup_column="" function="std.no_statistics(%width%)" Width="36"/>
      <column name="11" display_name="dSuccCAP" column_type="8" tree_path="" weight="0" visible="0" lookup_column="" function="std.bad_success(%width%)" Width="39"/>
      <column name="12" display_name="dRat" column_type="8" tree_path="" weight="0" visible="0" lookup_column="" function="std.low_rating(%width%)" Width="66"/>
      <column name="bTot" display_name="BTot" column_type="8" tree_path="" weight="9" visible="0" lookup_column="t" function="identity" Width="51"/>
      <column name="bRat" display_name="BRat" column_type="8" tree_path="" weight="5" visible="0" lookup_column="r" function="std.rating_base" Width="39"/>
      <column name="bCAP" display_name="BCap" column_type="8" tree_path="" weight="1" visible="0" lookup_column="6" function="mainbook.cap" Width="44"/>
      <column name="bCAPRel" display_name="BCapRel" column_type="8" tree_path="" weight="3" visible="0" lookup_column="6" function="mainbook.cap.rel" Width="49"/>
      <column name="bEval" display_name="BEval" column_type="8" tree_path="" weight="5" visible="0" lookup_column="5" function="mainbook.cap" Width="49"/>
      <column name="bSuc" display_name="BSuc" column_type="8" tree_path="" weight="2" visible="0" lookup_column="" function="std.multiplied_success" Width="0"/>
      <column name="sum" display_name="sum" column_type="9" tree_path="" weight="1" visible="0" lookup_column="" function="" Width="0"/>
      <column name="msum" display_name="Msum" column_type="11" tree_path="" weight="1" visible="0" lookup_column="" function="" Width="0"/>
      <column name="mperc" display_name="pc" column_type="6" tree_path="" weight="0" visible="0" lookup_column="" function="" Width="0"/>
      <display separate_ants="0" SortColumn="0"/>
      <insert_line col1="6" col2=""/>
      <color_policy pri0="0" pri1="1" pri2="0" pri3="-1" pri4="-1" pri5="-1"/>
    </item>

Entries like this (shown below) will also be seen toward the bottom of the xml file. I do not know what these entries are related to so I leave them in the file. If you do not know what the entries are for either, I suggest you leave them in the file, too. Just delete the above shown type text for unwanted book selection entries.

  <Functions>
    <function name="alexman.rating" rel="0" points="8">
      <p x="0" y="0"/>
      <p x="2399" y="0"/>
      <p x="2400" y="30"/>
      <p x="2569" y="30"/>
      <p x="2570" y="60"/>
      <p x="2699" y="60"/>
      <p x="2700" y="90"/>
      <p x="2701" y="90"/>
    </function>

Also there is an entry in the xml file that begins with the tag <empty_template name="", I also go ahead and leave this empty template data in the file. No harm done in doing so.

This is the empty template entry that I leave in the file:

    <empty_template name="" opening_book="0" book_width="1" book_alpha="2" main_tree="" discarded_tree="" only_main_tree="0">
      <column name="mf" display_name="flg" column_type="16" tree_path="" weight="0" visible="1" lookup_column="" function="" Width="27"/>
      <column name="md" display_name="disc" column_type="19" tree_path="" weight="0" visible="1" lookup_column="" function="" Width="78"/>
      <column name="mc" display_name="col" column_type="18" tree_path="" weight="0" visible="1" lookup_column="" function="" Width="78"/>
      <column name="mo" display_name="ord" column_type="17" tree_path="" weight="0" visible="1" lookup_column="" function="" Width="78"/>
      <column name="mants" display_name="Annot" column_type="15" tree_path="" weight="0" visible="1" lookup_column="" function="" Width="55"/>
      <column name="mperc" display_name="pc" column_type="6" tree_path="" weight="0" visible="0" lookup_column="" function="" Width="0"/>
      <display separate_ants="1" SortColumn="-3"/>
      <insert_line col1="" col2=""/>
      <color_policy pri0="0" pri1="1" pri2="0" pri3="-1" pri4="-1" pri5="-1"/>
    </empty_template>

In this example I have removed every opening book entry from the tree_configurations.xml file except for the Perfect 2009 and Rybka II books. Now going to the adapter GUI I open it and there are now no books listed in the selection box.



You may or may not experience the same thing of having an empty selection list confront you but if you do...

To fix this close/exit the adapter GUI, and with a text editor open the "AquariumBookAdapter.ini" file that is in the adapter's folder. Then in the file locate the entry that reads - config=NarrowBook



And change the - NarrowBook - book entry to the name of one of the books you actually do have installed (exact spelling). In the below example I have changed the entry to - Perfect 2009



And now opening the adapter's GUI again shows two .ctg opening books from which to choose from to use with the UCI chess engine.



Now in the GUI that will be used with the Aquarium adapter import the - AquariumBookAdapter.exe - as the UCI engine.

I personally used the Aquarium Adapter in the Winboard GUI via the polyglot adapter and it worked like a dream (quite well).
Parent - By Zruty (*****) [ru] Date 2009-08-19 16:31
A good guide, thanks Charles.
Parent - By buffos (Silver) [gr] Date 2009-08-19 21:37
great guide, and a lot of work!
Parent - - By mad max (***) [us] Date 2009-09-12 19:57
Just can't get the books to load...help
Parent - - By Charles (**) Date 2009-09-12 20:40
Matematiko at the Winboard forum put together a .doc file for using the Convekta Stand-Alone adapter. See if it helps any. Matematiko made a few notes in it regarding his attempts to use the adapter; Matematiko appeared to have problems that I did not have. If not using the adapter with the Winboard GUI just ignore the Winboard references in the doc file.

http://chess.webcindario.com/Instructions.doc

Also note that the ATrees folder is missing from the .doc instructions due to it being discovered that the ATrees folder is not really needed for setting up .ctg books with the Stand-Alone adapter. Copying the ATrees folder over to the Stand-Alone adapter folder WILL NOT cause any problems, just noting that it isn't necessary. If it is possible to set the .ctg book weights with the Aquarium GUI then possibly the ATrees folder would be needed, but I'm not aware of how to do that, or even if that (setting .ctg book weights) is possible.
Parent - - By Charles (**) Date 2009-09-14 00:31
In the above post I mentioned that the ATrees folder may not be needed to be copied over to the Stand-Alone adapter's folder due to it possibly not really being needed when just using .ctg books with the Stand-Alone adapter. Well below is shown a case of when the ATrees folder would definitely be copied over to the Stand-Alone adapters folder.

I am using this Vytron post and its replys, as a reference of sorts since it got me to thinking of how to change the play percents of a .ctg book since I really couldn't figure out how to do that before. Turns out it was quite easy to do in the end.

In the below graphic the .ctg opening book Perfect 2009 is being used in the example. The Perfect 2009 book has been loaded into Aquarium and if no changes were made to this book, as shown in the below graphic, then the ATrees folder would not be needed to be copied over to the Stand-Alone adapter's folder (I think).



In the above graphic in the column at the far right labelled "Play %" can be seen that the move e4 has a 48% chance of being played. Only a guess on my part but maybe this 48% means that e4 will always be played and the other moves including d4 never will be played since 48% is the higher of all of the numbers.

But suppose it is wanted that an engine always plays d4 instead.

In the below graphic shows that the move d4 has been right-clicked on and a box has popped up and "Edit percents" has been clicked on.



And in the below graphic 100 has been entered into the Edit Percents box and OK has been clicked.



And in the below graphic shows that d4 now has a 100% chance of being played first.



Now when copying files over to the Stand-Alone adapter's folder, in addition to the tree_configurations.xml file being copied over to the Config folder, the ATrees folder would also need to be copied to the Stand-Alone adapter's folder since the ATrees folder now holds information on the Play Percent being changed for the opening book. Where exactly this information is stored in the ATrees folder I do not know, but the information is in one or more of the files that are in the ATrees folder.

*******************************

It would be great if one day someone that knows exactly what they are doing could write a guide for setting up the Stand-Alone adapter. ;) That person could write a guide that leaves no doubts as to what is and what isn't needed when setting up the S-A adapter. Just a thought.

Have a great day!!
Parent - - By Felix Kling (Gold) [de] Date 2009-09-14 07:15
I guess the play% is saved to the maintree - where else should it be?
Parent - - By adip (*) [ro] Date 2009-10-10 10:40
Good guide but something is wrong because I opened the book adapter setup ,I choosen Perfect2009 book and then I click "ok".After I opened Arena, I installed the new engine Aquarium book adaper .Now when I look to book tree Arena I see is the old book ,little main book.abk not perfect2009.It is something wrong,but what?
Parent - By Vempele (Silver) [fi] Date 2009-10-10 10:53

> It is something wrong,but what?


Your understanding of how the book adapter works. It's for engine play, the GUI won't use the book at all.
- - By adip (*) [ro] Date 2009-10-10 10:57
so the engine play with perfect2009 or with the book from Arena?
Parent - - By adip (*) [ro] Date 2009-10-10 12:37
I want to compare the books ,which is better,how I compare if no work on Arena?
Parent - - By Felix Kling (Gold) [de] Date 2009-10-10 14:50
which books do you want to compare? in which format are they? which GUIs do you use?
Parent - - By adip (*) [ro] Date 2009-10-10 17:56
I wrote up ."Good guide but something is wrong because I opened the book adapter setup ,I choosen Perfect2009 book and then I click "ok".After I opened Arena, I installed the new engine Aquarium book adaper .Now when I look to book tree Arena I see is the old book ,little main book.abk not perfect2009.It is something wrong,but what? "
Parent - - By Felix Kling (Gold) [de] Date 2009-10-10 18:24
the book adapter makes an engine play moves from the book specified in the adapter. the GUI won't display that book, but the engine plays the moves.
Parent - - By adip (*) [ro] Date 2009-10-10 19:01
And how I know is realy playing that book what I have chose?.I have chose Apocalypse,for example.On Fritz GUI, Apocalypse is no written the moves(move,prio,gam,win%,probability,line),is written nothing, and now when I play with adapter on Arena is writting the moves fro arena,little mainbook.abk.I think the adapter still plays the moves from Arena.
Parent - - By Felix Kling (Gold) [de] Date 2009-10-10 19:24
you have to disable the arena book.just select no book in the GUI.
Parent - - By adip (*) [ro] Date 2009-10-10 21:25
You are right.Bravo.Good job.I already played with some books :apocalypse.flyordie,il konte...The adapter change indeed the book on the Arena GUI.Congratulation.... I heard that Fritz 12 which just appeared is 100 elo more than Rybka 3,is it true?I am fan Rybka but if Fritz12 is improve 100 elo more ,then :) maybe I become fan Fritz :)
Parent - - By Felix Kling (Gold) [de] Date 2009-10-10 21:37
Fritz improved around 20 Elo if compared to Fritz 11. The difference to Rybka is about 180 Elo, see http://www.husvankempen.de/nunn/40_4_Ratinglist/40_4_single/rangliste.html .

Fritz is not nearly as strong as Rybka.
Parent - - By adip (*) [ro] Date 2009-10-10 22:30
Sorry Felix that list I think isn't good.I played Hiarcs12 against Rybka3 on Arena GUI and was draw many times .Sometimes beated Rybka3 .Also I put to fight Hiarcs12 against Rybka3 on Fritz GUI and Hiarcs12 again succed draw even when Rybka3 played with white.Anyway I wait Rybka4 wich I think will be very very good improved.By the way when comes Rybka4?
Parent - - By Felix Kling (Gold) [de] Date 2009-10-10 22:33
What about this list: http://computerchess.org.uk/ccrl/404/ :)
or this http://computerchess.org.uk/ccrl/4040/, this http://www.husvankempen.de/nunn/40_40%20Rating%20List/40_40%20BestVersion/rangliste.html or this http://www.husvankempen.de/nunn/40_120_ratinglist/ratinglist/rangliste.html :-D

It's more likely that the number of games in your test was too low or your setup was not correct. Try playing more games and you will see that those lists are right. And make sure that pondering is off, so that the cpu is shared fairly.
Parent - - By Uly (Gold) [mx] Date 2009-10-10 22:56
And that there's no memory swapping.
Parent - - By adip (*) [ro] Date 2009-10-11 10:47
Oh,I not contest Rybka supremacy just I wanted to emphasize that difference between Rybka3 and Hiarcs12 is not 200 elo or 100.My computer has one processor 1,6 Ghz ,is not very performance true, but that does not matter because both programs were run on the same computer,the same GUI,the same setups.
Parent - - By Felix Kling (Gold) [de] Date 2009-10-11 17:05
you can get pretty wrong results with ponder on for example, even if both engines have ponder on. However, the difference is about 180 Elo, just play more games. It's a case where you can't have an "opinion", as those 180 Elo are reality.
Parent - - By adip (*) [ro] Date 2009-10-11 18:08
180 elo means Rybka3 beat always,no?but Hiarcs12 takes draw playing with black.takes 1 game from 4:)
Parent - By adip (*) [ro] Date 2009-10-11 18:10
P.S. games played on Fritz GUI
Parent - By Vempele (Silver) [fi] Date 2009-10-11 18:11 Edited 2009-10-11 18:13

> 180 elo means Rybka3 beat always,no?


No. That'd be ∞ Elo (you'd have to play ∞ games to confirm it, of course).
Parent - - By Felix Kling (Gold) [de] Date 2009-10-11 18:17
180 Elo is about 70-30 in 100 games.
Parent - - By adip (*) [ro] Date 2009-10-11 21:31
ok .if you say .I though 180 elo means Rybka beat allways.when appear rybka4,you know?
Parent - - By Felix Kling (Gold) [de] Date 2009-10-11 22:07
this year I think, but I spoke to Vas in Mainz (August) last time. I don't know any release target dates.
Parent - - By adip (*) [ro] Date 2009-10-11 22:21
ok.thanks.
Parent - By adip (*) [ro] Date 2009-10-15 10:41
Still I don't kow how I play with 2 different books at once on Arena.
- By nine castles (**) [us] Date 2010-01-18 04:21
A great guide, thank you!!

Also, I also ran into the problem of the .ini file overwriting itself. My solution is to get everything set up the way I like it, then set the .ini to read only :)
Up Topic Rybka Support & Discussion / Aquarium / Using .ctg Opening Books in the Aquarium Stand Alone Adapter

Powered by mwForum 2.27.4 © 1999-2012 Markus Wichitill