[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnugo-devel] arend_3_5.2: semeai status update revised
From: |
Arend Bayer |
Subject: |
[gnugo-devel] arend_3_5.2: semeai status update revised |
Date: |
Sat, 22 Jun 2002 15:10:34 +0200 (CEST) |
- Don't change critical dragons to dead due to semeai results
- DEBUG_SEMEAI trace enhancements
This patch is independent of arend_3_5.1a. It cures two FAILS of
cvs + arend_3_5.1a, but also looses two PASSes (one of them caused by a
tactical reading mistake). I still think it is an improvement:
If a dragon is critical according to owl, but dead according to the semeai
code, we should rather trust the owl code.
I am also not very sure about other rules in new_semeai(). It's not that the
logic seems wrong to me, but it seems not very robust with respect to
inconsistend semeai results; it can only be guess-work then, of course.
With respect to the regressions caused by arend_3_5.1a, they seem to be
pretty much bad luck. In the cases I looked at, cvs version was helped by
some incorrect owl boundary states. I am not satisfied with this, of course.
Arend
diff -X /home/arend/.diffignore -ur ./engine/semeai.c
../gnugo-push-semeai-owl2/engine/semeai.c
--- ./engine/semeai.c Sat Mar 23 02:34:52 2002
+++ ../gnugo-push-semeai-owl2/engine/semeai.c Fri Jun 21 23:54:06 2002
@@ -199,6 +199,9 @@
apos, bpos);
owl_analyze_semeai(apos, bpos,
best_result_a+k, worst_result_b+k, move+k, 1);
+ DEBUG(DEBUG_SEMEAI, "Result1: %s %s %1m, ",
+ safety_to_string(best_result_a[k]),
+ safety_to_string(worst_result_b[k]), move[k]);
if (a_best_status == DEAD
|| a_best_status == UNKNOWN
|| (a_best_status == ALIVE_IN_SEKI
@@ -208,6 +211,9 @@
}
owl_analyze_semeai(bpos, apos,
best_result_b+k, worst_result_a+k, NULL, 1);
+ DEBUG(DEBUG_SEMEAI, "Result2 %s %s.\n",
+ safety_to_string(best_result_b[k]),
+ safety_to_string(worst_result_a[k]));
if (b_best_status == DEAD
|| b_best_status == UNKNOWN
|| (b_best_status == ALIVE_IN_SEKI
@@ -281,19 +287,23 @@
update_status(int dr, int new_status, int new_safety)
{
int pos;
- if (dragon[dr].matcher_status != new_status)
+
+ if (dragon[dr].matcher_status != new_status
+ && (dragon[dr].matcher_status != CRITICAL || new_status != DEAD)) {
DEBUG(DEBUG_SEMEAI, "Changing matcher_status of %1m from %s to %s.\n", dr,
status_to_string(dragon[dr].matcher_status),
status_to_string(new_status));
- if (DRAGON2(dr).safety != new_safety)
+ for (pos = BOARDMIN; pos < BOARDMAX; pos++)
+ if (IS_STONE(board[pos]) && is_same_dragon(dr, pos))
+ dragon[pos].matcher_status = new_status;
+ }
+
+ if (DRAGON2(dr).safety != new_safety
+ && (DRAGON2(dr).safety != CRITICAL || new_safety != DEAD)) {
DEBUG(DEBUG_SEMEAI, "Changing safety of %1m from %s to %s.\n", dr,
safety_to_string(DRAGON2(dr).safety), safety_to_string(new_safety));
-
- for (pos = BOARDMIN; pos < BOARDMAX; pos++)
- if (IS_STONE(board[pos]) && is_same_dragon(dr, pos))
- dragon[pos].matcher_status = new_status;
-
- DRAGON2(dr).safety = new_safety;
+ DRAGON2(dr).safety = new_safety;
+ }
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnugo-devel] arend_3_5.2: semeai status update revised,
Arend Bayer <=