static move_queue GetDeadGroups()

in pachi_py/goutil.cpp [64:79]


static move_queue GetDeadGroups(board *b, OwnerMapPtr ownermap) {
    /* Make sure enough playouts are simulated to get a reasonable dead group list. */
    // while (u->ownermap.playouts < GJ_MINGAMES)
    //     uct_playout(u, b, color, u->t);
    if (!ownermap) {
        ownermap.reset(new OwnerMap(b));
    }

    move_queue mq = { .moves = 0 };
    gj_state gs_array[board_size2(b)];
    struct group_judgement gj = { .thres = GJ_THRES, .gs = gs_array };
    board_ownermap_judge_groups(b, &ownermap->ownermap, &gj);
    groups_of_status(b, &gj, GS_DEAD, &mq);

    return mq;
}