Group Abstract Group Abstract

Message Boards Message Boards

Calculate Shapley Values using TuGames package?

Posted 6 years ago

I downloaded the package TuGames from http://library.wolfram.com/infocenter/MathSource/5709/ (for Windows) to calculate Shapley Values in cooperative bargaining games.

I got it to work earlier today but after closing and opening mathematica again, this simple code would not work. When it worked, all I did was paste the content of the package in C:\Program Files\Wolfram Research\Mathematica\11.0\AddOns\Packages\TuGames\, and I manage to run the code below. However, it doesn't run anymore. Any thoughts on what could be causing the problem?

Needs["coopCooperativeGames"] Needs["TuGames`"]

ExpGame := (T = {1, 2, 3, 4}; Clear[v];
  v[{}] = 0;
  v[{1}] = 0;
  v[{2}] = 0;
  v[{3}] = 0;
  v[{4}] = 0;
  v[{1, 2}] = 0;
  v[{1, 3}] = 1/4;
  v[{1, 4}] = 2/4;
  v[{2, 3}] = 1/4;
  v[{2, 4}] = 3/4;
  v[{3, 4}] = 0;
  v[{1, 2, 3}] = 1;
  v[{1, 2, 4}] = 1;
  v[{1, 3, 4}] = 1;
  v[{2, 3, 4}] = 1; v[T] = 2)
ShapleyValue[ExpGame]

This is the error I'd get sometimes. Other times it just crashes.

In[30]:= Needs["coop`CooperativeGames`"]
Needs["TuGames`"]
During evaluation of In[30]:= Get::noopen: Cannot open coop`CooperativeGames`.
During evaluation of In[30]:= Needs::nocont: Context coop`CooperativeGames` was not created when Needs was evaluated.
Out[30]= $Failed
POSTED BY: rodrigo montes
8 Replies

Updated Information for Installing the Package TuGames: 17.05.2020

For those who want to get the most recent version of the Mathematica Package TuGames 2.6.1, we recommend a direct installation from GitHub under Mathematica V11.3 or later while executing in a notebook the command

ResourceFunction["GitHubInstall"]["himeinhardt", "TuGames"]

otherwise one needs to follow one of the alternative custom installation procedure that can be found at project home at GitHub

TuGames

POSTED BY: rodrigo montes

I had the same problem with previous Mathematica versions and after that I decided not to use that package anymore. By the way it is an excellent package for cooperative games because it has many functions.

Thank you both for the answers.

POSTED BY: rodrigo montes
POSTED BY: Szabolcs Horvát
Posted 6 years ago

Woah those installation instructions are so crazy... So many steps. So many ill-considered steps.

POSTED BY: b3m2a1 ​ 
Posted 6 years ago

See the Installation and Trouble Shooting sections of the README.

POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard