logitdyn

class quantecon.game_theory.logitdyn.LogitDynamics(data, beta=1.0)[source]

Bases: object

Class representing the logit-response dynamics model.

Parameters:
dataNormalFormGame or array_like

The game played in the logit-response dynamics model.

betascalar(float)

The level of noise in player’s decision.

Attributes:
Nscalar(int)

The number of players in the game.

playerslist(Player)

The list consisting of all players with the given payoff matrix.

nums_actionstuple(int)

Tuple of the number of actions, one for each player.

betascalar(float)

See parameters.

player.logit_choice_cdfsarray_like(float)

The choice probability of each actions given opponents’ actions.

Methods

logit_choice_cdfs()

Return the tuple of choice probabilities.

play([init_actions, player_ind_seq, ...])

Return a new action profile which is updated num_reps times.

time_series(ts_length[, init_actions, ...])

Return the array representing time series of action profiles.

logit_choice_cdfs()[source]

Return the tuple of choice probabilities.

play(init_actions=None, player_ind_seq=None, num_reps=1, random_state=None)[source]

Return a new action profile which is updated num_reps times.

Parameters:
init_actionstuple(int), optional(default=None)

The action profile in the initial period. If None, selected randomly.

player_ind_seqlist(int), optional(default=None)

The sequence of player indices. If None, selected randomly.

num_repsscalar(int), optional(default=1)

The number of iterations.

random_stateint or np.random.RandomState/Generator, optional

Random number generator used.

Returns:
tuple(int)

The action profile after iterations.

time_series(ts_length, init_actions=None, random_state=None)[source]

Return the array representing time series of action profiles.

Parameters:
ts_lengthscalar(int)

The number of iterations.

init_actionstuple(int), optional(default=None)

The action profile in the initial period. If None, selected randomly.

random_stateint or np.random.RandomState/Generator, optional

Random number generator used.

Returns:
ndarray(int)

The array representing the time series of action profiles.