Giter Club home page Giter Club logo

shapley_value's Introduction

Shapley Value

This is python code to compute a Shapley Value of a characteristic form game.

Run

python2 shapley.py <inputfilename>

Input File Format

N = n

v(1),...,v(1,2,…,n)

(Number of players in the first row and valuations for all the coalitions in the second row except the empty set. Valuations are ordered in this manner: v(1),..,v(n),v(12),..,v(1n),v(23)..,v(2n),..,v(n-1n),v(123),v(124),.,v(12n),v(234)..,..,v(12..n) )

Files

TestCases/divide_dollar file has been provided which is for the Divide the Dollar version 2 game from Prof. Y. Narahari's Game Theory lecture notes http://lcm.csa.iisc.ernet.in/gametheory/ln/web-cp3-TUgames.pdf

There are many other input test files in the TestCases directory

shapley_value's People

Contributors

susobhang70 avatar

Stargazers

 avatar ShengguangZhou avatar  avatar Marcus Ghosh avatar Anton Voskresenskii avatar  avatar B3LYP avatar Lei Yu avatar Javier Godoy avatar kajiwara avatar Johann avatar yukoga avatar Michal Kuspit avatar

Watchers

James Cloos avatar  avatar

Forkers

ddanvux rowatc

shapley_value's Issues

V value

Hi, I am sorry to bother you again. May I please ask how did you derive the parameter for V? What is the function of the V? When I went through your text files TC1.Text. I found this N = 4
1, 1, 2, 1, 3, 4, 4, 3, 4, 4, 5, 7, 6, 6, 8

The value is of N is clear, how did you get the following values : 1, 1, 2, 1, 3, 4, 4, 3, 4, 4, 5, 7, 6, 6, 8 (text file TC1.Text)

The coalition order

Hi ,
9 players should have 511 coalitions, that is N=9.
3 players (in a team with 9 members)will have 84 coalitions . As your document, i have the following list:
v(123),v(124),v(125),v(126),v(127),v(128),v(129),
v(234),v(235),...v(239),
v(345),v(346)..........v(349)
...
v(789)
Above is 24 coalitions, so still have 84-24=60 coalitions, would you like to let me know what’s next?
V(134) v(135) ...v(139)
V(145)v(146)...v(149)
V(156)v(157)..v(159)
...
V(189)
Are these right?

The order of these data seems to have some impact on the result.
Much appreciated it if any help could be provided.
Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.