示例#1
0
 def sample_and_set_str(self, str_dict=None):
     nn = ss.sample_strategy_from_mixed(env=self.myenv,
                                        str_set=self.str_set,
                                        mix_str=self.mix_str,
                                        identity=1,
                                        str_dict=str_dict)
     self.set_current_strategy(nn)
示例#2
0
 def sample_and_set_str(self, str_dict=None):
     assert self.myenv.training_flag == 0  # Should be training the attacker when sampling defender meta-strategy.
     nn, nn_name = ss.sample_strategy_from_mixed(env=self.myenv,
                                                 str_set=self.str_set,
                                                 mix_str=self.mix_str,
                                                 identity=1,
                                                 str_dict=str_dict)
     self.nn_name = nn_name
     self.nn_att = nn