Kidnapping and the game of Chicken
post by Manfred · 2013-11-03T06:29:09.725Z · LW · GW · Legacy · 21 commentsContents
21 comments
Observe the payoff matrix at right (the unit of reward? Cookies.). Each player wants to play 'A', but only so long as the two players play different moves.
Suppose that Red got to move first. There are some games where moving first is terrible - take Rock Paper Scissors for example. But in this game, moving first is great, because you get to narrow down your opponent's options! If Red goes first, Red picks 'A', and then Blue has to pick 'B' to get a cookie.
This is basically kidnapping. Red has taken all three cookies hostage, and nobody gets any cookies unless Blue agrees to Red's demands for two cookies. Whoever gets to move first plays the kidnapper, and the other player has to decide whether to accede to their ransom demand in exchange for a cookie.
What if neither player gets to move before the other, but instead they have their moves revealed at the same time?
Pre-Move Chat:
Red: "I'm going to pick A, you'd better pick B."
Blue: "I don't care what you pick, I'm picking A. You can pick A too if you really want to get 0 cookies."
Red: "Okay I'm really seriously going to pick A. Please pick B."
Blue: "Nah, don't think so. I'll just pick A. You should just pick B."
And so on. They are now playing a game of Chicken. Whoever swerves first is worse off, but if neither of them give in, they crash into each other and die and get no cookies.
So, The Question: is it better to play A, or to play B?
21 comments
Comments sorted by top scores.
comment by V_V · 2013-11-03T20:18:17.991Z · LW(p) · GW(p)
You might want to analyze this game according to standard game theory before trying to reinvent the wheel (and risking to make it square).
In particular, when your proposed strategy involves guessing what the other players do, and this doesn't converge when the other players do the same to you, it is usually a bad sign (sometimes it's not possible to do anything better, but sometime it is).
Let's start with the standard version:
There are two pure strategy Nash equilibria: (A, B) and (B, A). Both are Pareto-optimal, but they benefit the player who played A more than the other, thus they are "unfair", in the sense that they yield asymmetric payoff in a symmetric game.
There is also a mixed strategy Nash equilibrium which is symmetric but sub-optimal.
The game is a bargaining problem and a coordination game as well. In particular, it is a variation of the battle of the sexes game.
Unfortunately, there doesn't seem to be any truly satisfactory solution to this game. There is, however, a correlated equilibrium solution. If both players have access to a public random bit generator, they can obtain a Pareto-optimal symmetric payoff equilibrium, assuming that they can communicate to coordinate a strategy (they don't have to make a contract).
Now, let's consider the program-swap variant of the game.
First of all, a remark on the wording:
what if we allow players access to each others' source code?
Players don't have access to each others' source code. Players submit 'bots': programs which have access to each others' source code. The submitted programs are (pure) strategies, not players. I think it is important to always make the distinction clear, otherwise there is a risk of confusion between the decision makers and the decisions themselves, which may lead to flawed proposed solutions.
In the program-swap variant of this game we (players) can achieve something eqiivalent to the correlated equilibrium by using clique-like mixed strategies:
Each player flips a coin and submits either CliqueBot_0 or CliqueBot_1, which are defined as:
def CliqueBot_X(otherBot):
if otherBot is not a CliqueBot_X then output 'A'
Y = extract 'X' from otherBot
ID = player id (either 0 or 1)
if X xor Y xor ID then output 'A'
otherwise output 'B'
This achieves a Pareto-optimal symmetric equilibrium against itself and, being a clique, it also achieves stability: defectors from the clique are immediately punished. It also achieves maximum payoff against B-bots and PredictorBots, though it performs poorly against A-bots.
The main issue with this strategy is, of course, that there are infinitely many cliques, each of them doesn't cooperate with the others. This becomes to a "choosing sides" coordination game, which is easier than the original game: you just need a single way communication channel between the players to achieve coordination. Even if there is no communicaton channel, it might possible to achieve coordination using a prior, without lack of convergence.
Replies from: Manfred↑ comment by Manfred · 2013-11-03T23:47:16.912Z · LW(p) · GW(p)
You might want to analyze this game according to standard game theory before trying to reinvent the wheel (and risking to make it square).
Fair enough,
Players don't have access to each others' source code.
Well... This article is tagged decision_theory, not game_theory. The goal is not merely to explore solutions to this game, the goal is to explore solution-finding strategies to this game, or at least lay the foundations for that.
I think your CliqueBots need the insight behind Emile's hashMe proposal - they each need a unique ID. Otherwise, when CliqueBot_0 plays a copy, "X xor Y xor ID" is 0, so both play B, so they both lose.
Replies from: V_V↑ comment by V_V · 2013-11-04T00:09:02.705Z · LW(p) · GW(p)
Well... This article is tagged decision_theory, not game_theory. The goal is not merely to explore solutions to this game, the goal is to explore solution-finding strategies to this game, or at least lay the foundations for that.
Isn't that exactly the topic of game theory?
I think your CliqueBots need the insight behind Emile's hashMe proposal - they each need a unique ID. Otherwise, when CliqueBot_0 plays a copy, "X xor Y xor ID" is 0, so both play B, so they both lose.
Yes, I assumed that the execution environment provides the bots with a binary role ID as an additional (implicit) parameter. If that's a problem you can use a more sophisticated symmetry-breaking scheme, on the lines of Emile's proposal, but I think it is better to maintain cliquing, which is missing from Emile's proposal.
Replies from: Manfred↑ comment by Manfred · 2013-11-04T02:50:28.164Z · LW(p) · GW(p)
Isn't that exactly the topic of game theory?
Well, you seem to be more expert than I am, so I can just ask you :D Given a small, two-player payoff matrix, what general process outputs the correct move for player 1?
Replies from: V_V↑ comment by V_V · 2013-11-04T15:43:24.236Z · LW(p) · GW(p)
I'm not really that expert, but I can try to answer the question anyway.
The short answer is to implement game theory.
Of course, this is easier said than done.
Under the assumption that the other player is at least as rational as you are, you generally want a decision procedure that chooses a strategy which is part of a Nash equilibrium (under mild assumptions, at least one Nash equilibrium always exists). If there are multiple Nash equilibria, as it is often the case, you want your decision procedure to seek for a refinement and hope that the other player does the same.
Ultimately, for some games there is no single satisfactory solution. It could be that this happens because game theory is incomplete or that these games are intrinsically unsolvable dilemmas. In these cases, you might want to fall back to an heuristic (such as randomization or trying to guess the other player decision)
↑ comment by Manfred · 2013-11-06T08:40:32.293Z · LW(p) · GW(p)
Hm. So I think I reinvented the wheel to moderate success, then. In the blind, no-communication case, you play the bargaining equilibrium. With communication via source code, though, I didn't make my wheel - following the bargaining equilibrium among strategies - very round. This is because you can use your source codes to send two random numbers, which lets you cooperate with the other player. But there are many different possible ways of doing this, each corresponding to a different equilibrium.
To have any chance of cooperating, and thus beating my slightly non-round wheel, you need a prior over opponents to let you narrow down the search for cooperation schemes (probably "pick the simplest"), and you need to randomize over the multiple remaining equilibria. And no cliqueishness here, since we're trying to play blind.
comment by Emile · 2013-11-03T09:52:07.020Z · LW(p) · GW(p)
The best "A-players" and "B-players" now choose moves against their copies by flipping coins, so that half the time they get at least one cookie.
Waidaminute - those aren't "A-players" or "B-players" any more, but variants. And if two "A-player variants" vary in a slightly different way, will they recognize each other as such? Doing so is not a trivial problem!
Anyway, my algorithm would be something like:
"Calculate a hash of my code, hashMe, and a hash of my opponent, hashYou. If (hashMe + hashYou) is odd, the player with the highest hash shall be the Chosen One, otherwise it's the player with the lowest hash (if the hashes are identical, find some other unambiguous higher/lower criteria both players share, player IDs or something or lexicographic ordering of source code, if none exists, flip a coin). If I'm the Chosen One, play A, otherwise play B. Also, random string of comments (to ensure different instances of this algorithm have different hash functions)."
This should have an expected value 1.5 against predictors (it can be simulated safely without recursion problems), 0.5 against A-players, 1 against B-players and 0.75 against coin-flippers. And more importantly, it's resistant to exploitation/blackmail, and gets the max utility of 1.5 against itself.
The only problem with this algorithm is that it's not good at coordinating with similar algorithms that have a different "Chosen One" criteria (e.g. "look at the parity of the (hashMe+HashYou)th digit of pi"). That could be fixed, but is considerably more complicated.
Replies from: jkaufman, Manfred, V_V↑ comment by jefftk (jkaufman) · 2013-11-05T19:47:12.511Z · LW(p) · GW(p)
Calculate a hash of my code, hashMe, and a hash of my opponent, hashYou. If (hashMe + hashYou) is odd, the player with the highest hash shall be the Chosen One, otherwise it's the player with the lowest hash (if the hashes are identical, find some other unambiguous higher/lower criteria both players share, player IDs or something or lexicographic ordering of source code, if none exists, flip a coin).
This is way too complicated. Instead of ending with "flip a coin" why not just start with it?
↑ comment by V_V · 2013-11-03T18:16:33.049Z · LW(p) · GW(p)
.. vary in a slightly different way, will they recognize each other as such?
Being strict in recognizing the other is a feature, not a bug. You want to obtain a stable Nash equilibrium.
Replies from: Emile↑ comment by Emile · 2013-11-03T21:58:09.586Z · LW(p) · GW(p)
If you don't recognize your opponent as a copy of yourself because he's written in C++ and not Java, or because he uses iteration and not recursion, then you're acting sub-optimally (unless those things matter of course!).
Replies from: V_V↑ comment by V_V · 2013-11-03T23:53:18.267Z · LW(p) · GW(p)
Don't conflate the player with the bot.
In any cliquing strategy, you (the player) want to submit a bot that always defects against a bot that is not functionally equivalent to itself: this is crucial to guarantee the stability of the Nash equilibrium that you hope to reach.
You also want your bot to cooperate with any bot it can prove to be functionally equivalent to itself, and to always compute an answer in a finite time.
Due to Rice's theorem , functional equivalence is a semidecidable property, therefore you need to use a stronger, decidable, equivalence relation that underestimates, but never overestimates, functional equivalence.
Textual equality is the most obvious of such relations. You can invent many more weaker equivalence relations that still guarantee functional equivalence, but they would add complexity to your bot and presumbly make coordination with the other player more difficult, therefore it is not an obvious choice to use any of them.
Once you have chosen to use a cliquing strategy, you still have to choose between (infinitely) many cliques, therefore you face a "choosing sides" coordination game with the other player. This a non-trivial problem, but fortunately it is easier than the original game.
comment by gjm · 2013-11-03T17:15:42.981Z · LW(p) · GW(p)
It's not directly relevant, but here's my favourite fact about Chicken, which I think I found in a book by Steven Brams: If you play a game of Chicken against God (or Omega, or any other entity able to read your mind or otherwise predict your behaviour), God loses. (Because all you have to do is decide not to flinch, and your omniscient opponent knows you will not flinch, and It then has no better option than to flinch and let you win.)
Of course the correct next inference is that Omega either doesn't play Chicken, or cheats (at which point It is in fact no longer playing Chicken but some other game). Seems reasonable enough.
Replies from: None, Emile↑ comment by [deleted] · 2013-11-04T14:18:09.222Z · LW(p) · GW(p)
This makes me curious what happens when two algorithms, both of whom have access to the others source code, both play chicken.
Replies from: gjm↑ comment by gjm · 2013-11-04T15:35:00.256Z · LW(p) · GW(p)
Well, obviously the result depends on what the algorithms actually do. If you're going to be playing against an opponent with access to your source code, you'd quite like to be a nice simple "always-stand-firm" program, which even a very stupid opponent can prove will not flinch. But of course that leads to all algorithms doing that, and then everybody dies.
It's not clear that this is avoidable. While it's interesting to think in the abstract about programs analysing one another's code, I think that in practice programs clever enough to do anything nontrivial with one another's code are almost inevitably much too difficult to analyse, and unless there are big disparities in computational resource available simulation isn't much help either. So we're left with doing trivial things with one another's code: e.g., perhaps you could say "if facing an exact copy of myself, flinch with probability p; else stand firm unconditionally", and anything that makes a halfway-serious attempt at analysis will see that it isn't going to win. (What's the best value of p? Depends on the exact payoffs. With classical Chicken where "neither flinch" => "both die", it's probably very close to 1. But then with classical Chicken the best meta-algorithm is not to play the damn game in the first place.)
↑ comment by Emile · 2013-11-03T21:13:08.213Z · LW(p) · GW(p)
If you play a game of Chicken against God, God loses.
Does he?
... and great letters of fire appeared in the Sky, visible to half a continent, while a great booming voice read them out loud: "I, The Almighty, Am About To Play Chicken Against gjm. I Will Not Flinch, And Hereby Swear That Should I Do So, I Shall Abdicate My Reign Over The Universe In Favour Of Satan, The Deceiver. I Also Swear That I Have Not And Will Not Read gjm's Mind Until Either The Game Is Over Or He Died And Must Face Judgement."
Replies from: gjm↑ comment by gjm · 2013-11-04T01:15:05.729Z · LW(p) · GW(p)
Hmm. Does God even have the option of not reading my mind?
Of course the answer is ill-defined for multiple reasons. My feeling is that the standard LW notion of Omega says that It has mind-reading (or simulating, or ...) apparatus that It can use or not as It pleases, whereas God simply, automatically, ineffably knows everything that can be known. If so, then when I play them at Chicken Omega wins and God loses.
Also: it's part of the definition of the game of Chicken that the neither-flinches outcome is worst for both players. So if God's still playing Chicken even after the precommitment above, then the outcome if I remain unintimidated must be even worse for him than abdicating in favour of Satan. And -- if he truly isn't reading my mind -- that's got to be a real possibility. In which case, for him to play this game at all he'd have to be incredibly stupid. Which isn't supposed to be one of God's attributes.
Replies from: Armok_GoBcomment by Ishaan · 2013-11-03T19:02:05.237Z · LW(p) · GW(p)
Note: If you understand up to Stage 1 of this post, you now understand how allele frequencies are determined in a population that has random mating and a few other biology related assumptions. The invisible "Players" choose which allele it is better to be, and they will settle onto an equilibrium as Manfred describes.
The above post contains everything you need to do some intro-level population genetics problems. If you learned something from the above most and would now like to test your shiny new genetics skills, here's a problem set:
Suppose A and B are the only two alleles in a diploid genome, and AA has fitness 2, BB has fitness 1, and AB has fitness 3
Problem: What proportion of alleles are A? What proportion of alleles are B?
Bonus question: What will the final distribution of AA, AB, and BB prototypes look like?
In practice for biologists, you'd be doing this problem backwards - looking at the percent of the population that expresses each phenotype, and using that to infer allele frequencies and relative fitness. If I tell you that 25% of a population has sickle cell, if you know that sickle cell disease comes from a homozygous recessive allele, and if you are willing to assume various things, that's all you need to work backwards all the way to the payoff matrix.
In practice, of course, mating isn't random. If AB is inferior to both AA and BB, then there is an incentive for A carriers to avoid B carriers and it is a trend towards speciation. If AB is superior to both AA and BB, there is an incentive for heterozygosity.) Also in practice, the allele frequencies are constantly shifting so you are following a moving target, and sometimes sampling is biased (for example, carriers of low fitness alleles die before you can measure them) etc.
comment by linkhyrule5 · 2013-11-06T20:28:01.373Z · LW(p) · GW(p)
This strikes me as yet another example of the value of being able to precommit in Newcomblike problems. The dumb predictor is playing the role of the box-chooser; the smarter predictor is Omega.
comment by Ishaan · 2013-11-03T19:58:09.494Z · LW(p) · GW(p)
At the meta-level, it seems to me like I aught to use a fair coin flip to decide who gets A and who gets B, and that I further aught to punish any defectors who don't go along with this and try to just pick A and kidnap the cookies.
But this only "wins" to the extent that it reduces the ratio of non-negotiating-A-players, so it only works in the iterated case...