random¶
Filename: random.py
Author: Daisuke Oyama
Generate random NormalFormGame instances.
-
quantecon.game_theory.random.covariance_game(nums_actions, rho, random_state=None)[source]¶ Return a random NormalFormGame instance where the payoff profiles are drawn independently from the standard multi-normal with the covariance of any pair of payoffs equal to rho, as studied in [R5].
Parameters: nums_actions : tuple(int)
Tuple of the numbers of actions, one for each player.
rho : scalar(float)
Covariance of a pair of payoff values. Must be in [-1/(N-1), 1], where N is the number of players.
random_state : scalar(int) or np.random.RandomState,
optional(default=None)
Random seed (integer) or np.random.RandomState instance to set the initial state of the random number generator for reproducibility. If None, a randomly initialized RandomState is used.
Returns: g : NormalFormGame
References
[R5] (1, 2) Y. Rinott and M. Scarsini, “On the Number of Pure Strategy Nash Equilibria in Random Games,” Games and Economic Behavior (2000), 274-293.
-
quantecon.game_theory.random.random_game(nums_actions, random_state=None)[source]¶ Return a random NormalFormGame instance where the payoffs are drawn independently from the uniform distribution on [0, 1).
Parameters: nums_actions : tuple(int)
Tuple of the numbers of actions, one for each player.
random_state : scalar(int) or np.random.RandomState,
optional(default=None)
Random seed (integer) or np.random.RandomState instance to set the initial state of the random number generator for reproducibility. If None, a randomly initialized RandomState is used.
Returns: g : NormalFormGame