This means that sgf writing needs to add the parens only for the nodes that have >1 branches - but this is strictly an optimization, really.
The current-path would then represent each choice down every node, as opposed to the currently compact form. ie - in the vector format, to get to :i, the path was [2 2], with move-count 4 - where the new method only requires a path from root branches - [0 0 1 0] (get-in root [:branches 0 :branches 0 :branches 1 :branches 0]) and no move count required (since you always get back the node.
Currently it uses a 'easy' vector format :
While this is optimized in the sense of efficiency, readability and exporting, it isn't great from a manipulation point of view.
A better solution would to treat each node as if the successive step has multiple branches always - so:
Would be the direct equivalent.
This means that sgf writing needs to add the parens only for the nodes that have >1 branches - but this is strictly an optimization, really.
The current-path would then represent each choice down every node, as opposed to the currently compact form. ie - in the vector format, to get to :i, the path was [2 2], with move-count 4 - where the new method only requires a path from root branches - [0 0 1 0]
(get-in root [:branches 0 :branches 0 :branches 1 :branches 0])
and no move count required (since you always get back the node.