@@ -732,21 +732,21 @@ def test_strategy(self):
732732 # Test TitForTat behavior in first 15 turns
733733 opponent = axl .Cooperator ()
734734 actions = list ([(C , C )]) * 15
735- self .versus_test (opponent , expected_actions = actions )
735+ self .versus_test (opponent , expected_actions = actions , seed = 1 )
736736
737737 opponent = axl .Defector ()
738738 actions = [(C , D )] + list ([(D , D )]) * 14
739- self .versus_test (opponent , expected_actions = actions )
739+ self .versus_test (opponent , expected_actions = actions , seed = 1 )
740740
741741 opponent = axl .Alternator ()
742742 actions = [(C , C )] + [(C , D ), (D , C )] * 7
743- self .versus_test (opponent , expected_actions = actions )
743+ self .versus_test (opponent , expected_actions = actions , seed = 1 )
744744
745745 opponent_actions = [C , D , D , C , D , C , C , D , C , D , D , C , C , D , D ]
746746 opponent = axl .MockPlayer (actions = opponent_actions )
747747 mem_actions = [C , C , D , D , C , D , C , C , D , C , D , D , C , C , D ]
748748 actions = list (zip (mem_actions , opponent_actions ))
749- self .versus_test (opponent , expected_actions = actions )
749+ self .versus_test (opponent , expected_actions = actions , seed = 1 )
750750
751751 def test_strategy2 (self ):
752752 opponent = axl .Random ()
@@ -812,3 +812,14 @@ def test_alternative_starting_strategies(self):
812812 "start_strategy_duration" : 0 ,
813813 },
814814 )
815+
816+ def test_memory_alter_delete (self ):
817+ """Trigger memory_alter and memory_delete."""
818+ opponent = axl .Cooperator ()
819+ actions = list ([(C , C )]) * 50
820+ self .versus_test (
821+ opponent ,
822+ expected_actions = actions ,
823+ init_kwargs = {"start_strategy" : axl .Cooperator },
824+ seed = 11
825+ )
0 commit comments