KataGo icon indicating copy to clipboard operation
KataGo copied to clipboard

[Question] Is it possible to calculate partial territory scores from ownership for Japanese rule?

Open y-ich opened this issue 4 years ago • 5 comments

Hi.

kaorahi san's LizGoban nicely calculates and shows partial area scores from ownership information.

I am interested in this functionality for Japanese rule, about territories. Just removing stone parts from LizGoban algorithm seems to overestimate scores.

What do you guys, who are reading this issue, think about it? Is it possible?

y-ich avatar Aug 08 '21 05:08 y-ich

GNU Go has a GTP extend command can calculate territory, in this command, the "wall" of every part territory is 0, the dead stone is 2, other is 1. Although it is a whole board command, you can turn it into part board command by easy program. http://www.gnu.org/software/gnugo/gnugo_19.html#SEC200 initial_influence: Return information about the initial influence function. Arguments: color to move, what information Fails: never Returns: Influence data formatted like:

0.51 1.34 3.20 6.60 9.09 8.06 1.96 0.00 0.00 0.45 1.65 4.92 12.19 17.47 15.92 4.03 0.00 0.00 . . . 0.00 0.00 0.00 0.00 0.00 100.00 75.53 41.47 23.41

The available choices of information are:

white_influence (float) black_influence (float) white_strength (float) black_strength (float) white_attenuation (float) black_attenuation (float) white_permeability (float) black_permeability (float) territory_value (float) influence_regions (int) non_territory (int)

The encoding of influence_regions is as follows: 4 white stone 3 white territory 2 white moyo 1 white area 0 neutral -1 black area -2 black moyo -3 black territory -4 black stone

HackYardo avatar Aug 11 '21 02:08 HackYardo

How about excluding "boundary" grids? A grid is assumed as a "boundary" if, around it, there is another grid whose ownership has the opposite sign.

(not tested at all) https://github.com/kaorahi/lizgoban/tree/territory_210825b

Though it still overestimates the territory as it counts false eyes...

kaorahi avatar Aug 25 '21 14:08 kaorahi

Partial scores are bogus anyway. So I show the difference between "the sum of partial scores" and "Katago's score estimation" on the top right corner as "+n". bogus_territory

kaorahi avatar Aug 25 '21 14:08 kaorahi

@kaorahi If a go game end after all endgame moves, will the difference be zero?

HackYardo avatar Aug 26 '21 09:08 HackYardo

No. After the endgame, "+n" shows the difference of captured stones between black and white typically.

kaorahi avatar Aug 29 '21 14:08 kaorahi