Skip to content

Commit

Permalink
Elo, probdist: Do not needlessly consider board edges
Browse files Browse the repository at this point in the history
  • Loading branch information
pasky committed Jul 3, 2010
1 parent e50f1db commit 3c60f0d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions playout/elo.c
Expand Up @@ -223,6 +223,10 @@ playout_elo_choose(struct playout_policy *p, struct board *b, enum stone to_play
foreach_8neighbor(b, b->last_move.coord) {
if (c == b->ko.coord)
continue; // already ignored
if (board_at(b, c) != S_NONE) {
assert(probdist_one(pd, c) == 0);
continue;
}
ignore_move(c);

fixp_t val = double_to_fixp(fixp_to_double(probdist_one(pd, c)) * b->gamma->gamma[FEAT_CONTIGUITY][1]);
Expand Down
4 changes: 2 additions & 2 deletions probdist.c
Expand Up @@ -18,8 +18,8 @@ probdist_pick(struct probdist *restrict pd, coord_t *restrict ignore)
if (DEBUGL(6))
fprintf(stderr, "stab %f / %f\n", fixp_to_double(stab), fixp_to_double(total));

int r = 0;
coord_t c = 0;
int r = 1;
coord_t c = board_size(pd->b) + 1;
while (stab > pd->rowtotals[r]) {
if (DEBUGL(6))
fprintf(stderr, "[%s] skipping row %f (%f)\n", coord2sstr(c, pd->b), fixp_to_double(pd->rowtotals[r]), fixp_to_double(stab));
Expand Down

0 comments on commit 3c60f0d

Please sign in to comment.