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