# Testing autoscore algorithms

I appreciated the feedback about the algorithm being arbitrary and that we should leave stones alive in more situations. Consider this example:

There’s an unsettled black stone at the top, and no matter how that gets resolved, the area behind it is dame due to the unclosed border below. The area happens to have more white than black stones on its border, but that does seem like a really arbitrary reason to call the stone dead. I think it’s better to call unsettled stones alive if they are in dame.

So, here’s my autoscore v3 proposal:

• Chains of unsettled area (open/unsettled/dead) are considered as a whole.
• Count the white/black stones on the boundary of each area, not counting stones touching only unsettled stones; consider “dead” stones that would be in dame to be unsettled.
• If the whole boundary is one color, mark unsettled stones of the opposite color dead.
• Otherwise leave all unsettled stones alive (the area will be dame).
Some code details
``````function run_algorithm() {
compute_combined_ownership()
find_regions()

// use combined_ownership to compute a temporary resolution of regions
// as black, white, or dame
resolve_regions(combined_ownership)

// do it again with the newly unsettled stones!
resolve_regions(combined_ownership2)

compute_algorithm_ownership() // uses combined_ownership2
}

``````

You can see how v3 does on the above board position here. (Also, I added something so you can edit the board position without having to create an actual game for it.)

### Some more examples (clickable)

Unsettled stones surrounded by white. (@Vsotvep I still want to know, did you intend to award that entire area to Black with your proposal?

KataGo considers the top black stone dead no matter who plays first. That would be a dead stone in dame, so we call it unsettled. But except for the one next to it, there are no other live white stones bordering the region, so we call that a Black region. Let’s see what happens if the White group is alive instead:

The unsettled stone at the top stays alive because it’s in dame.

The surprise seki is not revealed.

Of course it also works with the latest one from the other thread:

Now can anyone find a really surprising or arbitrary result with this v3 algorithm?

1 Like