Dynamic Process: Robustness to the Initial Poll (C.4)

[1]:
import pandas as pd
from poisson_approval import *
[2]:
N_SAMPLES = 10000
N_MAX_EPISODES = 1000
[3]:
inits = {
    'uniform undominated': 'random_tau_undominated',
    'expressive': 'fanatic',
}

Condorcet Consistency

[4]:
table_cond = pd.DataFrame()
table_cond.index.name = 'Distribution of tau^0'
for init_name, init in inits.items():
    rand_profile = RandConditional(
        RandProfileHistogramUniform(n_bins=1),
        test=is_condorcet, n_trials_max=None
    )
    results = monte_carlo_fictitious_play(
        factory=rand_profile,
        n_samples=N_SAMPLES,
        n_max_episodes=N_MAX_EPISODES,
        voting_rules=VOTING_RULES,
        init=init,
        monte_carlo_settings=[
            MCS_FREQUENCY_CW_WINS,
        ],
        file_save='sav/init_%s_with_CW.sav' % init_name,
    )
    for voting_rule in VOTING_RULES:
        table_cond.loc[init_name, voting_rule] = float(results[voting_rule]['mean_frequency_cw_wins'])
table_cond
[4]:
Approval Plurality Anti-plurality
Distribution of tau^0
uniform undominated 0.999974 0.8170 0.489474
expressive 0.999990 0.9681 0.488994

Welfare Loss

[5]:
table_welfare_loss = pd.DataFrame()
table_welfare_loss.index.name = 'Distribution of tau^0'
for init_name, init in inits.items():
    rand_profile = RandProfileHistogramUniform(n_bins=1)
    results = monte_carlo_fictitious_play(
        factory=rand_profile,
        n_samples=N_SAMPLES,
        n_max_episodes=N_MAX_EPISODES,
        voting_rules=VOTING_RULES,
        init=init,
        monte_carlo_settings=[
            MCS_WELFARE_LOSSES,
        ],
        file_save='sav/init_%s.sav' % init_name,
    )
    for voting_rule in VOTING_RULES:
        table_welfare_loss.loc[init_name, voting_rule] = float(
            results[voting_rule]['mean_utilitarian_welfare_loss'])
table_welfare_loss
[5]:
Approval Plurality Anti-plurality
Distribution of tau^0
uniform undominated 0.006502 0.030931 0.099204
expressive 0.006553 0.008550 0.099098