Apr 14, 2012

54 comments

**Previously:**

0. Decision Theories: A Less Wrong Primer

1. The Problem with Naive Decision Theory

2. Causal Decision Theory and Substitution

**WARNING: The main result of this post, as it's written here, is flawed. I at first thought it was a fatal flaw, but later found a fix. I'm going to try and repair this post, either by including the tricky bits, or by handwaving and pointing you to the actual proofs if you're curious. Carry on!**

**Summary of Post: ***Have you ever wanted to know how (and whether) Timeless Decision Theory works? Using the framework from the last two posts, this post shows you explicitly how TDT can be implemented in the context of our tournament, what it does, how it strictly beats CDT on fair problems, and a bit about why this is a Big Deal. But you're seriously going to want to read the previous posts in the sequence before this one.*

We've reached the frontier of decision theories, and we're ready at last to write algorithms that achieve mutual cooperation in Prisoner's Dilemma (without risk of being defected on, and without giving up the ability to defect against players who always cooperate)! After two substantial preparatory posts, it feels like it's been a long time, hasn't it?

But look at me, here, talking when there's Science to do...

Once again, we're programming an agent **X** to face another agent **Y** in a game **G**, where **X** and **Y** have access to each others' source codes and the source code of **G**. (In this post, we'll sweep the "player 1, player 2" bit back into the definition of **G** for simplicity in our code.) We may assume that at least one of the *x _{i}* is a Nash equilibrium, since

Here's our first shot at TDT, based on the idea of substituting different things for the source code of **X** in our prediction of **Y**...

def **X**(code **G**, code **Y**):

- For each
*x*:_{i}- Write a very simple agent
**A**that always outputs_{i}*x*in game_{i}**G**. - Try to deduce output
**Y**(code**G**, code**A**)._{i} - If this succeeds, calculate
**U**(*x*, output_{i}**Y**(code**G**, code**A**)); call this_{i}*u*._{i}

- Write a very simple agent
- If
*u*has been deduced for all_{i}*x*, return the_{i}*x*for which_{i}*u*is largest._{i} - Otherwise, return the default Nash equilibrium.

To see what this algorithm does, let's try it on Newcomb's Problem as we formalized it last time; we'll let **A _{1}** denote the agent that always one-boxes and

And then, if **X** also has a valid and sufficiently powerful inference module, **X** will deduce those outputs for **P**. Thus **X** will deduce that *u _{1}*=100 and

Again, what we're doing here is not counterfactual reasoning, but instead reasoning about what your opponent would do against some *other* simpler agent; therefore we're again evading the problem of spurious counterfactuals. (On a philosophical level, this decision theory finds the most successful constant strategy **A _{i}** and mimics its output.)

Alright, I said there were going to be two problems with this attempt, and indeed I called it Not Quite Timeless Decision Theory. So what goes wrong?

If you face two NQTDT agents against each other in the Prisoner's Dilemma, what happens? First, note that NQTDT will defect against either a CooperateBot (**A _{C}**) or a DefectBot (

And the second problem?

In Newcomb's Problem, what if **P** has a powerful enough inference module to show that **A _{1}** one-boxes and

So NQTDT is broken. What can we do?

Well, instead of assuming that our opponent **Y** will behave in the real game as it did against the optimal **A _{i}**, we could try to deduce

def **X**(code **G**, code **Y**):

- For each
*x*:_{i}- Write a very simple agent
**A**that always outputs_{i}*x*._{i} - Try to deduce output
**Y**(code**G**, code**A**)._{i} - If this succeeds, calculate
**U**(*x*, output_{i}**Y**(code**G**, code**A**)); call this_{i}*u*._{i}

- Write a very simple agent
- If
*u*has been deduced for all_{i}*x*, take the_{i}*x*for which_{i}*u*is largest, and try to deduce "_{i}**U**(*x*, output_{i}**Y**(code**G**, code**X**)) ≥*u*"._{i} - If
*that*succeeds,*then*return*x*._{i} - Else, return the default Nash equilibrium.

Note that the new line checks the behavior of **Y** against **X** itself, not the **A _{i}**. This "sanity check" ensures that, when

But by the same argument as before, it still defects on the Prisoner's Dilemma against itself, so this is still not TDT.

What else could we do better? Well, this agent "mimics" only the very simplest of strategies- the strategies that correspond to one-player games for its opponent. What if we instead let it mimic more complicated (but still basic) strategies, like versions of Newcomb's Predictor?

This is going to be a bit more complicated than the last one; we first need to define the agents that we'll examine and mimic. Consider each function *f* from the set {*y _{1}*, . . . ,

def **A_{f}**(code

- Try and deduce the output of
**Y**(code**G**, code**A**)._{f} - If this succeeds, return
*f*(output**Y**). Else, return the Nash equilibrium.

Note that the constant strategies **A _{i}** are special cases of the

def **X**(code **G**, code **Y**):

- For each
*f*:- Write the agent
**A**._{f} - Try to deduce output
**Y**(code**G**, code**A**)._{f} - If this succeeds, calculate
**U**(output**A**, output_{f}**Y**(code**G**, code**A**)); call this_{f}*u*._{f}

- Write the agent
- If
*u*has been deduced for all_{f}*f*, take the*f*for which*u*is largest, and try to deduce "_{f}**U**(output**A**, output_{f}**Y**(code**G**, code**X**)) ≥*u*"._{f} - If that succeeds, then return (output
**A**)._{f} - Otherwise, return the default Nash equilibrium.

Let's try and parse what this algorithm does. It considers all possible Newcomblike agents (the **A_{f}**) and tests out how they fare against

We can sketch out some results that this decision theory gets (when equipped with a sufficiently powerful inference module). First, it correctly solves one-player games (since one of the constant strategies **A _{i}** is the optimum) and zero-sum two-player games (for the same reasons that CDT does). It one-boxes on Newcomb whenever

Why? If **X** and **Y** are both running this decision theory, consider the function *f* with *f*(C)=C and *f*(D)=D, it's clear that **Y** cooperates with this **A_{f}** (by the same logic that makes it one-box on Newcomb's Problem) and that no

Löb's Theorem states that, within a formal system, proving "if there's a proof of *S*, then *S* actually holds" leads to a proof of *S* itself. In our current context, let *S* be the statement "**U**(output **A_{f}**, output

This algorithm is a general decision theory rather than something with ad-hoc patches, so it satisfies my criteria for a better decision theory. It also behaves like Timeless Decision Theory is supposed to on the classical problems. Is it therefore justified to call this TDT? Well, let's again think about it on the philosophical level.

Each Newcomblike agent **A_{f}** represents a particular deal that it tries to strike with

That's a pretty good account of what TDT does, no? Also, I realized that I had the right description when I recalled Eliezer's description of when TDT cooperates on the Prisoner's Dilemma: if and only if the opponent would one-box with the TDT agent as Omega. This is *exactly* what this algorithm ends up doing.

It's fair to say that Yudkowsky's invention of Timeless Decision Theory was a triumph. In fact, I'll make a note here...

Before we move on, we should take a little while to remark on how awesome this is.

Since the Prisoner's Dilemma was first formulated, it's been held up as a dark and dismal portent for the prospects of cooperation among rational people. Douglas Hofstadter felt, on a philosophical level, that there *must* be a way to see cooperation as the rational choice, and called it superrationality; but his experiments with actual people were discouraging, and he could find no solid theoretical underpinning for that intuition, so game theorists continued to ignore it.

The insight of TDT (as well as the other decision theories we might term "reflexive") is that better results can be achieved when you have more information than the original setup allows; in particular, if it's common knowledge that agents have some ability to predict each others' thought process, then mutual cooperation really can arise out of rational self-interest.

Although it's difficult to make the right conditions obtain between individual humans (as in Hofstadter's experiments), it may be possible for a TDT-friendly setup to exist between different organizations, or different countries, if they have means of keeping tabs on each others' strategic planning. This may in fact have saved the world from nuclear destruction...

John von Neumann, the founder of game theory, advocated a pre-emptive nuclear strike on the Soviet Union throughout the 1950s; he was convinced that there was no other possibility of avoiding nuclear destruction ourselves. But here we have a good analogue to our setup; rather than exchanging source code, both governments had spies placed in the other, and so were likely to know what the other was thinking (albeit with some delay). This might have led to unconscious use of TDT thinking and thus spared us from nuclear war, despite the fact that the professional rationalists of the day hadn't conceived of such means to mutual cooperation!^{2}

But this sequence isn't done yet: TDT may surpass CDT, but it's still under-defined when it comes to bargaining, and there's one notable problem in which TDT falls short of common sense...

TO BE CONTINUED (WITH CAKE) IN PART IV

**0.** As with CDT, there are multiple other variants to consider; this one insists on the best possible deal that **Y** would accept against an **A_{f}**, or else no deal at all. The downside is that two such agents will fail to reach a deal if they have different "favorite" deals, even if each would be willing to compromise against an

Also, it's very important that we have the sanity check here, since otherwise **Y** could defect against **X** and have **X** cooperate (as long as Y gets Newcomb's Problem right). Without the sanity check, other agents take **X**'s lunch money, and rightly so!

**1.** Existence of a proof of S is not enough to conclude that X's sanity test succeeds, since provability is not decidable and so the condition for failing the check doesn't imply absence of the proof. One way out is to have a provability oracle perform the sanity check, which makes it impossible for players to be algorithms. Another is to prove some bounds on the length of the shortest proof of S, and write the algorithm in a way that guarantees the sanity check to succeed within these bounds. Yet another way is to never give up, work on the sanity check forever, which makes the agent completely unable to cope with many situations. (Thanks to Vladimir Nesov for this footnote.)

**2.** Thomas Schelling, among others, worked out a plausibly stable logic of mutually assured destruction, but it still invited all sorts of instability when limited conflict was involved. He also praised the idea of encouraging spies in certain departments rather than prosecuting them, in order to keep the Soviet Union from worrying that we were planning a first strike. If you've never read The Strategy of Conflict, I highly recommend it; it is simultaneously one of the most enlightening and most engaging books I've read in recent years.