TuGames
A Mathematica Package for Cooperative Game Theory
Install / Use
/learn @himeinhardt/TuGamesREADME
Mathematica Package: TuGames Version 3.1.4
Contents:
1. Introduction
2. Custom Installation
3. Getting Started
3.1 Basic Example
3.2 Using a different Solver
4. Running the Package in Parallel
4.1 General Procedure
4.2 Running the Cddmathlink libraries in Parallel
5. MATLink and MATtug (Matlab toolbox MatTuGames)
6. Documentation
7. Graphics
8. Acknowledgment
9. License
1. Introduction
TuGames is a Mathematica package to determine and to check some
game properties of transferable utility games. It provides more
than 200 different functions to calculate, for instance, (pre-)kernel
elements, the (pre-)nucleolus, the modiclus, the modified and proper modified
pre-kernel, the Shapley value, Lorenz solution, Dutta-Ray solution,
excess payoffs, the tau-value, chi-value, Gately point, the vertices of a core, and much more.
Moreover, it verifies if the game is convex, average-convex or superadditive
just to mention some interesting game properties. It can be used in serial
as well as in parallel mode, and in conjunction with MATLink to build up a Matlab
connection to invoke the toolbox MatTuGames. This package is exclusively
dedicated to Mathematica version 12.x and higher, because TUG-3.0.0 is the first
version that is transcribed to the new collection of algorithms for solving convex problems
introduced in version 12. For Mathematica versions smaller than 12.0 one should use TUG-2.6.2.
This version remains compatible with the most recent Mathematica version as long as
ConstrainedMax/ConstrainedMin and LinearProgramming/DualLinearProgramming are supported by Wolfram Research,
otherwise one has to switch to TUG-3.0.0 or later. In this respect, the graphical
features should run on all platforms. As a highlight, a fast algorithm to seek for a
pre-kernel element is implemented in the updated package. This algorithm is described
in the book
The Pre-Kernel as a Tractable Solution for Cooperative Games
An Exercise in Algorithmic Game Theory
Series: Theory and Decision Library C, Vol. 45
Meinhardt, Holger Ingmar
2014, XXXIII, 242 p. 8 illus., 4 illus. in color
More information can be found here:
Moreover, we have included a new package called ParaTuGames to literally run the major commands of TuGames in parallel. Notice that this package has not passed its stage of development. Hence, the user should use it with care and for testing only.
In addition, note that these functions/interfaces had to be provided in a Global context
to call the parallel commands of Mathematica within a package. This design requires
that during a running session with ParaTuGames no other variables of Global context
should be defined to avoid name conflicts and wrong results. Though use only the
commands that start with the prefix Para, and which returns a description of how to
use it. To get an idea of its usage, invoke in the panel of the Documentation Center TUG
and click then on hyperlink "ParaTuGames Package" to open the file
TUG/Tutorials/ParaExpGamePers12 from the Documentation Center (cf. Section 6).
Finally, this package does not require the configuration procedure as under Section 4.
A modified version of the package CooperativeGames that has been developed by M. Carter to run properly with Mathematica 12.x and higher is enclosed. It must be mentioned in this place that some commands of TuGames require routines that have been provided by the package CooperativeGames. A description of the package CooperativeGames can be found in
Hal R. Varian, Economic and Financial Modeling with Mathematica,
Telos Springer Publisher,1993, Chapter 8.
Furthermore, if one is interested in computing the vertices of a core the Mathematica package VertexEnum written by K. Fukuda and I. Mizukoshi must also be installed on the computer. But note that this function is very slow in computing all vertices of a core even for modern computers. You can overcome these shortcomings of VertexEnum by installing the C-library Cddmathlink written by the same authors to perform the same computational task more efficiently. It can be found under
for various UNIX, MacOSX and for Window systems. The library is linked via MathLink with the Mathematica Kernel. Under Linux and Mathematica 11.3 we complied successfully the binaries using the following compiler flags
MLFLAGS = -lML64i4 -lpthread -lrt -luuid -ldl
See also our post at
to overcome possible pitfalls, which might occur during a compilation of the Cddmathlink binaries.
For Windows and MacOSX Operating Systems pre-build binaries are available under
This C-library is required to use the graphical features of the package. Notice that the functions that based on this library are activated. To deactivate them comment in the corresponding lines in the TuGames.m file (cf. Section 2).
In order to install the library, we recommend it to do so in the TUG directory tree.
We have provided several folders that should receive the Cddmathlink executables for
different Operating System ABIs. To retrieve your system ID execute in a Notebook
$SystemID
We have provided some executables for RHEL 7.5, RHEL 8.2, and MacOSX. Unfortunately, we are not experienced enough under Windows to provide any for those. Thus, we invite the community to fill that gap and to provide some.
In order check for Mathematica versions smaller than 12.1 the paths where you have to install the Cddmathlink library call the command
In[1]:= PacletInformation["TUG"]
Out[1]= {Name -> TUG, Version -> 3.1.4 BuildNumber -> , Qualifier -> , WolframVersion -> 12+,
SystemID -> All, Description -> A Mathematica Package for Cooperative Game Theory,
Category -> , Creator -> Holger Ingmar Meinhardt <holger.meinhardt@partner.kit.edu>,
Publisher -> , Support -> , Internal -> False, Location -> /home/kit/xxx/xxxx/.Mathematica/Paclets/Repository/TUG-3.1.4
Context -> {TUG`coop`, TUG`vertex`, TUG`}, Enabled -> True, Loading -> Manual}
To get the same information and beyond that under Mathematica version 12.1, it is required to execute
In[1]:= PacletObject["TUG"][All]
Out[1]= {"Name" -> "TUG", "Version" -> "3.1.4", "WolframVersion" -> "12+",
"Qualifier" -> "", "SystemID" -> All, "Description" -> "A Mathematica Package for Cooperative Game Theory",
"Category" -> Missing["NotAvailable"], "Keywords" -> Missing["NotAvailable"],
"UUID" -> Missing["NotAvailable"],
"Creator" ->
"Holger Ingmar Meinhardt <holger.meinhardt@partner.kit.edu>",
"URL" -> "https://github.com/himeinhardt/TuGames",
"Internal" -> False,
"Context" -> {"TUG`coop`", "TUG`vertex`", "TUG`"},
"Loading" -> Manual, "AutoUpdating" -> False, "Enabled" -> True,
"Location" -> "/home/kit/xxx/xxxx/.Mathematica/Paclets/Repository/TUG-3.1.4"}
or alternatively
Information[PacletObject["TUG"]]
Then open the directory for Mathematica versions smaller than 12.1 by
SystemOpen@Lookup[PacletInformation["TUG"], "Location"]
or for Mathematica version 12.1 one opens the directory via
SystemOpen@Lookup[PacletObject["TUG"][All], "Location"]
This returns the root directory of TUG, and shows you the three folders
cddmathlink, cddmathlink2 and cddmathlink2gmp that should receive the Cddmathlink
executables.
The author has tested the functions extensively under LINUX x86/64, HP-UX and AIX.
Furthermore, the package was also be installed and tested successfully under Windows XP
and MacOSX. For more recent Windows OS the author has no experience. But the
programming language of Mathematica is system independent, thus, there should no problems
occur on these operating systems to run the basic functions of the package.
2. Custom Installation
Since Version 2.5.1 the package is distributed as a Paclet, which allows a custom installation. The latest version is TUG-3.1.4, which is only compatible for Mathematica version 12.0 or higher. This version is not any more usable for versions that are smaller than 12.0. Notice that TUG-2.6.2 is the latest version that is compatible with Mathematica versions smaller than 12.0, and will remain compatible with the most recent Mathematica version as long as ConstrainedMax/ConstrainedMin and LinearProgramming/DualLinearProgramming are supported by Wolfram Research, otherwise one has to update to TUG-3.0.0 or later. The installation of the package requires about 90 MB free hard-disk space, and the Mathematica version should not be smaller than 10 while installing Version TUG-2.6.2. For Mathematica versions smaller than Version 10, a manual installation is requested. In that case one has to follow the guidelines related to the associated operating system that can be found from the Mathematica documentation.
The simplest method is to install the Paclet directly from GitHub under Mathematica V12.0 or later while executing
ResourceFunction["GitHubInstall"]["himeinhardt", "TuGames"]
For smaller versions than 12.0 start Mathematica,
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
