Dynamic Process: Robustness to the Belief Updating Parameter (with CW) (C.2)

[1]:
import pandas as pd
from poisson_approval import *
[2]:
N_SAMPLES = 10000
N_MAX_EPISODES = 1000
[3]:
update_ratios = {
    '1': 1,
    '0.5': 0.5,
    'one_over_log_log_t_plus_fourteen': one_over_log_log_t_plus_fourteen,
    'one_over_log_t_plus_one': one_over_log_t_plus_one,
    'one_over_sqrt_t': one_over_sqrt_t,
    'one_over_t': one_over_t,
}
[4]:
rand_profile = RandConditional(
    RandProfileHistogramUniform(n_bins=1),
    test=is_condorcet, n_trials_max=None
)

Condorcet consistency:

[5]:
table_cond = pd.DataFrame()
table_cond.index.name = 'Belief updating parameter'
for update_ratio_name, update_ratio in update_ratios.items():
    results = monte_carlo_fictitious_play(
        factory=rand_profile,
        n_samples=N_SAMPLES,
        n_max_episodes=N_MAX_EPISODES,
        voting_rules=VOTING_RULES,
        init='random_tau',
        perception_update_ratio=update_ratio,
        monte_carlo_settings=[
            MCS_FREQUENCY_CW_WINS,
        ],
        file_save='sav/perception_update_%s_with_CW.sav' % update_ratio_name,
    )
    for voting_rule in VOTING_RULES:
        table_cond.loc[update_ratio_name, voting_rule] = float(results[voting_rule]['mean_frequency_cw_wins'])
table_cond
[5]:
Approval Plurality Anti-plurality
Belief updating parameter
1 0.999385 0.6616 0.547106
0.5 0.999765 0.6721 0.527511
one_over_log_log_t_plus_fourteen 0.999898 0.6735 0.531112
one_over_log_t_plus_one 0.999729 0.6700 0.492881
one_over_sqrt_t 1.000000 0.6599 0.462096
one_over_t 0.999500 0.6645 0.446902