Learn R Programming

CoopGame (version 0.2.2)

apexGame: Construct an apex game

Description

Create a list containing all information about a specified apex game: A coalition can only win (and hence obtain the value 1) if it a) contains both the apex player and one additional player or b) contains all players except for the apex player. Any non-winning coalitions obtain the value 0. Note that apex games are always simple games.

Usage

apexGame(n, apexPlayer)

Arguments

n

represents the number of players

apexPlayer

specifies the number of the apex player

Value

A list with three elements representing the apex game (n, apexPlayer, Game vector v)

Related Functions

apexGameValue, apexGameVector

References

Peters H. (2015) Game Theory: A Multi-Leveled Approach, 2nd Edition, Springer, pp. 164--165

Examples

Run this code
# NOT RUN {
library(CoopGame)
apexGameVector(n=3,apexPlayer=2)

# }
# NOT RUN {
library(CoopGame)
#Example with four players, apex player is number 3
(vv<-apexGame(n=4,apexPlayer=3))
#$n
#[1] 4

#$apexPlayer
#[1] 4

#$v
# [1] 0 0 0 0 0 1 0 1 0 1 1 1 1 1 1
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab