Auto-score improvements

I made another case that might be an interesting test. Black vs. White. But I don’t know how to test OGS on it. How do you fork a game to play against yourself to test a case? Do you need multiple accounts? I tried the ‘goban’ repo as @anoek suggested above but I got an error like:
Error: autoscore_test_files/game_64848549.json correct_ownership field contains "?" which is invalid

Maybe someone else can run it to see how OGS does?

Anyways, for the game I linked, here’s how the territory scoring algorithm at Territory Scoring Test handles it once dead stones are marked:

  • A19 - this is a (false) eye in seki and so is not a point for black.

  • M19 area, T19 - these are also eyes in seki and are not points in territory. As a deliberate choice, M19 and N19 are still counted as points for captures because they are marked as dead even though the territory underneath the stones is not (and should never be) counted. This is a slight departure from the Japanese rules that mandate that you physically capture such stones during play before ending the game. Gven the realities of server play and interfaces it’s a deliberate choice from the scorer:

Behaving more strictly could require careful corresponding UI work, since if stones that users explicitly mark to be dead are sometimes not counted as points, it may be confusing for users, and it may not be easy to see or know when they are and are not.

This choice is also more “AI-resistant” in that AI ownership markings will likely always mark such stones as dead (because future play will trivially be able to kill them), and so we should just count them as points rather than confusing users with a magically tricky exception that in this one special case, marked-dead stones somehow don’t count as points.

Obviously, in this particular case black should capture them and force white to throw in once more, gaining an additional point, but it’s not the scorer’s job to determine that, so we deliberately score only 2 points here for the marked stones, not 3. (And still zero for the territory).

  • S12 area, T8 - similar thing going on here. No territory, but a point for the dead-marked stone. This is a seki. Part of what also makes this interesting is the bamboo joint here - the solver is good enough that it doesn’t screw up recognition of the seki.

  • T4 area, T1 - also a seki. No territory. It doesn’t matter that the seki is “collapsible” if black plays S2 and can kill white’s stones, because white can kill S5 and T5 in return, and that’s enough for white’s stones to be decreed alive and this to be a seki if scored as-is.

  • A3, C3 - also false eyes in seki, no territory here.

Okay, that’s the sekis. Next, we have optional false-eye non-scoring, which is a convenience that KGS and most other online servers offer. It’s not mandatory to have these - it’s also a consistent choice to decide to count all of these as territory and have players fill the dame to force the protections. And the algorithm I implemented offers an option that can do that, if desired. But otherwise, by default it will not count the points:

  • E5, L4, N13 - the algorithm detects correctly that these can never be a point of territory.
  • A8, A9 - the algorithm detects correctly that these both can never be points of territory, due to the presence of the throw-in stone, but still counts 1 point for the marked dead throw-in stone.
  • L8 - the algorithm correctly detects that this can never be a point of territory, despite the bamboo joint above that a naive algorithm might think it could reach the upper group (If it could actually manage to connect out that way, then the false-eye-point would become scorable, like so:)
    image
  • D9 - the algorithm intentionally does NOT detect the necessary protection here to future double-atari. Neither does KGS nor (as far as I know) other popular servers. And deliberately so - the convenience to exclude territory points is only offered for “obvious” false eye spots, and is not meant to replace player judgment in any more interesting cases where protection is needed.

Anyways, if you like, seki detection algorithm at GitHub - lightvector/goscorer: Territory scoring in Go with seki detection can still toggle this.

8 Likes