What does The Thermodynamics of Desire conclude, in numbers, about “Leaking and Not Leaking: An Energy Account of Attention”?
Answer: Even without any pull of uncertainty (\(\kappa = 0\)), some minutes go to the phone: a choice by probability always samples the alternatives. But once uncertainty attracts, the phone takes 112 of 180 minutes, although its average reward is half the partner's. The partner has not become less rewarding. The partner has become *known*, and the phone never will be. When the phone is in another room, the leak is zero and the entropy of the evening falls to zero bits.
Scope of the numbers: The book is not therapy, relationship counselling or medical advice. Marked boxes separate published evidence, runnable Python calculations, classical texts and the author's hypotheses; wherever a comparison between physics and love is an analogy, the book says so, and every hypothesis states what result would refute it.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 112, 180
| scenario | partner | phone | switches | H (bits) |
|---|---|---|---|---|
| phone present, no pull of uncertainty | 134 | 46 | 65 | 0.82 |
| phone present, uncertainty attracts | 68 | 112 | 75 | 0.96 |
| phone in another room | 180 | 0 | 0 | 0.00 |
Show the full program
import math, random
from math import log2
def evening(phone_available, kappa, seed=3, minutes=180):
"""Each minute, attend to the partner or the phone. The partner is reliably rewarding (0.3 per minute);
the phone pays 1.0 with probability 0.15 (mean 0.15). kappa = how strongly unresolved uncertainty attracts."""
rng = random.Random(seed)
Q = {"partner": 0.0, "phone": 0.0} # learned value per minute
U = {"partner": 0.0, "phone": 0.0} # running mean of squared prediction error
use = {"partner": 0, "phone": 0}
switches, last = 0, None
for day in range(30): # thirty evenings of learning; report the last one
use = {"partner": 0, "phone": 0}
switches, last = 0, None
for m in range(minutes):
options = ["partner", "phone"] if phone_available else ["partner"]
w = [math.exp(8 * (Q[o] + kappa * U[o] ** 0.5)) for o in options]
o = rng.choices(options, weights=w)[0]
r = 0.3 if o == "partner" else (1.0 if rng.random() < 0.15 else 0.0)
d = r - Q[o]
Q[o] += 0.05 * d
U[o] += 0.05 * (d * d - U[o])
use[o] += 1
switches += (last is not None and o != last)
last = o
p = [use[o] / minutes for o in use if use[o]]
H = 0.0 - sum(x * log2(x) for x in p)
return use["partner"], use["phone"], switches, H
print(f"{'scenario':38s} partner phone switches H (bits)")
for name, avail, kappa in (("phone present, no pull of uncertainty", True, 0.0),
("phone present, uncertainty attracts", True, 0.6),
("phone in another room", False, 0.6)):
a, b, s, H = evening(avail, kappa)
print(f"{name:38s} {a:5d} {b:5d} {s:8d} {H:8.2f}")Single source and citation
Fan, Y. (2026). The Thermodynamics of Desire (Version 1.0.0), Chapter 5: Leaking and Not Leaking: An Energy Account of Attention. 5D Library. https://doi.org/10.5281/zenodo.23682498
DOI: 10.5281/zenodo.23682498 · Read the monograph · 5DL-B-004 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026004,
author = {Fan, Yafu},
title = {The Thermodynamics of Desire},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
doi = {10.5281/zenodo.23682498},
url = {https://doi.org/10.5281/zenodo.23682498}
}