Discussion of the Equilibrium Concept (6)

[1]:
import numpy as np
from poisson_approval import *
[2]:
random_profile = RandProfileHistogramUniform(n_bins=1)
[3]:
not_converge = 0
converge_ordinal = 0
converge_cardinal_is_large_equilibrium = 0
converge_cardinal_is_not_large_equilibrium = 0
for i in range(10000):
    profile = random_profile()
    result = profile.fictitious_play(
        init='random_tau',
        n_max_episodes=1000,
        perception_update_ratio=one_over_log_t_plus_one,
        ballot_update_ratio=one_over_log_t_plus_one
    )
    if not result['converges']:
        not_converge += 1
    elif result['tau'].focus == Focus.DIRECT:
        converge_ordinal += 1
    else:
        is_stable = profile.is_equilibrium_stable(result['strategy'])
        if is_stable:
            converge_cardinal_is_large_equilibrium += 1
        else:
            converge_cardinal_is_not_large_equilibrium += 1
            break
print(f"{not_converge=}")
print(f"{converge_ordinal=}")
print(f"{converge_cardinal_is_large_equilibrium=}")
print(f"{converge_cardinal_is_not_large_equilibrium=}")
not_converge=524
converge_ordinal=1168
converge_cardinal_is_large_equilibrium=8308
converge_cardinal_is_not_large_equilibrium=0
[ ]: