|
|
|
|
|
|
return self.trainer.create_policy(brain_parameters) |
|
|
|
|
|
|
|
def add_policy(self, name_behavior_id: str, policy: TFPolicy) -> None: |
|
|
|
""" |
|
|
|
Adds policy to trainer. For the first policy added, add a trainer |
|
|
|
to the policy and set the learning behavior name to name_behavior_id. |
|
|
|
:param name_behavior_id: Behavior ID that the policy should belong to. |
|
|
|
:param policy: Policy to associate with name_behavior_id. |
|
|
|
""" |
|
|
|
self.policies[name_behavior_id] = policy |
|
|
|
policy.create_tf_graph() |
|
|
|
|
|
|
|