It is currently Thu Oct 31, 2024 4:53 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
Offline
 Post subject: Simple model for local positions
Post #1 Posted: Sat Feb 17, 2024 1:30 am 
Lives in sente

Posts: 967
Liked others: 24
Was liked: 173
Rank: panda 5 dan
IGS: kvasir
I hope this isn't original but to humor Gerard who seems to want to discuss models.

Preliminary about Computer Evaluation

To start with let G = { L | R } be a game where black, or left, can move to game L and white, or right, can move to game R.

Programs like KataGo can compute or rather estimate left's negamax value and right's negamax value for a game. This estimate can be related to the mean and temperature of G as shown

lnv(G) ~= mean(G) + temperature(G) , left's negamax value
rnv(G) ~= mean(G) - temperature(G) , right's negamax value

and importantly

mean(G) = (mean(G) + temperature(G) + mean(G) - temperature(G)) / 2 ~= (lnv(G) + rnv(G)) / 2

I'll most of the time use equality signs instead of some other sign that may be more correct, just for convenience.

Later proof reading: I might have to check the previous part again later :?

Simple Model

Now let's look at the simple for total effect of a local position

e = t + s + x

The meaning of the variables are as follows, but briefly:

e : for total effect

t or k*t : for a penalty or a tax for extra moves in the local position. Sometimes I'll write k*t instead of t and let k=-7 (or other value) and t be the difference between black and white moves in the local position.

s : for the difference in territory

x : for outside influence and other effects

To give total effect for a local position P in game G a meaning I’ll refer to a null game N. The null game is a proxy for G – P, or game G without P, which we may be able to realize in some simple cases and be unable to in more intricate cases. One way to realize G – P would be to remove the position P from G or replace it with something neutral.

Let’s assume that we can find a suitable null game and define the total effect as follows

e = mean(G) - mean(N)

This definition suffices to solve for the outside effect x in some situations as follows.

Let

e^L = k * (t + 1) + s^L + x
e^R = k * (t - 1) + s^R + x

be models for the left and right subgames of the local position P. P is embedded in the game G but I'll sometimes treat it as if it were a game, without trying to get into when that is justified and when not.

Using little bit of algebra we can write

mean(G) - mean(N) = e = (e^L + e^R) / 2 = ((k * (t + 1) + s^L + x) + (k * (t - 1) + s^R + x)) / 2 = (s^L + s^R) / 2 + x

Note: The last equality is only justified when there are equal number of moves by both players and therefore t = 0.

Which gives us a formula for the outside effect x

x = mean(G) - mean(N) - (s^L + s^R) / 2

In the next post I'll apply this model to a position suggested by Gerard.


Last edited by kvasir on Sat Feb 17, 2024 3:29 am, edited 2 times in total.
Top
 Profile  
 
Offline
 Post subject: Re: Simple model for local positions
Post #2 Posted: Sat Feb 17, 2024 1:50 am 
Lives in sente

Posts: 967
Liked others: 24
Was liked: 173
Rank: panda 5 dan
IGS: kvasir
Click Here To Show Diagram Code
[go]$$B Black to play - komi 7.5
$$ ---------------------------------------
$$ | . . . . . . . . . . . X . X O . . . O |
$$ | . . . . . . . . . . . X X X O O . . O |
$$ | . . . O . . . . . . . X . X O O O O O |
$$ | . . . , . . . . . , . X X X X X X X X |
$$ | . . . . . . . . . . . X X X X X X X X |
$$ | . . . . . . . . . . . . . O O O O O O |
$$ | . . . . . . . . . . . . . O . . . . . |
$$ | . . . . . . . . . . . . . O O O O O O |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . , . . . . . , . . . . . , . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . , . . . . . , . . . . . , . . . |
$$ | . . . . . . . . . . . . . . . . X . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ ---------------------------------------[/go]


The local position P being discussed is the upper right corner.

I chose to remove the entire upper right corner for the null game. The mean of the null game N and the unaltered game G are

mean(N) = (lnv(N) + rnv(N)) / 2 = (-1.3 + (-13.9)) / 2 = -7.6
mean(G) = (lnv(G) + rnv(G)) / 2 = (0 + (-13.2)) / 2 = -6.6

Territory in the left and right subgames of the local positions P are
s^L = 21
s^R = -7

The outside effect is then
x = mean(G) - mean(N) - (s^L + s^R) / 2 = -6

If we assume that the tax for of local moves t is best represented by the difference in the number of moves times -7 then we can calculate the total effect for G, L and R now

e = t + s + x = s + x = 1
e^L = t^L + s^L + x = -7 + s^L + x = 8
e^R = t^R + s^R + x = 7 + s^R + x = -6

Which is consistent with the local position having a higher temperature than what we are taxing local moves for, since
temperature(P) = (s^L - s^R) / 2 = 14

Now let's turn our attention to the case when black plays in the local position and we move to the left subgame.

Here we still have a formula for x but first let's redefine G to be the left subgame and restate some variables as needed.

mean(G) = (lnv(G) + rnv(G)) / 2 = (13.2 + 0) / 2 = 6.6
s^R = 21

Now

x = mean(G) - mean(N) - (s^L + s^R) / 2 = 14.2 - 21 = -6.8
e = t + s + x = -7 + 21 - 6.8 = 7.2

These estimates do not completely line up with the previous ones, as can be seen. The absolute difference is 0.8 in both the case of total effect and outside effect.

Top
 Profile  
 
Offline
 Post subject: Re: Simple model for local positions
Post #3 Posted: Sat Feb 17, 2024 7:51 am 
Judan

Posts: 6230
Liked others: 0
Was liked: 793
Your model differs from mine:
- You always compensate local excess plays by multiple of komi instead of alternatively allowing compensation by plays elsewhere. You do it on purpose so for your study the restriction is fine.

- I count outside influence stones but did not dare to assess other aspects, such as aji, numerically. You courageously jump to combine everything else as x. This might be useful if you emphasise everything else over influence (my emphasis to assess stone-difference-0-normalised josekis by their ratio of territory balance and influence balance.

- You add algebraic context by null game and negamax followers.

- I am lost at your step for e^L = k * (t + 1) + s^L + x and
e^R = k * (t - 1) + s^R + x. Why does either move to a follower not impact x? Is this your assumption to be told to us? Eventually you calculate x. Please explain why x may comprise some things but not have them affected during the definition of follow-up formation!

- In your example application, have you used Katago for some values and which?

Top
 Profile  
 
Offline
 Post subject: Re: Simple model for local positions
Post #4 Posted: Sat Feb 17, 2024 8:13 am 
Gosei

Posts: 1346
Liked others: 21
Was liked: 57
Rank: 1d
Click Here To Show Diagram Code
[go]$$B Black to play - komi 7.5
$$ ---------------------------------------
$$ | . . . . . . . . . . . X . X O . . . O |
$$ | . . . . . . . . . . . X X X O O . . O |
$$ | . . . O . . . . . . . X . X O O O O O |
$$ | . . . , . . . . . , . X X X X X X X X |
$$ | . . . . . . . . . . . X X X X X X X X |
$$ | . . . . . . . . . . . . . O O O O O O |
$$ | . . . . . . . . . . . . . O . . . . . |
$$ | . . . . . . . . . . . . . O O O O O O |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . , . . . . . , . . . . . , . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . , . . . . . , . . . . . , . . . |
$$ | . . . . . . . . . . . . . . . . X . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ ---------------------------------------[/go]


OK let's try to understand the total effect e of a local position.
I I understand correctly the two very basic formulas you proposed are:
mean(G) = (lnv(G) + rnv(G)) / 2
and eG = mean(G) - mean(N)

When you apply these formula to the position P above, your analysis gives the following result:
mean(N) = (lnv(N) + rnv(N)) / 2 = (-1.3 + (-13.9)) / 2 = -7.6
mean(G) = (lnv(G) + rnv(G)) / 2 = (0 + (-13.2)) / 2 = -6.6
=> eG = -6.6 + 7.6 = 1

Now what about eL?
Click Here To Show Diagram Code
[go]$$B
$$ ---------------------------------------
$$ | . . . . . . . . . . . X . X O . X . O |
$$ | . . . . . . . . . . . X X X O O . . O |
$$ | . . . O . . . . . . . X . X O O O O O |
$$ | . . . , . . . . . , . X X X X X X X X |
$$ | . . . . . . . . . . . X X X X X X X X |
$$ | . . . . . . . . . . . . . O O O O O O |
$$ | . . . . . . . . . . . . . O . . . . . |
$$ | . . . . . . . . . . . . . O O O O O O |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . , . . . . . , . . . . . , . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . , . . . . . , . . . . . , . . . |
$$ | . . . . . . . . . . . . . . . . X . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ ---------------------------------------[/go]


mean(N) = (lnv(N) + rnv(N)) / 2 = (-1.3 + (-13.9)) / 2 = -7.6
mean(L) = (lnv(L) + rnv(L)) / 2 = (13.2 + 0) / 2 = +6.6
=> eL = 6.6 + 7.6 = 14.2

Seeing your calculation with the formula eL = t + s + x
and the result eL = -7 + 21 - 6 = 8

I have to conclude I missed something.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group