|
|
|
|
|
|
""" |
|
|
|
policy = self.trainer.create_policy(parsed_behavior_id, brain_parameters) |
|
|
|
policy.create_tf_graph() |
|
|
|
policy.initialize_or_load() |
|
|
|
policy.init_load_weights() |
|
|
|
team_id = parsed_behavior_id.team_id |
|
|
|
self.controller.subscribe_team_id(team_id, self) |
|
|
|
|
|
|
internal_trainer_policy = self.trainer.create_policy( |
|
|
|
parsed_behavior_id, brain_parameters |
|
|
|
) |
|
|
|
internal_trainer_policy.create_tf_graph() |
|
|
|
self.trainer.add_policy(parsed_behavior_id, internal_trainer_policy) |
|
|
|
internal_trainer_policy.init_load_weights() |
|
|
|
self.current_policy_snapshot[ |
|
|
|
parsed_behavior_id.brain_name |
|
|
|
|
|
|
self._save_snapshot() # Need to save after trainer initializes policy |
|
|
|
self.trainer.add_policy(parsed_behavior_id, internal_trainer_policy) |
|
|
|
self._learning_team = self.controller.get_learning_team |
|
|
|
self.wrapped_trainer_team = team_id |
|
|
|
return policy |
|
|
|