Approximating game temperature with KataGo

The temperature of a game is a measure of how big the next move is. A game is “hot” when there is a big difference between black and white getting the next move, and “cold” when the difference is small. There is an exact game theoretic definition, but the idea is also used in an intuitive way by strong players - for instance, the reason we play out a joseki to “completion” before playing away is that the local temperature is high during the joseki, but when everything is settled the local temperature drops.

We can’t get an exact value of the temperature except in simple endgame positions, but using KataGo’s score estimate I think we can get a good approximation. We simply look at a fixed position with both black and white to move, and take (the absolute value of) the difference between the score mean in those two situations. (Strictly speaking I believe we should divide the difference by 2 to agree with the normal definition of temperature, but I think this “points lost by passing” measure is easier to understand the significance of, so I’ll just leave it as it is.)

Here I’ve plotted this number for the first 100 moves of this game:


The general shape of the graph is as expected: the cost of passing at the very beginning is two times komi. The temperature rises as fighting breaks out, and drops when most groups are settled (at move 100 the cost of passing is around 11, a few points lower than at the very beginning of the game).

Here is the same graph annotated with which urgent local situations some of the spikes correspond to:

Probably more interesting though, would be looking at the temperature in the endgame. We know that the temperature generally drops throughout the endgame (until it reaches 0 when all points are taken), but it would be cool to see how quickly it drops in different games, and looking at such a graph would make it easy to recognize tedomari.

So… I did the above 100-move graph manually with Lizzie, which is a really inefficient way of doing it, and I don’t really feel like doing it for a few hundred more moves :stuck_out_tongue: Maybe someone with some basic knowledge about how to interface with KataGo could automate this process? I imagine it shouldn’t be difficult to create a command-line interface to analyze an sgf with a fixed number of playouts in each position, then pass and do the same number of playouts with the other player to move, and report back the difference between the two score means. But I have no experience with that type of thing so I’m hoping someone else is interested in this and wants to help out :innocent:

6 Likes

umm… I know this is gonna sound a bit nitpicky…
but that’s not always the temperature…
That’s the distance between the left stop and the right stop.

What do I mean by this? Well imagine you have a very simple game with two coupons: a 20 point coupon and a 5 point coupon. Whoever takes first takes the 20 and the other takes the 5. Thus whoever takes first will have 15 points more than the other. This makes the left stop (the result of a perfect run if left goes frst) 15, and the right stop -15. There’s a 30 point gap between these.

But the temperature is actually 20 points, as you would have to cool the game by 20 points (i.e.: make it so that each player would have to pay 20 points to make a move) in order to prevent each side from benefitting from making a move. The cooling process gets a bit tricky to simulate in go, since you basically have to bring it to scoring for any score differences to be meaningful to a result, but that’s what thermography is for.

6 Likes

Oh I see! That’s not at all nitpicky, that’s quite a big distinction and I was just using the wrong definition. In any case, this other measure (points lost by passing) is the one which seems simple to get from KataGo, and I think the information it conveys is quite interesting.

4 Likes

Black to play, how many points is a move at A worth?

  • 4 points
  • 2 points
  • 0 points
  • a different value
  • it depends, all of the above can make sense

0 voters