StrategyTwelve

class poisson_approval.StrategyTwelve(d_ranking_ballot, profile=None, voting_rule=None)[source]

A strategy profile for a 12-type profile.

Parameters:
  • d_ranking_ballot (dict) –

    Keys are rankings and values are strategies, e.g. 'abc': 'ab'. A strategy can be a valid ballot (e.g. 'a' or 'ab' when the ranking is 'abc'), UTILITY_DEPENDENT or '' if the behavior of these voters is not specified in the strategy. Cf. ProfileTwelve.

    In the case of Plurality, the valid ballots for voters 'abc' are 'a' and 'b'. In the case of Anti-plurality, their valid ballots are 'ab' (vote against c) and 'ac' (vote against b).

  • profile (Profile, optional) – The “context” in which the strategy is used.
  • voting_rule (str) – The voting rule. Possible values are APPROVAL, PLURALITY and ANTI_PLURALITY. Default: the same voting rule as profile if a profile is specified, APPROVAL otherwise.

Examples

>>> strategy = StrategyTwelve({'abc': 'utility-dependent', 'bac': 'b'})
>>> strategy
StrategyTwelve({'abc': 'utility-dependent', 'bac': 'b'})
>>> print(strategy)
<abc: utility-dependent, bac: b>
>>> strategy.abc
'utility-dependent'
>>> strategy.a_bc
'a'
>>> strategy.ab_c
'ab'
a_bc

Ballot of type a_bc.

Type:str
a_cb

Ballot of type a_cb.

Type:str
ab_c

Ballot of type ab_c.

Type:str
abc

Ballot of ranking abc.

Type:str
ac_b

Ballot of type ac_b.

Type:str
acb

Ballot of ranking acb.

Type:str
b_ac

Ballot of type b_ac.

Type:str
b_ca

Ballot of type b_ca.

Type:str
ba_c

Ballot of type ba_c.

Type:str
bac

Ballot of ranking bac.

Type:str
bc_a

Ballot of type bc_a.

Type:str
bca

Ballot of ranking bca.

Type:str
c_ab

Ballot of type c_ab.

Type:str
c_ba

Ballot of type c_ba.

Type:str
ca_b

Ballot of type ca_b.

Type:str
cab

Ballot of ranking cab.

Type:str
cb_a

Ballot of type cb_a.

Type:str
cba

Ballot of ranking cba.

Type:str
d_ranking_best_response

Defined when a profile is given. Cf. TauVector.d_ranking_best_response.

deepcopy_with_attached_profile(profile)

Deep copy with an attached profile.

Parameters:profile (Profile) –
Returns:A deep copy of this strategy, with the attached profile profile.
Return type:Strategy
duo_ab

Defined when a profile is given. Cf. TauVector.duo_ab.

duo_ac

Defined when a profile is given. Cf. TauVector.duo_ac.

duo_ba

Defined when a profile is given. Cf. TauVector.duo_ba.

duo_bc

Defined when a profile is given. Cf. TauVector.duo_bc.

duo_ca

Defined when a profile is given. Cf. TauVector.duo_ca.

duo_cb

Defined when a profile is given. Cf. TauVector.duo_cb.

is_equilibrium

Whether this strategy is an equilibrium (in the context of the given profile). Cf. Profile.is_equilibrium().

Type:EquilibriumStatus
pivot_strict_ab

Defined when a profile is given. Cf. TauVector.pivot_strict_ab.

pivot_strict_ac

Defined when a profile is given. Cf. TauVector.pivot_strict_ac.

pivot_strict_ba

Defined when a profile is given. Cf. TauVector.pivot_strict_ba.

pivot_strict_bc

Defined when a profile is given. Cf. TauVector.pivot_strict_bc.

pivot_strict_ca

Defined when a profile is given. Cf. TauVector.pivot_strict_ca.

pivot_strict_cb

Defined when a profile is given. Cf. TauVector.pivot_strict_cb.

pivot_tij_abc

Defined when a profile is given. Cf. TauVector.pivot_tij_abc.

pivot_tij_acb

Defined when a profile is given. Cf. TauVector.pivot_tij_acb.

pivot_tij_bac

Defined when a profile is given. Cf. TauVector.pivot_tij_bac.

pivot_tij_bca

Defined when a profile is given. Cf. TauVector.pivot_tij_bca.

pivot_tij_cab

Defined when a profile is given. Cf. TauVector.pivot_tij_cab.

pivot_tij_cba

Defined when a profile is given. Cf. TauVector.pivot_tij_cba.

pivot_tjk_abc

Defined when a profile is given. Cf. TauVector.pivot_tjk_abc.

pivot_tjk_acb

Defined when a profile is given. Cf. TauVector.pivot_tjk_acb.

pivot_tjk_bac

Defined when a profile is given. Cf. TauVector.pivot_tjk_bac.

pivot_tjk_bca

Defined when a profile is given. Cf. TauVector.pivot_tjk_bca.

pivot_tjk_cab

Defined when a profile is given. Cf. TauVector.pivot_tjk_cab.

pivot_tjk_cba

Defined when a profile is given. Cf. TauVector.pivot_tjk_cba.

pivot_weak_ab

Defined when a profile is given. Cf. TauVector.pivot_weak_ab.

pivot_weak_ac

Defined when a profile is given. Cf. TauVector.pivot_weak_ac.

pivot_weak_ba

Defined when a profile is given. Cf. TauVector.pivot_weak_ba.

pivot_weak_bc

Defined when a profile is given. Cf. TauVector.pivot_weak_bc.

pivot_weak_ca

Defined when a profile is given. Cf. TauVector.pivot_weak_ca.

pivot_weak_cb

Defined when a profile is given. Cf. TauVector.pivot_weak_cb.

print_all_pivots()

Defined when a profile is given. Cf. TauVector.print_all_pivots().

print_weak_pivots()

Defined when a profile is given. Cf. TauVector.print_weak_pivots().

scores

Defined when a profile is given. Cf. TauVector.scores.

tau

The tau-vector associated to this strategy (in the context of the given profile). Cf. Profile.tau().

Type:TauVector
trio

Defined when a profile is given. Cf. TauVector.trio.

trio_1t_a

Defined when a profile is given. Cf. TauVector.trio_1t_a.

trio_1t_b

Defined when a profile is given. Cf. TauVector.trio_1t_b.

trio_1t_c

Defined when a profile is given. Cf. TauVector.trio_1t_c.

trio_2t_ab

Defined when a profile is given. Cf. TauVector.trio_2t_ab.

trio_2t_ac

Defined when a profile is given. Cf. TauVector.trio_2t_ac.

trio_2t_ba

Defined when a profile is given. Cf. TauVector.trio_2t_ba.

trio_2t_bc

Defined when a profile is given. Cf. TauVector.trio_2t_bc.

trio_2t_ca

Defined when a profile is given. Cf. TauVector.trio_2t_ca.

trio_2t_cb

Defined when a profile is given. Cf. TauVector.trio_2t_cb.

winners

Defined when a profile is given. Cf. TauVector.winners.

τ

The tau-vector (alternate notation). Cf. Profile.τ().

Type:TauVector