View source: R/communication_game.R
| communication_game | R Documentation |
Build the communication (graph-restricted) game of a communication situation, in which only connected players can cooperate (Myerson, 1977).
communication_game(characteristic_func, graph_edges, n_players = 0)
characteristic_func |
The characteristic function of the game. It can be
a numeric vector with the value of every coalition, in the order given by
|
graph_edges |
Edges of the communication graph of the game: a
|
n_players |
Only used if |
The worth of a coalition S in the communication game is the sum of
the worths of the connected components of the subgraph induced by S:
v^G(S) = \sum_{C \in C^G(S)} v(C).
The Myerson value is the Shapley value of this game, so
shapley(communication_game(v, graph_edges)) equals
myerson(v, graph_edges).
The value of the empty coalition is taken as 0.
If characteristic_func is a vector, a vector with the value
of every nonempty coalition of the communication game, in the order given
by coalitions. If characteristic_func is a function, a
function that receives a coalition (a vector of players) and returns its
value in the communication game. It evaluates characteristic_func
only on the connected components of the coalitions it receives, so there is
no limit on the number of players, and it can be passed directly to the
other functions of the package.
Myerson, R. B. (1977). Graphs and Cooperation in Games. Mathematics of Operations Research, 2(3), 225–229. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1287/moor.2.3.225")}
myerson, myerson_unions
v <- c(1, 2, 3, 10, 20, 30, 100)
communication_game(v, graph_edges = list(c(1, 3)))
v <- function(coalition) length(coalition)^2
graph_edges <- list(c(1, 2), c(2, 3))
vG <- communication_game(v, graph_edges, n_players = 4)
vG(c(1, 2, 4))
shapley(vG, n_players = 4)
myerson(v, graph_edges, n_players = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.