[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] Floating point arithmetics
From: |
nando |
Subject: |
Re: [gnugo-devel] Floating point arithmetics |
Date: |
Mon, 20 Sep 2004 12:27:05 +0200 |
Hi again,
Following patch and results are relative to nando_7_1.1
The basic idea is simple : reduce the branching factor by progressively
constraining the "delta-distances" between the candidate moves.
Performance impact :
Total nodes: 1624509689 (-1.7%) 2968938 (-eps) 13043774 (-4.3%)
Total time: 8348.65 (-2.1%) (8352.54)
Regressions delta :
break_in:100 pass [0] [0] (fails in nando_7_1.1)
nicklas2:2103 FAIL C1 [PASS]
nngs:1260 PASS G18 [G18|F18]
I was about to analyze those, but I've just got an emergency with a
severe crash on our main server. I'll try to come back to it as soon
as I can.
-- nando
- new heuristic to reduce branching factor in connection reading.
Index: engine/readconnect.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/readconnect.c,v
retrieving revision 1.83
diff -u -p -r1.83 readconnect.c
--- engine/readconnect.c 24 Aug 2004 14:39:53 -0000 1.83
+++ engine/readconnect.c 20 Sep 2004 08:02:06 -0000
@@ -2601,16 +2601,28 @@ find_connection_moves(int str1, int str2
/* Filter out moves with distance at least 1.5 more than the best
* move, or with distance higher than the cutoff specified.
+ *
+ * In order to further reduce the branching factor, a decreasing
+ * cutoff is applied between candidates. For instance, in this case
+ * 1. d 2. d+0.5 3. d+1.0 4. d+1.5
+ * the 4th candidate will be tested, while in following one
+ * 1. d 2. d+0.1 3. d+0.2 4. d+1.5
+ * it will be discarded.
*/
if (num_moves <= 1 || !is_ko(moves[0], color_to_move, NULL))
distance_limit = distances[0] + FP(1.5);
else
distance_limit = distances[1] + FP(1.5);
- for (r = 0; r < num_moves; r++)
+ for (r = 0; r < num_moves; r++) {
+ if (r > 0
+ && distances[r] > distances[r-1]
+ && distances[r] - distances[r-1] > (8 - r) * FP(0.2))
+ break;
if (distances[r] > distance_limit
|| distances[r] > cutoff)
break;
+ }
num_moves = r;
return num_moves;