From fed160da05a66a2a614fbd8b1f4fc3cf1fe98ee0 Mon Sep 17 00:00:00 2001 From: Jean-loup Gailly Date: Sat, 27 Aug 2011 12:24:03 +0200 Subject: [PATCH] UCT linear dynkomi: make it default, set val_scale=0 & sure_win_threshold=0.9 The adaptive phase of linear dynkomi works well on KGS, allowing wins by many points (val_scale > 0 wasn't performing well for this). Also allow the adaptive phase to start earlier (works better on KGS). sure_win_threshold raised to be > green_zone. --- uct/dynkomi.c | 6 +++--- uct/uct.c | 16 +++++++--------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/uct/dynkomi.c b/uct/dynkomi.c index 3ed4145..be524d0 100644 --- a/uct/dynkomi.c +++ b/uct/dynkomi.c @@ -139,14 +139,14 @@ uct_dynkomi_init_linear(struct uct *u, char *arg, struct board *b) * By move 100 white should still be behind but should have * caught up enough to avoid resigning. */ if (board_large(b)) { - l->moves[S_BLACK] = 150; - l->moves[S_WHITE] = 100; + l->moves[S_BLACK] = 100; + l->moves[S_WHITE] = 50; } /* The real value of one stone is twice the komi so about 15 points. * But use a lower value to avoid being too pessimistic as black * or too optimistic as white. */ l->handicap_value[S_BLACK] = 8; - l->handicap_value[S_WHITE] = 2; + l->handicap_value[S_WHITE] = 1; l->komi_ratchet = INFINITY; l->green_zone = 0.85; diff --git a/uct/uct.c b/uct/uct.c index c7f3f39..03a743e 100644 --- a/uct/uct.c +++ b/uct/uct.c @@ -532,7 +532,7 @@ uct_state_init(char *arg, struct board *b) u->debug_level = debug_level; u->gamelen = MC_GAMELEN; u->resign_threshold = 0.2; - u->sure_win_threshold = 0.85; + u->sure_win_threshold = 0.9; u->mercymin = 0; u->significant_threshold = 50; u->expand_p = 8; @@ -555,7 +555,7 @@ uct_state_init(char *arg, struct board *b) u->best2_ratio = 2.5; u->max_maintime_ratio = 3.0; - u->val_scale = 0.04; u->val_points = 40; + u->val_scale = 0; u->val_points = 40; u->dynkomi_interval = 1000; u->dynkomi_mask = S_BLACK | S_WHITE; @@ -828,9 +828,8 @@ uct_state_init(char *arg, struct board *b) if (!strcasecmp(optval, "none")) { u->dynkomi = uct_dynkomi_init_none(u, dynkomiarg, b); } else if (!strcasecmp(optval, "linear")) { - /* You should set dynkomi_mask=1 - * since this doesn't work well - * for white handicaps! */ + /* You should set dynkomi_mask=1 or a very low + * handicap_value for white. */ u->dynkomi = uct_dynkomi_init_linear(u, dynkomiarg, b); } else if (!strcasecmp(optval, "adaptive")) { /* There are many more knobs to @@ -842,9 +841,8 @@ uct_state_init(char *arg, struct board *b) } } else if (!strcasecmp(optname, "dynkomi_mask") && optval) { /* Bitmask of colors the player must be - * for dynkomi be applied; you may want - * to use dynkomi_mask=3 to allow dynkomi - * even in games where Pachi is white. */ + * for dynkomi be applied; the default dynkomi_mask=3 allows + * dynkomi even in games where Pachi is white. */ u->dynkomi_mask = atoi(optval); } else if (!strcasecmp(optname, "dynkomi_interval") && optval) { /* If non-zero, re-adjust dynamic komi @@ -1010,7 +1008,7 @@ uct_state_init(char *arg, struct board *b) } if (!u->dynkomi) - u->dynkomi = uct_dynkomi_init_adaptive(u, NULL, b); + u->dynkomi = uct_dynkomi_init_linear(u, NULL, b); /* Some things remain uninitialized for now - the opening tbook * is not loaded and the tree not set up. */ -- 2.11.4.GIT