From c8d10d72161e3d5b0406dea3f3e85ea61d90d11a Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Wed, 5 May 2010 13:40:59 +0200 Subject: [PATCH] UCB1AMAF: Drop both_colors support --- uct/policy/ucb1amaf.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/uct/policy/ucb1amaf.c b/uct/policy/ucb1amaf.c index 390d6e6..ac2f00a 100644 --- a/uct/policy/ucb1amaf.c +++ b/uct/policy/ucb1amaf.c @@ -25,7 +25,6 @@ struct ucb1_policy_amaf { * if none of the existing ones has higher urgency than fpu. */ float fpu; unsigned int equiv_rave; - bool both_colors; bool check_nakade; bool sylvain_rave; /* Coefficient of local tree values embedded in RAVE. */ @@ -186,8 +185,6 @@ ucb1amaf_update(struct uct_policy *p, struct tree *tree, struct tree_node *node, if (amaf_nakade(map->map[ni->coord])) { if (!b->check_nakade) continue; - /* We don't care to implement both_colors - * properly since it sucks anyway. */ unsigned int i; for (i = map->game_baselen; i < map->gamelen; i++) if (map->game[i].coord == ni->coord @@ -200,9 +197,7 @@ ucb1amaf_update(struct uct_policy *p, struct tree *tree, struct tree_node *node, float nres = result; if (amaf_color != child_color) { - if (!b->both_colors) - continue; - nres = 1 - nres; + continue; } /* For child_color != player_color, we still want * to record the result unmodified; in that case, @@ -265,8 +260,6 @@ policy_ucb1amaf_init(struct uct *u, char *arg) b->fpu = atof(optval); } else if (!strcasecmp(optname, "equiv_rave") && optval) { b->equiv_rave = atof(optval); - } else if (!strcasecmp(optname, "both_colors")) { - b->both_colors = true; } else if (!strcasecmp(optname, "sylvain_rave")) { b->sylvain_rave = !optval || *optval == '1'; } else if (!strcasecmp(optname, "check_nakade")) { -- 2.11.4.GIT