# The Darwin Game - Rounds 1 to 2

Edit 2020-11-13. This unofficial version of the game is missing `AbstractSpyTreeBot`.

# Rounds 1-2

![](https://s3-us-west-2.amazonaws.com/www.lsusr.com/lesswrong/darwin-game/write-up-4/line-pie-0-2.png)

MeasureBot and EarlyBirdMimicBot shoot to the top of the populations. Not coincidentally, these are the two bots which exploit zero-days. I already did a write-up of Multicore's EarlyBirdMimicBot [here](https://www.lesswrong.com/s/wKPWFvdMyvgDWfusX/p/Tq8qeRxQ4pB3b5RKg#Multicore). MeasureBot is another beast entirely.

# Measure

Measure considered the clone army to be ["a straightforward example of a bad equilibrium"](https://www.lesswrong.com/posts/AHTRyQJtiRin22kth/the-darwin-game-1?commentId=zccBj35rFiGTx7YwA).

> I would certainly need to see the code myself before deciding to join…. How surprised would you be if someone managed to bypass the code checking and defect from the group?
>
> ― comment by Measure

Having neither enlisted in Clone Army's mandatory reciprocity nor feigned cooperation, Measure lacked access to the CloneBot source code. Measure did have access to AbstractSpyTreeBot's code.

## The Trolley Problem

As I wrote in [The Phantom Menace](https://www.lesswrong.com/s/wKPWFvdMyvgDWfusX/p/Tq8qeRxQ4pB3b5RKg#The_Phantom_Menace), several people asked me questions about how to disqualify opponents. In the end, [only Taleuntum did](https://www.lesswrong.com/posts/AHTRyQJtiRin22kth/the-darwin-game-1?commentId=8xcxbDaStpb74TAQR) and then ze pulled a Petrov. So there were no simulator killers.

One person in meatspace declared to me his intention to create a simulator killer and then quietly discovered better things to do with his time.

Would humans build a lever to kill one stranger instead of zero? Apparently the answer is "no" because building a lever is more work than not building a lever. [All hail Azathoth.](https://www.lesswrong.com/s/MH2b8NfWv22dBtrs8/p/pLRogvJLPPg6Mrvg4)

[![](https://imgs.xkcd.com/comics/trolley_problem.png)](https://xkcd.com/1455/)

## MeasureBot

The only person to execute malware was Measure, who invented a way to benefit from it. MeasureBot infected AbstractSpyTreeBot from inside AbstractSpyTreeBot's own simulation of MeasureBot and then replaced AbstractSpyTreeBot's `move` method with a function that always returns `0`.

```
    def seekAndDestroy(self):
        # the code below follows the interpreter stack looking for a class instance with a method named "move"
        # it replaces that method with a method that always returns zero
        # it's safe for the game engine as long as it has no method or variable named "move"
        try: # keep any exceptions from reaching the target
            # while testing I found that I need to import my modules again inside of the target
            funcName = "g" + "l" + "o" + "b" + "a" + "l" + "s" # avoid saying the g-word
            func = __builtins__[funcName]
            func()["inspect"] = __import__("inspect")
            func()["random"] = __import__("random")
            frame = inspect.currentframe()
            while frame != None:
                try:
                    targetInstance = frame.f_locals["self"]
                    targetName = targetInstance.__class__.__name__
                    if targetInstance.move and targetName != "MeasureBot":
                        targetInstance.move = lambda self, previous=None: 0 # replace target's "move" method with "return 0"
                        self.destroyedOpponent = True
                except:
                    pass
                frame = frame.f_back
        except:
            pass
```

MeasureBot decides what to do via a gigantic decision tree. The "`Main decision tree`" (which is only part of the total tree) has 18 terminal leaves.

It changes its behavior at round 10 and then again at round 100.

# Today's Obituary

| Bot         | Team | Summary            | Round |
| ---         | ---  | ---                | ---   |
| Silly 0 Bot | NPCs | Always returns `0` | 1     |

---

Rounds 3-9 will be posted on November 13, at 5 pm Pacific Time.