Cooperative basketball in class
Today in class we repeated the game we played last year. 3 teams of 3 students took part this year and here is a photo of the aftermath:
As a class we watched the three teams attempt to free-throw as many crumpled up pieces of paper in to the bin as possible.
Based on the total number we then tried to come up with how many each subset/coalition of players would have gotten in. So for example, 2 out of 3 of the teams had one student crumple paper while the other 2 took shots. So whilst that individual did not get any in, they contributed an important part to the team effort.
Here are the characteristic functions that show what each team did:
Here is some Sage code that gives the Shapley value for each game (take a look at my class notes or at last years post to see how to calculate this):
Let us define the first game:
If you click Evaluate
above you see that the Shapley value is given by:
(This one we calculated in class)
By changing the numbers above we get the following for the other two games.
-
Game 2:
-
Game 3:
This was a bit of fun and most importantly from a class point of view gave us some nice numbers to work from and calculate the Shapley value together.
If anyone would like to read about the Shapley value a bit more take a look at the Sage documentation which not only shows how to calculate it using Sage but also goes over some of the mathematics (including another formulation).