From 3d0d9b62ef35367c8ed432173f63cb89256bfe66 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Tue, 13 Oct 2009 01:22:09 +0200 Subject: [PATCH] play_random_game(), uct_playout(): Do not consider the 0th move actually a pass --- playout.c | 2 +- uct/uct.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/playout.c b/playout.c index 09bee74..90130ee 100644 --- a/playout.c +++ b/playout.c @@ -23,7 +23,7 @@ play_random_game(struct board *b, enum stone starting_color, int gamelen, enum stone color = starting_color; coord_t urgent; - int passes = is_pass(b->last_move.coord); + int passes = is_pass(b->last_move.coord) && b->moves > 0; while (gamelen-- && passes < 2) { urgent = policy->choose(policy, b, color); diff --git a/uct/uct.c b/uct/uct.c index fc6c269..941a523 100644 --- a/uct/uct.c +++ b/uct/uct.c @@ -153,7 +153,7 @@ uct_playout(struct uct *u, struct board *b, enum stone player_color, struct tree int result; int pass_limit = (board_size(&b2) - 2) * (board_size(&b2) - 2) / 2; - int passes = is_pass(b->last_move.coord); + int passes = is_pass(b->last_move.coord) && b->moves > 0; /* debug */ int depth = 0; -- 2.11.4.GIT