Thursday, November 27, 2014

Tóth's food serving game

Recently I've dived into game theory by attending a course. I've always been haunted by a dilemma while serving food to my guests at my apartment and now I'd like to introduce this problem in the formal terms of game theory - just for fun :D

Let's have a grill party G(N, f), where N is the set of hungry participants (|N| is the number of them), and f is the amount of food available that is divided among p1, p2, ... p|N| plates. Let hN be the host of the party, g1, g2, ..., g|N|-1N the guests. h serves the food for all the participants including h, as well as divides the f amount among the plates while, being a kind host, lets the guests to choose which plate they want to take. In the end h takes the last one left. Actions of the players' are as follows (a1, a2, ..., anAx denotes the set of actions player x is able to take):

  • Ah: h is able to decide the amount of food he puts on each plate. Therefore, aiAh is the distribution of food among the plates that is (p1, p2, ..., p|N|) – each action is a tuple of plates. Assuming that h has no priority of giving more food to gi than to gj (i ≠ j), h is able to decide the proportion of food he puts on one plate and the average of the food amount on all other plates: (p1, averagei(pi)), a 2-element tuple where i ≠ 1. It is by definition that p1 + (|N| - 1) · averagei(pi) = f, i ≠ 1. Here Ah can be simplified to 3 actions if we neglect the exact proportion of p1 and averagei(pi):
    • a1: p1 > averagei(pi),
    • a2: p1 = averagei(pi),
    • a3: p1 < averagei(pi).
  • Agi: gi is able to choose which pk plate to take - agi = k: gi takes pk. The last plate left goes to h automatically.

The payoff u(playeri, A) for each playeriN is the amount of food taken considering the set of actions A taken by all players – if gi takes the kth plate (agi = k), then u(gi, A) = pk. Now, if h distributes food in a unequal way, h may speculate that the last plate it gets contains more food in ratio to the average. On the contrary, if all the "good" plates are gone, h suffers from being selfish and receives less than f / |N|. The Nash equilibrium of the game intuitively is p1 = averagei(pi) and agi is taking an arbitrary plate, as in this case p1 = p2 = ... = p|N|. To put it simple, let's see a |N| = 2 case with one guest and the host playing, let f = 4, Ag = {1, 2}, Ah = {(1,3), (2,2), (3,1)} by neglecting the continuous nature of Ah (Nash equilibria are indicated by red bordering):

Host Guest
Ah\Ag 1 2
(1,3) 3,1 1,3
(2,2) 2,2 2,2
(3,1) 1,3 3,1

Let's see an example from the matrix: if h puts 1 unit food on p1, and 3 units on p2 (ah = (1,3)), and if g then chooses to take p2 (ag = 2), then u(h, {ah, ag}) = 1, because h gets p1 (the one plate left) containing 1 unit of food, and u(g, {ah, ag}) = 3, because g gets p2 (what was chosen by it) containing 3 units of food. In this case we're in the 1st row and 2nd column of the game matrix: (1,3).

The general case matrix with arbitrary number of guests and continuous Ah would have a |N| dimensional representation where the first dimension is infinite – that is determined by the infinite number of choices of h. Each cell of such a matrix would contain:
(pleft, pag1, pag2, ..., pag|N-1|) where pleft ∉ {pag1, pag2, ..., pag|N-1|}, and pagi is the plate gi chooses.

The moral of the game is: you'd better distribute that food equally, because it always converges to the Nash equilibrium in the long term – alternatively you can just eat some before serving without anyone to notice :3

No comments:

Post a Comment