Not logged inRybka Chess Community Forum
Up Topic Rybka Support & Discussion / Aquarium / Merging Trees
- - By pawnslinger (****) [us] Date 2017-09-19 23:48
I have a couple of games that are following the exact same line.  Because of this I plan to do my analysis on only 1 of the trees until the games diverge.

I was wondering if there was anyway to merge the two trees into a new 3rd tree?  That would be ideal, if such a method is available.

Thanks if you can point me in the right direction.  There are some tree options in the Sandbox, but they don't seem to be what I need.  Maybe I am wrong.
Parent - By SchackMatt (**) [se] Date 2017-09-20 14:09 Edited 2017-09-20 14:52
You have project p1 and p2 with tree t1 an t2 resp. The trees are exactly the same (but physically two separate trees). Analyse one of these two until the games diverge, let say p1 with tree t1.
Now when the games diverge make tree t1 as master tree to project p2 and import lines. Now the two trees are exactly the same again and you can continue analysing both project differently.

I think this way is more simple than using the tree utilities. If the trees are not exactly the same from start you have to first copy and then crop the one you will continue to analyse. In the end you will make the analysed tree as Master tree to the one which is a copy of the original analysed tree as well as to p2.

Hope this helps.
Parent - - By SchackMatt (**) [se] Date 2017-09-20 14:50 Edited 2017-09-20 23:48
If you just want to merge trees you have the "Join tree" in Tree utilities in external programs.

Unfortunately these modules are rather messy because they have no error handling at all and at times it is not really obvious what is expected from you (typical ChessOK). If you do the slightest error (and you will!) it just presents the output which is blank without telling there is a problem and let alone guide you.
I don't really like working with the external modules and always try to find another way to handle the task, if possible.
Parent - - By pawnslinger (****) [us] Date 2017-09-20 15:14
I could not find a "merge" function in the tree utils.  I found a "join" and tried that, but it did nothing.  Nothing at all.  I am not sure that I understand how to use it.  I set the input project as one of my trees and the output project as a new tree called "p1 p2 join" and I set the "attach" tree as my p2 project.  No tree was created.  I guess I just don't understand how to make it work.  I could find nothing that said "merge" or any word that implied a "merge", except the join.  And I don't know how to make it work (or even if join is merge).  To me join is a word from "set theory" and it contains the members of the overlapping area of 2 or more sets.  But just the members that are present in all of the sets.  That is not what I want.  I do not want the overlapping portions in the result, I want ALL of the 2 trees to be combined into 1 tree.  I see little point in creating a join (as I understand what join means).
Parent - - By SchackMatt (**) [se] Date 2017-09-20 23:42 Edited 2017-09-20 23:46
Exactly what I have experienced. The function never will guide you in any way, just present an output. I certainly would use the first solution indicated by me above (utilize the master tree option in the project).
By he way join is merge according to ChessOKs documentation.

Please see the copied help text below:
Join Trees

Purpose: Merge two trees into a new one. Various options can be set.

Usage: 'Input' and 'operation.Attaching' are the input trees. The resulting tree will be written to 'output'.

'Operation.Positions' - Select which positions are added to the merged tree. You can select all positions from both trees ('Join'), only positions from the 'input' tree ('Only from source tree') or only positions that are common to both trees ('Intersect').

'Operation.Statistics' - You can join the statistics from both trees ('Join'), only use the statistics from the 'input' tree ('Only from source tree') or only from the 'operation'Attaching' tree ('Only from tree being joined'). You can also exclude all statistics by selecting 'None'.

'Operation.Evaluations' - With 'Join' you get the average of the evaluations from the two trees. 'Only from source tree' uses only the evaluations found in 'input', while 'Only from tree being joined' only uses the evaluations from 'operation.Attaching'. 'Priority to source tree' uses evaluations from 'input', where they exist, otherwise evaluations from 'operation.Attaching' are added. 'Priority to tree being joined' is the opposite of 'Priority to source tree'. 'None' excludes all evaluations.

'Operation.Moves' - 'Join' takes moves from both trees. 'Only from source tree' ignores moves from 'operation.Attaching' and 'Only from tree being joined' ignores moves from 'input'. 'None' means that no moves will be included in the merged tree.

'Operation.Annotations' - 'Join' uses annotations from both input trees. 'Only from source tree' only uses annotations from the 'input' tree and 'Only from tree being joined' uses only annotations from the 'operation.Attaching' tree. Selecting 'None' prevents any annotations from being copied to the merged tree.

'Operation.Variations' - 'Join' copies variations from both input trees to the merged tree. 'Only from source tree' only copies variations from the 'input' tree. 'Only from tree being joined' only copies variations from the operation.Attaching tree. If you select 'None', then the merged tree will not contain any variations.

The rest of the field are instructions on what to do with statistics, evaluations etc when joining (which to prefer... and so on)

Parent - - By SchackMatt (**) [se] Date 2017-09-21 00:00
According to the documentation several set operations are valid in the Join function. In the documentation they say:

"You can select all positions from both trees ('Join'), only positions from the 'input' tree ('Only from source tree') or only positions that are common to both trees ('Intersect')"
Parent - - By pawnslinger (****) [us] Date 2017-09-21 00:30
I assumed what you wrote... but as I said, I got nothing.  No new tree at all.  No positions, no evals, no new files, no new folders.  Makes me feel like a real dumb one.
Parent - - By SchackMatt (**) [se] Date 2017-09-21 00:50 Edited 2017-09-21 00:53
At some occasion I used the external programs a lot just to learn to use them. At some point I thought it took to much tme.

High on my wishlist is a graphical interface to manipulate the trees. Imaging just moving a node from one tree into another tree graphically. A common procedure in any moden systems managing trees and databases. It really isn't any rocket science.

I think though that you can easily solve your current issue by using the Master tree option in the projects.
Parent - - By pawnslinger (****) [us] Date 2017-09-21 19:43
I confess I do not use Master Trees AT ALL.  A long while ago I tried them out and did not like the way they worked.  I forget my actual problems, and it was long ago... perhaps I should give them a try again..  I think it was some sort of I/O overload issue on my old computer... perhaps my new computer could now handle it.
Parent - By SchackMatt (**) [se] Date 2017-09-21 21:28 Edited 2017-09-21 21:36
I also had some problem previously. Both concerning moving data to the master tree and the integrity of the tree itself. Since at least the last four years there I have not experienced that kind of problem.

I always use Master trees. It is a convenient way of analysing much smaller trees and to merge trees. It is also a very good way of backing up trees after an analyse. Each time I stop Idea I export the result of my analyses into a master tree.
I really recommend you to test it.
Up Topic Rybka Support & Discussion / Aquarium / Merging Trees

Powered by mwForum 2.27.4 © 1999-2012 Markus Wichitill