influence concensus map

For discussing go computing, software announcements, etc.
jaca

influence concensus map

Post by jaca »

i was discussing the concepts of sente and kikashi with my opp in an online game review in which i was white (m..) and my opp was black (W..).

in the game black had played at L4.

i thought this was sente, but not kikashi. so white has a choice of defending or ignoring. we looked at how much territory white would get if he defends, and then i wanted to compare that with how much white could instead gain by playing elsewhere, such as extending D15 towards the black influence on the left so as to reduce it.

i wanted to draw a picture of influence to illustrate what i was saying. so i drew some circles on the board where i thought the boundary of black's influence was (see second picture).

the online client software doesn't have an influence map feature, so i then downloaded the sgf and fed it through pnprog's gomap and Leela 0.11.0 to see what they thought.
leelagomap.png
leelagomap.png (289.23 KiB) Viewed 17733 times
there are some differences, but many similarities, so i thought maybe a "concensus" view obtained by normalising and adding (or anding) the maps together would be interesting. this is what i got from a rough guess of how the sums would come out - my concensus map uses two influence values on points: strong = big blob, and weak= little blob; it is possible for a stone to be influenced by the other colour, although that isn't the case in this example - Leela thinks white L5 is surrounded by black influence, but gomap thinks it isn't. The circles are what i had drawn on the board during our review:
sabakimap.png
sabakimap.png (518.35 KiB) Viewed 17733 times
questions:
1. if you are a kyu, would such a map be useful to you for reviews or self-study?
2. if you are a dan, how accurate would you say the concensus map is? i had imagined that the black wall would extend influence as far as the circles (which i had drawn by hand at the time in our review), but both softwares had it stopping short of that - there is aji in the wall at F4 for example, so maybe it's not as thick as i had thought?
mhlepore
Lives in gote
Posts: 390
Joined: Sun Apr 22, 2012 9:52 am
GD Posts: 0
KGS: lepore
Has thanked: 81 times
Been thanked: 128 times

Re: influence concensus map

Post by mhlepore »

I have no idea what the precise answer is, but I can say this much:

- I'd rather be black in this game.
- I heard a proverb that when estimating the score, you should think of groups that are not alive as counting as negative 20 points on the board. It isn't just that you are not alive and may die, but your opponent can make points hassling your weak-ish groups. It is for this reason that I think B has a good position.
- It seems you got into trouble several moves before the snapshot you present. I think you would benefit from showing us the whole game.
Uberdude
Judan
Posts: 6727
Joined: Thu Nov 24, 2011 11:35 am
Rank: UK 4 dan
GD Posts: 0
KGS: Uberdude 4d
OGS: Uberdude 7d
Location: Cambridge, UK
Has thanked: 436 times
Been thanked: 3718 times

Re: influence concensus map

Post by Uberdude »

I think influence maps are a red herring here and you should think about the fundamental concepts of connection and separation.
Bill Spight
Honinbo
Posts: 10905
Joined: Wed Apr 21, 2010 1:24 pm
Has thanked: 3651 times
Been thanked: 3373 times

Re: influence concensus map

Post by Bill Spight »

Uberdude wrote:I think influence maps are a red herring here and you should think about the fundamental concepts of connection and separation.
Before Monte Carlo Tree Search (MCTS) came on the scene and made a great advance in the skill level of go bots, go researchers had collectively spent 40 years trying to come up with a good influence functions and maps. Some of their attempts did incorporate the concepts of connection and separation. If they had been successful, MCTS bots would not have made such a marked advance.

I do think that an influence map produced by having a top bot play itself from the current position 1,000,000 times could be quite educational, however. :)
The Adkins Principle:
At some point, doesn't thinking have to go on?
— Winona Adkins

Visualize whirled peas.

Everything with love. Stay safe.
Uberdude
Judan
Posts: 6727
Joined: Thu Nov 24, 2011 11:35 am
Rank: UK 4 dan
GD Posts: 0
KGS: Uberdude 4d
OGS: Uberdude 7d
Location: Cambridge, UK
Has thanked: 436 times
Been thanked: 3718 times

Re: influence concensus map

Post by Uberdude »

Bill, in case it wasn't clear, I didn't mean influence maps in general are a red herring (though as you say they haven't been useful in making a strong bot, plus isn't the left image pnprog's implementation of djhbrown's influence function?), but that on this particular board I think a kyu player would do better to think about the position and what will be good moves by sticking with basic ideas of connection rather than turning to an influence map for help.

On the more general side, a reservation I've always had is how is an influence map, most algorithms for which I've seen are basically some smooth proximity decay sort of function, going to cope with the non-smooth nature of go (stones have to be on the lines) and the way shifting one line can make a big difference to how much that player controls that area. For example what would an influence map say is going on in these corners?
Click Here To Show Diagram Code
[go]$$B White can easily live in corner
$$ . . . . . . . . . |
$$ . . . . . . . . . |
$$ . . . . . X . . . |
$$ . . X . . . . . . |
$$ . . . . . . . . . |
$$ . . . . . . . . . |
$$ ------------------+[/go]
Click Here To Show Diagram Code
[go]$$B White only has a ko in corner
$$ . . . . . . . . . |
$$ . . . . . . . . . |
$$ . . . . . X . . . |
$$ . . . X . . . . . |
$$ . . . . . . . . . |
$$ . . . . . . . . . |
$$ ------------------+[/go]
Click Here To Show Diagram Code
[go]$$B Probably black's corner
$$ . . . . . . . . . |
$$ . . . . . . . . . |
$$ . . . . . , X . . |
$$ . . . X . . . . . |
$$ . . . . . . . . . |
$$ . . . . . . . . . |
$$ ------------------+[/go]
Click Here To Show Diagram Code
[go]$$B Almost certainly black's corner
$$ . . . . . . . . . |
$$ . . . . . . . . . |
$$ . . . . . , X . . |
$$ . . . . X . . . . |
$$ . . . . . . . . . |
$$ . . . . . . . . . |
$$ ------------------+[/go]
Or am I expecting such a map to do too much (more like an influence and likely-territory map). In order to reflect the invasion possibilities under stones on the 4th line perhaps one approach is the edge of the board can generate influence rays for the opposite colour (it's easy for the invader to make a base there) but that these can be overpowered by the influence rays from real stones but with a rapid decay after 2 lines travel.
User avatar
pnprog
Lives with ko
Posts: 286
Joined: Thu Oct 20, 2016 7:21 am
Rank: OGS 7 kyu
GD Posts: 0
Has thanked: 94 times
Been thanked: 153 times

Re: influence concensus map

Post by pnprog »

Uberdude wrote:isn't the left image pnprog's implementation of djhbrown's influence function?
Yes it is... up to some point: IIRC after several rounds of definition by him and implementation by me, djhbrown was still not 100% happy with the rule set he had devised for the map. And at that point I stopped working on this tool to fully focus on GRP.
Maybe a updated finale version of the map rules set is available on his blog: http://lcipm.blogspot.com/
I am the author of GoReviewPartner, a small software aimed at assisting reviewing a game of Go. Give it a try!
Bill Spight
Honinbo
Posts: 10905
Joined: Wed Apr 21, 2010 1:24 pm
Has thanked: 3651 times
Been thanked: 3373 times

Re: influence concensus map

Post by Bill Spight »

Uberdude wrote:On the more general side, a reservation I've always had is how is an influence map, most algorithms for which I've seen are basically some smooth proximity decay sort of function, going to cope with the non-smooth nature of go (stones have to be on the lines) and the way shifting one line can make a big difference to how much that player controls that area.
IMO, you hit the nail on the head. :)
For example what would an influence map say is going on in these corners?
I thought it might be fun to show the maps for my influence function. I dipped my toe into influence functions in the early 2000s. I found a function that produces correct territory estimates in certain well defined situations. To my surprise, when applied to the whole board, it produced a komi estimate of around 8. :shock: Surprisingly close. So I thought it might make a reasonable first approximation, despite its oversimplification and other flaws.

These days, I do think that it would be possible to train neural nets to produce good influence functions. Not that bots would use the functions in actual play, but they would be an aid to humans to help understand go positions.

My maps are quite simple, They indicate which points more than ⅓ belong to each player. (This is by fuzzy logic, not probability.)
Click Here To Show Diagram Code
[go]$$B Influence = 27.4
$$ . . . . . . . . . . |
$$ . . . . . . x . . . |
$$ . . . x x x x x . . |
$$ . . x x x x X x x . |
$$ . x x X x x x x . . |
$$ . . x x x x x . . . |
$$ . . . x . . . . . . |
$$ --------------------+[/go]
Click Here To Show Diagram Code
[go]$$B Influence = 25.9
$$ . . . . . . . . . . |
$$ . . . . x x x . . . |
$$ . . . x x x x x . . |
$$ . . x x x x X x x . |
$$ . . x x X x x x x . |
$$ . . . x x x x x . . |
$$ . . . . x x x . . . |
$$ --------------------+[/go]
Click Here To Show Diagram Code
[go]$$B Influence = 26.6
$$ . . . . . . . . . |
$$ . . . . . . x . . |
$$ . . . x x x x x . |
$$ . . x x x x X x x |
$$ . x x X x x x x . |
$$ . . x x x x x . . |
$$ . . . x . . . . . |
$$ ------------------+[/go]
Click Here To Show Diagram Code
[go]$$B Influence = 25.0
$$ . . . . . . . . . |
$$ . . . . x x x . . |
$$ . . . x x x x x . |
$$ . . x x x x X x x |
$$ . . x x X x x x x |
$$ . . . x x x x x . |
$$ . . . . x x x . . |
$$ ------------------+[/go]
It is obvious that this map underestimates the influence of the Black stones in the corner. (It also overestimates central influence.) For the last diagram I have a correction that assigns a surrounded block of fewer than 6 empty points to the surrounding player. That would correct the influence estimate to about 27 pts.
Or am I expecting such a map to do too much (more like an influence and likely-territory map).
I don't think you are expecting too much. And I think that current neural networks could be trained to produce such maps. Right now I think that most go programmers are focused on improving play, however.
The Adkins Principle:
At some point, doesn't thinking have to go on?
— Winona Adkins

Visualize whirled peas.

Everything with love. Stay safe.
lightvector
Lives in sente
Posts: 759
Joined: Sat Jun 19, 2010 10:11 pm
Rank: maybe 2d
GD Posts: 0
Has thanked: 114 times
Been thanked: 916 times

Re: influence concensus map

Post by lightvector »

Bill Spight wrote: These days, I do think that it would be possible to train neural nets to produce good influence functions. Not that bots would use the functions in actual play, but they would be an aid to humans to help understand go positions.
Bill Spight wrote: I don't think you are expecting too much. And I think that current neural networks could be trained to produce such maps. Right now I think that most go programmers are focused on improving play, however.


I'm an independent go programmer experimenting with this. :rambo:
If things proceed well in the next weeks/months, I *might* have a pro-level or superhuman-level bot that also will be able to output predictions of:

* The expected ownership of each point on the board (from -1 to 1).
* The expected final score outcome of the board (in points).

Actually, I have neural nets that do these things already, they're just not past amateur dan yet. So, still working on it...
User avatar
pnprog
Lives with ko
Posts: 286
Joined: Thu Oct 20, 2016 7:21 am
Rank: OGS 7 kyu
GD Posts: 0
Has thanked: 94 times
Been thanked: 153 times

Re: influence concensus map

Post by pnprog »

lightvector wrote:Actually, I have neural nets that do these things already, they're just not past amateur dan yet. So, still working on it...
This look great! keep us posted of any progress !
I am the author of GoReviewPartner, a small software aimed at assisting reviewing a game of Go. Give it a try!
Bill Spight
Honinbo
Posts: 10905
Joined: Wed Apr 21, 2010 1:24 pm
Has thanked: 3651 times
Been thanked: 3373 times

Re: influence concensus map

Post by Bill Spight »

lightvector wrote:
Bill Spight wrote: These days, I do think that it would be possible to train neural nets to produce good influence functions. Not that bots would use the functions in actual play, but they would be an aid to humans to help understand go positions.
Bill Spight wrote: I don't think you are expecting too much. And I think that current neural networks could be trained to produce such maps. Right now I think that most go programmers are focused on improving play, however.


I'm an independent go programmer experimenting with this. :rambo:
If things proceed well in the next weeks/months, I *might* have a pro-level or superhuman-level bot that also will be able to output predictions of:

* The expected ownership of each point on the board (from -1 to 1).
* The expected final score outcome of the board (in points).

Actually, I have neural nets that do these things already, they're just not past amateur dan yet. So, still working on it...
Terrific! :D :clap:
The Adkins Principle:
At some point, doesn't thinking have to go on?
— Winona Adkins

Visualize whirled peas.

Everything with love. Stay safe.
jaca

Re: influence concensus map

Post by jaca »

sgf attached as requested.
mW.sgf
(1.81 KiB) Downloaded 742 times
[admin] I'm assuming that you want it in the following form. -JB [/admin]


Uberdude
Judan
Posts: 6727
Joined: Thu Nov 24, 2011 11:35 am
Rank: UK 4 dan
GD Posts: 0
KGS: Uberdude 4d
OGS: Uberdude 7d
Location: Cambridge, UK
Has thanked: 436 times
Been thanked: 3718 times

Re: influence concensus map

Post by Uberdude »

At move 19 you should l4 block, then if black cuts you can atari at m3 then n3 bump is a common tesuji, making miai of k2 capture and o4 to hurt black's corner and develop your shape to the centre.

P.S. I just checked with LZ, she agrees this is the best local answer, but slightly prefers to tenuki and enclose the top left corner at d17, allowing black to punch through at l4. This is because LZ sees any corner move higher than the 4th line as a mistake (punished by entering the corner) that urgently needs fixing by closing the corner. However, I'd disagree with this in a handicap game, you don't want to let black make the easy good strong shape at l4, and you don't mind black entering the top left as the stronger player tends to have the advantage with the more unusual high moves.
jaca

Re: influence concensus map (edited)

Post by jaca »

pnprog wrote:after several rounds of definition by him and implementation by me, djhbrown was still not 100% happy with the rule set he had devised for the map. And at that point I stopped working on this tool to fully focus on GRP.
Maybe a updated finale version of the map rules set is available on his blog: http://lcipm.blogspot.com/
i tried out gomap on a hoshi-keima shimari, and it seemed to propagate clusters too far along the edge.

https://ssrn.com/abstract=3071677 contains this description:-

Code: Select all

colour-controlled point colours its links to its empty neighbours;
a colour-controlled point on the 2nd line, having at least one of its links
coloured and none opposite-coloured, colours its link to the edge;
a link between two empty points, each of which has at least one
same-coloured link and no opposite-coloured links, is coloured;
an empty point in the middle / edge / corner,
at least 3 / 2 / 1 of whose links are same-coloured
and none opposite-coloured, becomes colour-controlled.
i'm wondering whether this rewrite might be more consistent with the associativity[1] of connectedness and the concept of recursive colour control described on page 9 of https://ssrn.com/abstract=2818149 :-

Code: Select all

1. a a newly*-coloured point colours its links. if a link becomes coloured by both colours, its colour is neutralised. 
2. a coloured point on the 2nd line, having at least [b]2[/b] of its links
coloured and none opposite-coloured, colours its link to the edge;
3. an empty point, at least 3 of whose links are same-coloured and none opposite-coloured, becomes coloured. an empty [b]edge or corner[/b] point, both of whose links are same-coloured, becomes coloured
* the "newly-coloured" qualification avoids endless reiteration; in the first pass, stones are the first newly-coloured points, to get the ball rolling.

shadows are weaker than clusters, so maybe:

Code: Select all

1. a shadowed point shadows its links. if a link becomes shadowed or coloured by both colours, its colour/shadow is neutralised. 
2. an empty point, at least 2 of whose links are same-coloured or shadowed and none opposite-coloured or shadowed, becomes shadowed. an empty corner point, both of whose links are same-coloured or shadowed, becomes shadowed
note: there are 2 kinds of shadows: black and white

1. http://mathworld.wolfram.com/Group.html
Last edited by jaca on Sat Jan 12, 2019 4:42 pm, edited 1 time in total.
Bill Spight
Honinbo
Posts: 10905
Joined: Wed Apr 21, 2010 1:24 pm
Has thanked: 3651 times
Been thanked: 3373 times

Re: influence concensus map

Post by Bill Spight »

Uberdude wrote:At move 19 you should l4 block, then if black cuts you can atari at m3 then n3 bump is a common tesuji, making miai of k2 capture and o4 to hurt black's corner and develop your shape to the centre.

P.S. I just checked with LZ, she agrees this is the best local answer, but slightly prefers to tenuki and enclose the top left corner at d17, allowing black to punch through at l4. This is because LZ sees any corner move higher than the 4th line as a mistake (punished by entering the corner) that urgently needs fixing by closing the corner. However, I'd disagree with this in a handicap game, you don't want to let black make the easy good strong shape at l4, and you don't mind black entering the top left as the stronger player tends to have the advantage with the more unusual high moves.
How about just enclosing the corner at move 15? (Although my preference would be to extend on the left side, to prevent Black from making an ideal extension from his wall in the bottom left.)
The Adkins Principle:
At some point, doesn't thinking have to go on?
— Winona Adkins

Visualize whirled peas.

Everything with love. Stay safe.
Uberdude
Judan
Posts: 6727
Joined: Thu Nov 24, 2011 11:35 am
Rank: UK 4 dan
GD Posts: 0
KGS: Uberdude 4d
OGS: Uberdude 7d
Location: Cambridge, UK
Has thanked: 436 times
Been thanked: 3718 times

Re: influence concensus map

Post by Uberdude »

Bill Spight wrote: How about just enclosing the corner at move 15? (Although my preference would be to extend on the left side, to prevent Black from making an ideal extension from his wall in the bottom left.)
Of course LZ strongly prefers that as there is nothing urgent going on (like pushing into knight's move before), for #198 k3 loses 3% over d17 (but as 2 handi game we are already at 90% for b so 3% is relatively more than in an even game). Black punishes all the moves on the left side by invading at 3-3, except for c11 (the best, similar winrate to d17) which invades at 4-3 because c11 is close enough to be useful in enabling white to block at b12 when the usual c17 e17 joseki happens.
Perhaps more interesting is that LZ wants to 3-3 invade instead of 17, completing the gote wall joseki (which you shouldn't pick without a pre-extension on left). f2 sometimes being slack because it's easier to tenuki (than f4) is something I thought before AI, and a few weirdos on Tygem thought so too but I kinda dismissed it as "not proper go", but then AlphaGo agreed it's tenukiable in some variations in the teaching tool. (LZ would play f2 at g2 or b3)
Post Reply