Ticket #50 (closed enhancement: fixed)

Opened 6 years ago

Last modified 6 years ago

Connection reading improvement.

Reported by: gunnar Owned by: gnugo
Priority: normal Milestone: 3.7.8
Component: source Version:
Severity: normal Keywords:
Cc: patch: yes

Description (last modified by gunnar) (diff)

This small patch tries to improve the connection reading by forcing it to consider two moves when, although the first one looks much better, the second move is still very good.

Regression results:

connection:97   PASS 1 O5 [1 O5]
connection:105  PASS 1 G7 [1 G7]
connection:115  PASS 1 H7 [1 H7]
connection:117  PASS 3 E7 [3 E7]
connection:122  PASS 3 E16 [3 E16]
connection:123  PASS 3 E11 [3 E11]
connection:124  PASS 1 E11 [1 E11]
connection:125  PASS 3 E11 [3 E11]
break_in:100    FAIL 1 D9 [0]
trevora:370     FAIL B3 [F6]
nngs:1260       FAIL C11 [G18|F18]
trevord:260     FAIL D6 [Q2]
nngs4:760       PASS Q15 [Q15]
century2002:150 FAIL A18 [B18]
manyfaces1:160  PASS O5 [O5]
gunnar:71       PASS D5 [D5]
nando:33        PASS H11 [H11]
12 PASS
5 FAIL
Total nodes: 1672336197 3249055 12337811 (+1.5% +0.35% +3.9%)

Attachments

gunnar_7_8.10.diff Download (820 bytes) - added by gunnar 6 years ago.
connection reading improvement
gunnar_7_8.10b.diff Download (1.6 KB) - added by gunnar 6 years ago.
connection reading improvement plus proposed testcase revisions

Regression Results

Attachment Rev. PASS FAIL Nodes Status
gunnar_7_8.10.diff Download never tested
gunnar_7_8.10b.diff Download never tested

Change History

Changed 6 years ago by gunnar

connection reading improvement

comment:1 Changed 6 years ago by arend

  • patch set

comment:2 Changed 6 years ago by gunnar

connection:97   PASS 1 O5 [1 O5]
connection:105  PASS 1 G7 [1 G7]
connection:115  PASS 1 H7 [1 H7]
connection:117  PASS 3 E7 [3 E7]

These all look good.

connection:122  PASS 3 E16 [3 E16]

Very, very important. A major improvement.

connection:123  PASS 3 E11 [3 E11]
connection:124  PASS 1 E11 [1 E11]
connection:125  PASS 3 E11 [3 E11]

These are all similar to connection:122.

break_in:100    FAIL 1 D9 [0]
trevora:370     FAIL B3 [F6]

These are the same position. According to Arend it's a problem with node limits and generally inadequate reading both with and without the patch.

nngs:1260       FAIL C11 [G18|F18]

An owl attack at C11 is found, which seems bogus. Still this is not easy to read out and far beyond what can be expected from GNU Go. I think it would be better to restrict this testcase to the original problem in the game. I propose changing it to "restricted_genmove white F18 G18 L18".

trevord:260     FAIL D6 [Q2]

A cut between D4 and E6 is found, which is good (although it should have a ko result). The real problem here is with the move valuation, which is accidental with respect to this patch.

nngs4:760       PASS Q15 [Q15]

Good. A ko contingent cut of Q14/Q16 is now found.

century2002:150 FAIL A18 [B18]

There is no strong reason not to allow A18 as well (only disadvantage is that it leaves one ko threat in the corner). However, A18 was without the patch valued lower than B18 only due to a break_in mistake, which is fixed by this patch.

manyfaces1:160  PASS O5 [O5]

Very good.

gunnar:71       PASS D5 [D5]

Accidental. A cut of C6/D4 is found at C5. While technically correct it's not very useful and not relevant in the position.

nando:33        PASS H11 [H11]

Probably good.

comment:3 Changed 6 years ago by gunnar

Conclusion

Many good or important PASSES, no significant FAIL. The only problem is that it's slightly expensive with respect to speed but I would say that connection:122 alone is worth it.

Changed 6 years ago by gunnar

connection reading improvement plus proposed testcase revisions

comment:4 Changed 6 years ago by gunnar

  • Status changed from new to closed
  • Resolution set to fixed
  • Description modified (diff)

comment:5 Changed 6 years ago by gunnar

  • Status changed from closed to reopened
  • Resolution fixed deleted

This patch doesn't handle the case of only one generated move correctly and needs the following correction:

Index: engine/readconnect.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/readconnect.c,v
retrieving revision 1.96
diff -u -r1.96 readconnect.c
--- engine/readconnect.c	3 Nov 2005 22:51:55 -0000	1.96
+++ engine/readconnect.c	11 Jan 2006 09:59:14 -0000
@@ -2618,7 +2618,8 @@
   /* Special case: If the second best move has a distance less than 1,
    * include it if even if the best move has a very low distance.
    */
-  if (distances[1] < FP(1.0)
+  if (num_moves > 1
+      && distances[1] < FP(1.0)
       && distances[1] > distance_limit)
     distance_limit = distances[1];
   

comment:6 Changed 6 years ago by gunnar

  • Status changed from reopened to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.