TUGlab - TUGlabExtended

Transferable utility game theory Matlab toolboxes   Authors

1. Miguel Ángel Mirás Calvo. Department of Mathematics. University of Vigo
2. Estela Sánchez Rodríguez. Department of Statistics and Operations Research. University of Vigo

We wish to acknowledge the support of the Santiago Game Theory Group.

Already available TUGlabWeb the Transferable Utility Games Web Interface based on TUGlab. TUGlab information

The toolbox TUGlab (Transferable Utility Games laboratory) is a Matlab set of scripts that could serve as a helpful complement to the books and other materials used in introductory courses on cooperative game theory. Its main goal is to emphasize the geometrical aspects of cooperative game theory. TUGlab offers to both the instructor and the student a tool to compute and visualize basic concepts for any given 3 or 4 persons TU game. It allows the user to experiment at will with games without worrying about the mathematical complexity of the computations. That is the power of this platform: its direct and flexible way of going to the heart of the concepts overcoming the mathematical complexity.

The TUGlab platform works on any implementation of the later releases of the Matlab product: Matlab 6 and Matlab 7 on Unix, PC or Macintosh. It is a collection of 58 files including:

1. The main scripts (29 M-files) defining the procedures concerning game theory concepts.
2. Auxiliary scripts (27 M-files) necessary for the computations but not directly related to game theory.
3. Data files (2 MAT-files)

To install it, just copy and paste the folder TUGlab on your hard disk. Then, include this directory in the Matlab search path. All the TUGlab functions can be run directly from the Matlab Command Window. The characteristic function of the game must be introduced as a vector
A=[v(1) v(2) v(3) v(12) v(13) v(23) v(123)], for 3-persons games, or
A=[v(1) v(2) v(3) v(4) v(12) v(13) v(14) v(23) v(24) v(34) v(123) v(124) v(134) v(234) v(1234)], for 4-persons games.

We include some illustrative examples on how to use the toolbox. These are:

1. Drawing the cores of the parametric family of 3-persons games given by A(p)=[0 0 0 p p p 1], p=0,...,2/3. If p<=1/2 the game A(p) is convex. For p>1/2 the game A(p) is not convex and, therfore, the core and the Weber set do not coincide. For p=8/15, the core and the Weber set are superimposed. As p approaches 2/3, the core shrinks to a point.
2. Drawing the cores of the parametric family of 4-persons games given by
A(p)=[0 0 0 0 c(p) c(p) c(p) c(p) c(p) c(p) p p p p 22], with c(p)=max(0,p-5) and p=0,...,14. If p<=10 the game A(p) is convex. For p>10 the game A(p) is not convex and, therfore, the core and the Weber set do not coincide. For p=12, we get an example proposed by Derks, 2001: the core has 24 extreme points none of which is a marginal vector.For this particular value p=12, we draw the Weber set, the core and the marginal vectors.
3. A Matlab movie to compare the behavior of the Shapley value, the nucleolus and the corecenter. The "mouviesource.m" file creates the movie and stores it in the file "simulation.mat". Once you have created the movie, if you want to see it again run the script "simulation.m". The frames show the core of the parametric game A(p)=[0,0,0,p,5,5,10], p=0,...,10, and compare the Shapley value, the corecenter and the nucleolus. The game is convex in the parameter range [0,5]. The nucleolus, N, the corecenter, CC, and the Shapley value, Sh, coincide for p=0. The nucleolus remains unchanged, N=(2.5,2.5,5), if the parameter p belongs to [0,2.5] while CC and Sh varied. The three values converge to (10/3,10/3,10/3) when the parameter p moves from 2.5 to 5. The game is not convex in the parameter range [5,10], the core is a triangle that shrinks to the point (5,5,0) as p approaches 10, so CC and N coincide and converge to that point. But, the Weber set grows so Sh moves away from the other two values. TU game introductory textbook using TUGlab by the authors
[More... (In Spanish)] [Distribution] [Typographical errors] [Mathworks support books]

TUGlabExtended information

The toolbox TUGlabExtended is a Matlab set of scripts that extends the TUGlab package, that only works for 3 and 4 person games, to cover an arbitrary number of players. Therefore, it does not include graphical features.

The TUGlabExtended platform works on any implementation of the later releases of the Matlab product: Matlab 6 and Matlab 7 on Unix, PC or Macintosh. It is a collection of 24 files including:

1. The main scripts (16 M-files) defining the procedures concerning game theory concepts.
2. Auxiliary scripts (8 M-files) necessary for the computations but not directly related to game theory.

To install it, just copy and paste the folder TUGlabExtended on your hard disk. Then, include this directory in the Matlab search path. All the TUGlab functions can be run directly from the Matlab Command Window.

The characteristic function of a n-person game must be introduced as a 1x(2^n-1) vector following the order induced by the binary representation of the coalitions:

 Position Binary Coalition 1 100 {1} 2 010 {2} 3 110 {1,2} 4 001 {3} 5 101 {1,3} 6 011 {2,3} 7 111 {1,2,3}

The table below shows how the execution time (in seconds) of some TUGlabExtended commands increases with the number of players.

 Players Shapley value Tau-value Checking convexity 3 0.016912 0.004057 0.000732 4 0.050173 0.001219 0.000766 5 0.141409 0.002493 0.002999 6 0.385369 0.005456 0.012129 7 1.012571 0.012438 0.049606 8 2.579563 0.028435 0.201198 9 6.418109 0.064519 0.801556 10 15.546376 0.145796 3.294879 11 37.162233 0.325364 13.314801 12 87.538653 0.842787 52.558724 13 203.704998 3.903356 209.971761 14 471.142136 12.000016 837.683950 15 1080.910514 37.075949 3419.695234

Software and documentation
 Matlab M-files TUGlab folder ZIP 108Kb TUGlabExtended folder ZIP 16Kb Tutorials Examples of TU games examples.m (4Kb) 3-persons parametric game parametric3.m (4Kb) 4-persons parametric game parametric4.m (4Kb) Comparing point solutions movie moviesource.m (4Kb) simulation.m (4Kb) Documentation TUGlab User's Guide PDF 196Kb TUGlab: A Matlab based platform for teaching TU games theory PDF 112Kb TUGlab: A cooperative game theory toolbox PDF 80Kb TUGlabExtended User's Guide (By David Mirás) [In Spanish] PDF 304Kb TUGlabExtended presentation (By David Mirás) [In Spanish] PDF 352Kb

Last revision: April, 2009.

Please, report bugs or comments to mmiras@uvigo.es or esanchez@uvigo.es.

Please, acknowledge the authors if you make use of TUGlab or TUGlabExtended in your teaching or research.