CooperativeGames.jl
A package to initiate and apply various solution methods to cooperative transferable utility games.
Install
You can install using
using Pkg; Pkg.add("CooperativeGames")
and load with
using CooperativeGames
What can you do
Implements simple, graph, link, and river games.
Solve with Harsanyi dividends, Shapley, Myerson, Banhaf value.
Test for core and fairness.
Getting started
Get started by defining a set of player N
and a measure on powerset(N)
, v
.
N = [1, 2, 3]
v(S::Int) = v([S])
function v(S::Players)
if isempty(S) return 0. end
# Mapping from S subset of N onto R
end
G = SimpleGame(N, v)
If your game has a graph structure, simply do,
L = [(1, 2), (2, 3)]
G = GraphGame(N, v, L)
This implementation relies on LightGraphs
.