Arend wrote:
> In the attached file, the variation 90 gets mixed in with variations
> 84-88, where it shouldn't belong; i.e. two different branches cross each
> other in the sgf tree view.
Indeed. I have an optimization patch lying around, but it seems I should
postpone it for a while, to let the algorithm be tested well. Because the
optimization would basically create copies of it...
I guess you made use of the text search functionality for things like
``variation 1234''.
Here is a fix (also fixed a similar bug):
--- src/sgf/sgf-tree-map.c 25 Dec 2004 01:26:10 +0200 1.2
+++ src/sgf/sgf-tree-map.c 29 Dec 2004 00:46:36 +0200
@@ -340,7 +340,7 @@ update_internal_view_port (SgfGameTree *
else {
do
y_level[x++] = y;
- while (x <= branch_leaf_x);
+ while (y_level[x] < y);
x = line_pointer->x2;
}
@@ -371,6 +371,12 @@ update_internal_view_port (SgfGameTree *
if (y >= y_level[last_valid_y_level])
last_valid_y_level = x;
+ else {
+ int x_scan;
+
+ for (x_scan = x + 1; y_level[x_scan] < y; x_scan++)
+ y_level[x_scan] = y;
+ }
if (IS_WITHIN_VIEW_PORT (x, y))
WRITE_VIEW_PORT_NODE (x, y, node);
> (In case you wonder, the file is generated by a recursive
> attack_either/defend_both reading I am trying to implement for GNU Go.)
I think this has been already tried with no good results by both Evan
and me. But maybe you are more lucky.
Paul