From: Petr Baudis Date: Sun, 12 Aug 2012 12:18:41 +0000 (+0200) Subject: UCT virtual_loss: Allow setting virtual_loss to arbitrary values X-Git-Tag: pachi-10.00-satsugen~6 X-Git-Url: https://repo.or.cz/w/pachi.git/commitdiff_plain/96fceb38d818c59907c219b16316bd50f6f6ae9c UCT virtual_loss: Allow setting virtual_loss to arbitrary values --- diff --git a/uct/uct.c b/uct/uct.c index d904640..c18cf06 100644 --- a/uct/uct.c +++ b/uct/uct.c @@ -824,9 +824,9 @@ uct_state_init(char *arg, struct board *b) fprintf(stderr, "UCT: Invalid thread model %s\n", optval); exit(1); } - } else if (!strcasecmp(optname, "virtual_loss")) { + } else if (!strcasecmp(optname, "virtual_loss") && optval) { /* Number of virtual losses added before evaluating a node. */ - u->virtual_loss = !optval || atoi(optval); + u->virtual_loss = atoi(optval); } else if (!strcasecmp(optname, "pondering")) { /* Keep searching even during opponent's turn. */ u->pondering_opt = !optval || atoi(optval);