def test_strategy(self): # No error. actions = [(C, C), (C, C), (C, C), (C, C)] self.versus_test(opponent=axl.AdaptorBrief(), expected_actions=actions, seed=0) # Error corrected. actions = [(C, C), (C, D), (D, C), (C, C)] self.versus_test(opponent=axl.AdaptorBrief(), expected_actions=actions, seed=22) # Error corrected, example 2 actions = [(D, C), (C, D), (D, C), (C, D), (C, C)] self.versus_test(opponent=axl.AdaptorBrief(), expected_actions=actions, seed=925) # Versus Cooperator actions = [(C, C)] * 8 self.versus_test(opponent=axl.Cooperator(), expected_actions=actions, seed=0) # Versus Defector actions = [(C, D), (D, D), (D, D), (D, D), (D, D), (D, D), (D, D)] self.versus_test(opponent=axl.Defector(), expected_actions=actions, seed=0)
def test_strategy_error_corrected2(self): # Error corrected, example 2 actions = [(D, C), (C, D), (D, C), (C, D), (C, C)] self.versus_test(opponent=axl.AdaptorBrief(), expected_actions=actions, seed=7935)
def test_strategy_no_error(self): # No error. actions = [(C, C), (C, C), (C, C), (C, C)] self.versus_test(opponent=axl.AdaptorBrief(), expected_actions=actions, seed=1)