def setUp(self): """Initialization for tests.""" # For each test, we check the answer against each possible # inputs, that are in self.input_pos. self.input_pos = [(C, C), (C, D), (D, C), (D, D)] # We define the policies against which we are going to test. self.cooperator_policy = dbs.create_policy(1, 1, 1, 1) self.defector_policy = dbs.create_policy(0, 0, 0, 0) self.titForTat_policy = dbs.create_policy(1, 1, 0, 0) self.alternator_policy = dbs.create_policy(0, 1, 0, 1) self.grudger_policy = dbs.create_policy(1, 0, 0, 0) self.random_policy = dbs.create_policy(0.5, 0.5, 0.5, 0.5)