浏览代码

warning for team change hyperparam

/develop/cubewars
Andrew Cohen 5 年前
当前提交
0d460514
共有 1 个文件被更改,包括 10 次插入2 次删除
  1. 12
      ml-agents/mlagents/trainers/ghost/trainer.py

12
ml-agents/mlagents/trainers/ghost/trainer.py


self.steps_between_save = self_play_parameters.get("save_steps", 20000)
self.steps_between_swap = self_play_parameters.get("swap_steps", 20000)
self.steps_to_train_team = self_play_parameters.get("team_change", 100000)
if self.steps_to_train_team > self.get_max_steps:
logger.warning(
"The max steps of the GhostTrainer for behavior name {} is less than \
team change. This team will not face opposition that has been trained if the opposition \
is managed by a different GhostTrainer as in an asymmetric game.".format(
self.brain_name
)
)
# Counts the The number of steps of the ghost policies. Snapshot swapping
# depends on this counter whereas snapshot saving and team switching depends

@property
def get_step(self) -> int:
"""
Returns the number of steps the trainer has performed
:return: the step count of the trainer
Returns the number of steps the wrapped trainer has performed
:return: the step count of the wrapped trainer
"""
return self.trainer.get_step

正在加载...
取消
保存