def sp_strategies():
    """The list of strategies used in Stewart and Plotkin's 2012 tournament."""

    strategies = [
        axelrod.Cooperator(),  # ALLC
        axelrod.Defector(),  # ALLD
        axelrod.GTFT(),
        axelrod.GoByMajority(soft=False),  # HARD_MAJO
        #axelrod.GoByMajority(soft=True), # SOFT_MAJO
        axelrod.TitFor2Tats(),  # TFT2
        axelrod.HardTitFor2Tats(),  # HARD_TFT2
        axelrod.Random(),  # RANDOM
        axelrod.WinStayLoseShift(),  # WSLS
        axelrod.TitForTat(),
        axelrod.HardTitForTat(),  # HARD_TFT
        axelrod.Grudger(),  # GRIM
        axelrod.Joss(),  # HARD_JOSS
        axelrod.ZDGTFT2(),
        axelrod.ZDExtort2(),
        axelrod.Prober(),
        axelrod.Prober2(),
        axelrod.Prober3(),
        axelrod.HardProber(),
        axelrod.Calculator(),
    ]
    return strategies
Пример #2
0
 def test_rounds(self):
     self.versus_test(
         axl.ZDGTFT2(),
         axl.Bully(),
         [C, D, D, C, C, D],
         [D, D, C, C, D, D],
         seed=2,
     )
Пример #3
0
def main():
    strategies = [
        axelrod.Cooperator(),
        axelrod.Defector(),
        axelrod.Random(0.4),
        axelrod.Random(0.5),
        axelrod.Random(0.9),
        axelrod.Alternator(),
        axelrod.TitForTat(),
        axelrod.GTFT(),
        axelrod.WinStayLoseShift(),
        axelrod.ZDGTFT2(),
        axelrod.ZDExtort2(),
        axelrod.TitFor2Tats(),
        axelrod.TwoTitsForTat(),
        axelrod.CyclerCCD(),
        axelrod.CyclerCCCD(),
        axelrod.CyclerCCCCCD(),
        axelrod.HardTitForTat(),
        axelrod.AntiCycler(),
        axelrod.Grudger()
    ]

    for opponent in strategies:
        data_dict, test_results, estimate = infer_depth(opponent)

        print opponent
        print "-" * len(str(opponent))
        print "Collected Data"
        print_dict(data_dict)
        C_count = sum(v[0] for (k, v) in data_dict.items())
        D_count = sum(v[1] for (k, v) in data_dict.items())
        print "C count, D count: %s, %s" % (C_count, D_count)
        print "\nFisher Exact Tests"
        print_dict(test_results)
        print "\nEstimated Memory One Probabilities"
        print_dict(estimate)
        print
Пример #4
0
 def test_rounds(self):
     self.versus_test(axelrod.ZDGTFT2(),
                      axelrod.Bully(), [C, D, D, C, C, D],
                      [D, D, C, C, D, D],
                      random_seed=2)
Пример #5
0
    axl.Tester(),
    axl.Tranquilizer(),
    axl.Weiner(),
    axl.White(),
    axl.WmAdams(),
    axl.Yamachi()
]

# The list of agents playing in the Stewart-Plotkin's tournament.
steward_plotkin_players = [
    axl.ZDExtort2(),
    axl.HardGoByMajority(),
    axl.HardTitForTat(),
    axl.HardTitFor2Tats(),
    axl.GTFT(),
    axl.ZDGTFT2(),
    axl.Calculator(),
    axl.Prober(),
    axl.Prober2(),
    axl.Prober3(),
    axl.HardProber(),
    axl.NaiveProber()
]

# The list of agents playing in the Case's simulation
case_players = [
    axl.Cooperator(),
    axl.Defector(),
    axl.TitForTat(),
    axl.Grudger(),
    axl.Detective(),