# Solving for the optimal work-life balance with geometric rationality

In a [recent post](https://www.lesswrong.com/posts/5KHz6AMvMbqq8bunq/respecting-your-local-preferences), Scott Garrabrant gave an application of [geometric rationality](https://www.lesswrong.com/s/4hmf7rdfuXDJkxhfg) to the problem of work-life balance. Here's the setup: part of you wants to try to make the world better (I'll be calling this your "altruistic part") and part of you wants to relax and play video games (your "relaxation part"). Geometric rationality suggests doing a [Nash bargain](https://www.lesswrong.com/s/4hmf7rdfuXDJkxhfg/p/hTMFt3h7QqA2qecn7) between the altruistic part and the relaxation part, across possible worlds that you might have found yourself in. In worlds where you're in an unusually good position to make the world better, the bargain commits you to spend most of your time doing that (satisfying your altruistic part); in return, in worlds where you're not in a good position to make the world better, you spend most of your time playing video games (satisfying your relaxation part).

Scott built a toy mathematical model and tested it with a nice example. The example involved five possible worlds, all equally likely. The way the math worked out, if you ranked the five worlds from least conducive to your altruism to most conducive, the Nash bargain had you spend 0%, 50%, 67%, 75%, and 80% of your time on altruism, respectively, in those five worlds. A pretty nice, intuitively satisfying list of numbers.

I recommend reading [Scott's post](https://www.lesswrong.com/posts/5KHz6AMvMbqq8bunq/respecting-your-local-preferences) before reading this one. And while I really liked the post, his example was constructed so that the probability distribution over how much altruistic impact you could have was pretty close to a uniform distribution. In the example, the world that was most conducive to your altruistic impact only gave you 1.7x more impact than the median world. But I think impact is much more [unevenly distributed](https://forum.effectivealtruism.org/posts/YY6PSor7TAZdyFRQi/prospecting-for-gold-owen-cotton-barratt) than that across possible worlds.

My issue with Scott's post wasn't his model (I quite liked the model!); it was only his example. So I decided to take the model and solve for the optimal bargain in more generality. I wanted to see what the results would be -- whether they'd still be intuitively compelling.

The rest of this post will be a bunch of math, but here's the (imprecise) TLDR:

*   If you know that your ability to make the world better is somewhat below average (across all possible worlds you could have found yourself in), you can spend all your time playing video games. If you know it's about average, you should aim for a fairly even mix of video games and altruism. If you know it's substantially above average (>10x, say), then you should spend almost all your time on altruism.
    *   I mean "average" in the precise sense of the arithmetic mean -- not the median! There are plausible views under which you are in a top 0.001% world by impact potential, but still have below-average impact potential, because almost all the impact potential is concentrated in the top 0.00000001% of worlds.
*   (Epistemic status: super uncertain.) In practice, you have a huge amount of uncertainty about the distribution of your impact potential across worlds (not to mention uncertainty about how much impact potential you have in *this* world). While building this uncertainty into the model is hard, my intuition for geometric rationality suggests that a good way to deal with the uncertainty is to consider the probability that you'd assign to the proposition "my impact potential in this world is above average" (where the probability is over your logical uncertainty about the nature of the multiverse), and spend that fraction of your time improving the world.

All right, time to get to the math!

The setup
---------

First, let $r$ be the fraction of you that wants to improve the world (Scott's example uses $r = 2/3$).

Order all worlds based on how impact potential you have, from least to most. For $x \in [0, 1]$, let $f(x)$ be the impact potential you have in the $x$-th quantile world (so $f$ is an increasing function). (In Scott's example, $f$ is $1$ on $(0, 0.2)$, $2$ on $(0.2, 0.4)$, $3$ on $(0.4, 0.6)$, $4$ on $(0.6, 0.8)$, and $5$ on $(0.8, 1)$.)

Let $p(x)$ be fraction of time you'll be devoting toward altruism in the $x$-th quantile world. This is the function that we will be optimizing. Specifically, we will be looking for the function $p: [0, 1] \to [0, 1]$ that maximizes

$(\int_0^1 p(x) f(x) dx)^r \cdot (\prod_0^1 (1 - p(x))^{dx})^{1 - r}$.

(This is just the generalization of Scott's equation to a continuous setting.)

...okay, whoa there, what's this thing with the $dx$ in the exponent? You can read Scott's post on the [geometric integral](https://www.lesswrong.com/s/4hmf7rdfuXDJkxhfg/p/DMxe4XKXnjyMEAAGw#The_Geometric_Integral) if you'd like. But if you (like me) don't have experience with geometric integrals, fear not: it'll go away once we take the log of that expression (which we can do because the function $p$ that maximizes that expression will also be the $p$ that maximizes its logarithm).

So, taking the log: we are looking for the function $p$ that maximizes

$V(p) := r \ln \int_0^1 p(x) f(x) dx + (1 - r) \int_0^1 \ln(1 - p(x)) dx.$

(V stands for "value".)

The next section will be technical. Feel free to skip to the ["Drawing conclusions" section](https://www.lesswrong.com/posts/ahacJHunYrg2iA5ri/solving-for-the-optimal-work-life-balance-with-geometric#Drawing_conclusions) below -- you won't lose too much.

Solving for the optimal function $p$
------------------------------------

The *right* way to optimize this is with Lagrange multipliers. Unfortunately, I don't know Lagrange multipliers, so I do these sorts of optimization problems informally.

Let $\hat{p}$ be the optimal choice of $p$. Let's consider making a small change to the value of $\hat{p}$ near a particular value $x_0$: in particular, for very small $\epsilon$ and very small positive $\delta$, we will consider increasing $\hat{p}(x)$ by $\epsilon$ for $x \in [x_0 - \delta/2, x_0 + \delta/2]$. This change will approximately:

*   increase $\ln \int_0^1 \hat{p}(x) f(x) dx$ by $1/\mu \cdot \delta \epsilon f(x_0)$, where $\mu := \int_0^1 \hat{p}(x) f(x) dx$, and
*   decrease $\int_0^1 \ln(1 - \hat{p}(x)) dx$ by $\frac{\delta \epsilon}{1 - \hat{p}(x_0)}$,

for a net change of $\delta \epsilon(\frac{r f(x_0)}{\mu} - \frac{1 - r}{1 - \hat{p}(x_0)})$. In order for $\hat{p}$ to be optimal, this change cannot be positive. Thus, one of two things must be true for all $x$: either

*   $\frac{r f(x)}{\mu} = \frac{1 - r}{1 - \hat{p}(x)}$; or
*   $\frac{r f(x)}{\mu} < \frac{1 - r}{1 - \hat{p}(x)}$, but $\hat{p}(x) = 0$, so decreasing $\hat{p}(x)$ is not possible.

(Briefly, we can't have the analogous edge case with $\hat{p}(x) = 1$ because we have $1 - \hat{p}(x_0)$ in a denominator.)

Therefore, rearranging terms, we have

$\hat{p}(x) = \max(0, 1 - \frac{1 - r}{r} \mu \cdot \frac{1}{f(x)})$.

We find it convenient to define $c := \frac{1 - r}{r} \mu$, so that

$\hat{p}(x) = \max(0, 1 - \frac{c}{f(x)})$.

(An aside: the quantity $\mu$ (which, recall, is defined as $\int_0^1 \hat{p}(x) f(x) dx$) has a nice interpretation: it's how much you improve the world, on average across worlds, if you follow the optimal bargain $\hat{p}$. The quantity $c$ also has a nice interpretation: it's how much your relaxation part would need to be satisfied, if it were satisfied as much as your altruistic part, in proportion to how much these two parts exist.)

Our solution for $\hat{p}$ shows that you should spend all your time playing video games if you find yourself in a world where $f(x) \le c$, and should spend at least some of your time saving the world if in fact $f(x) > c$.

...okay, but what is $c$? While we found $\hat{p}$ in terms of $c$, we've defined $c$ in terms of $\hat{p}$. That means we have an equation to solve! In particular, we have

$\begin{align*}c &= \frac{1 - r}{r} \int_0^1 \max(0, 1 - \frac{c}{f(x)}) f(x) dx = \frac{1 - r}{r} \int_0^1 \max(0, f(x) - c) dx\ &= \frac{1 - r}{r} \int_{f^{-1}(c)}^1 (f(x) - c) dx. \end{align*}$

By moving the $c$ out of the integrand and rearranging, we can rewrite this as

$c = \frac{1 - r}{1 - (1 - r)f^{-1}(c)} \int_{f^{-1}(c)}^1 f(x) dx$.       (Eq. 1)

This isn't a solution, since there's a $c$ on the right side of the equation. And we won't solve for $c$ exactly, but we *will* prove a nice lemma that bounds $c$ on both sides in terms of $\int_0^1 f(x) dx$ \-\- which, remember, measures your average impact potential across possible worlds.

**Lemma:** $(1 - r) \int_0^1 f(x) dx \le c \le \frac{1 - r}{r} \int_0^1 f(x) dx$.

**Proof:** the right-hand inequality is straightforward. We have

$c = \frac{1 - r}{r} \mu = \frac{1 - r}{r} \int_0^1 \hat{p}(x) f(x) dx \le \frac{1 - r}{r} \int_0^1 f(x) dx$.

To prove the left-hand inequality, for convenience we will define $t := f^{-1}(c)$, $A := \int_0^t f(x) dx$, and $B := \int_t^1 f(x) dx$. Then (from Eq. 1) $c = \frac{1 - r}{1 - (1 - r)t} B$. We also have that $A/t \le c$, i.e. that the average value of $f$ on $[0, t]$ is less than $c$, since $f(t) = c$ and $f$ is increasing. Therefore, we have

$\frac{c}{\int_0^1 f(x) dx} = \frac{c}{A + B} \ge \frac{c}{ct + B} = \frac{1}{t + \frac{1 - (1 - r)t}{1 - r}} = 1 - r$.

This completes the proof.

Now, recall that $\hat{p}(x) = \max(0, 1 - \frac{c}{f(x)})$. Let $C(x) := 1 - \frac{c}{f(x)}$. By Lemma 1, for any particular $x$-value $x_0$, we have

$1 - \frac{1 - r}{r} \frac{\int_0^1 f(x) dx}{f(x_0)} \le C(x_0) \le 1 - (1 - r) \frac{\int_0^1 f(x) dx}{f(x_0)}$.

This gives us some nice bounds to work with when interpreting $\hat{p}$.

Drawing conclusions
-------------------

Recall that $r$ is the fraction of you that's altruistically minded. In this section, I recommend having a particular value of $r$ in mind. Scott's choice of $r = 2/3$ is a reasonable one.

The optimal function $p$ is $\hat{p}(x) = \max(0, C(x))$. If you skipped the previous section, you don't need to worry about what $C(x)$ is; all you need to know is that we've bounded it: for every $x$-value $x_0$, we have

$1 - \frac{1 - r}{r} \frac{\int_0^1 f(x) dx}{f(x_0)} \le C(x_0) \le 1 - (1 - r) \frac{\int_0^1 f(x) dx}{f(x_0)}$.

If $x_0$ is such that $C(x_0) \le 0$, the model tells us to always play video games. We are guaranteed that this is the case whenever

$\frac{f(x_0)}{\int_0^1 f(x) dx} \le 1 - r$.

The quantity on the left has a really natural interpretation: it is *the factor by which you have more impact potential in world *$x_0$* than you do in the average world*. So if you're in a somewhat below-average impact world, you can safely spend all your time playing video games (or so the model says).

On the other hand, what if this factor is instead pretty large -- at least $100 \cdot \frac{1 - r}{r}$, let's say? Then our bound tells us that $\hat{p}(x_0) \ge 0.99$ \-\- that is, you should spend nearly all your time working to improve the world.

And if for some reason you think that the factor is pretty close to $1$ \-\- let's say it's exactly $1$ \-\- then the time you should spend improving the world is somewhere between $2 - \frac{1}{r}$ and $r$. (If $r = 2/3$, this gives a lower bound of 50% and an upper bound of 67%.) So you'd probably spend some intermediate fraction of your time improving the world.

Analysis and takeaways
----------------------

First: how satisfying is this solution?

There's a sense in which I find it satisfying, which is that it accords with my intuition of what should have happened in the model. It seems like a reasonable way for the bargain to go down.

Then again, a sense in which I find it dissatisfying is that if you think (as I do) that the distribution of impact potential across possible worlds has a huge spread, then the bargain has almost all copies of you either spending all their time on video games or spending nearly all their time on improving the world. Which isn't really the takeaway that Scott was going for in his original post.

Is there a way to salvage this -- to restore the intuition that in fact you should have a reasonable work-life balance? I think the answer is yes! That's because you're probably very uncertain about what world you live in: you don't have a great idea about what the shape of $f$ is, nor what quantile world you're in (i.e. what $x$-value your world corresponds to). You should probably assign a decent chance to being in an above-average world in terms of impact potential, and a decent chance to being in a below-average world in terms of impact potential.[^243uksz9tc3]

Faced with this uncertainty, what do you do? If I understand the spirit of geometric rationality correctly, an important lesson is that you can do a Nash bargain not just between you-in-possible-worlds, but between different possibilities with respect to your epistemic state. For example, if you think there's a 90% chance that the Riemann hypothesis is true, you can bargain between you-if-the-Riemann-hypothesis-is-true and you-if-the-Riemann-hypothesis-is-false, even if there's an objective fact of the matter to which one is the actual you.

You can try to build this uncertainty into the model, but I think this would be really hard.[^c5ykrjx8vdu] On the other hand, here's a basic fact about Nash bargaining: suppose there are two options, $A$ and $B$, and you assign x credence that $A$ has utility $a$ and $B$ has utility $0$, and $1 - x$ credence that $A$ has utility $0$ and $B$ has utility $b$, then the Nash bargain between these two epistemic states says to do A with probability $x$ and $B$ with probability $1 - x$.

And if you squint, this is *sort of* like what we have going on. Suppose you think that you're either in a substantially above-average world for impact potential (with probability $x$), or a substantially below-average one (with probability $1 - x$). In the first epistemic state, "spend almost all your time altruistically" (option $A$) is much better than "spend all your time on video games" (option $B$); the the second case, option $B$ is much better than option $A$. And so -- if I'm not losing too much accuracy with my hand-wavy comparisons -- the Nash bargain between these two epistemic states would have you spend $x$ fraction of your time on video games.

So suppose you think there's a 25% chance you live in a substantially below-average world in terms of impact potential, a 70% chance you live in a substantially above-average world, and a 5% chance of a close-to-average world -- well then, perhaps you should spend about 70% of your time working to improve the world!

...well, *if* you buy the basic model, and *if* you buy the hand-waving about Nash bargaining over epistemic states that I just did (which I'm not sure *I* buy)

...but, putting all these caveats to the side, I find this conclusion pretty satisfying.

[^243uksz9tc3]: That last bit -- that maybe you're in a below average impact world -- is perhaps contrarian, but I stand by it. You may well think that you are in the top one-billionth of possible worlds in terms of impact potential. But it could be that among those worlds that are even higher than this one in terms of your impact potential, 1% of them have \(10^{10^{100}}\) times more potential beings than ours, and that this completely dominates the average. 

[^c5ykrjx8vdu]: You'd need to have the domain of optimization be the set of your epistemic states instead of the set of world states. But your "epistemic state" includes way more than just a guess about what \(f\) looks like across worlds (or even a probability distribution over what \(f\) looks like across worlds). You need to include -- in each individual epistemic state -- your guesses about (what your probability distribution over what \(f\) looks like across worlds) looks like in all the other possible epistemic states. And you'll need to include your guesses about what those look like in all the other possible epistemic states. And so on. There are probably nice simplifying assumptions you could make to make this optimization problem tractable; I haven't thought much about this.