浏览代码

Removing commented out code.

/develop-generalizationTraining-TrainerController
Deric Pang 7 年前
当前提交
e580e544
共有 3 个文件被更改,包括 2 次插入19 次删除
  1. 7
      python/unityagents/environment.py
  2. 4
      python/unitytrainers/trainer_controller.py
  3. 10
      python/curricula/push_curriculum.json

7
python/unityagents/environment.py


# return SocketCommunicator(worker_id, base_port)
def __str__(self):
# Set reset parameters from trainer.
'''_new_reset_param = self._curriculum.get_config()
for k in _new_reset_param:
self._resetParameters[k] = _new_reset_param[k]'''
return '''Unity Academy name: {0}
Number of Brains: {1}
Number of External Brains : {2}

for k in self._resetParameters])) + '\n' + \
'\n'.join([str(self._brains[b]) for b in self._brains])
def reset(self, config, train_mode=True, lesson=None) -> AllBrainInfo:
def reset(self, config, train_mode=True) -> AllBrainInfo:
"""
Sends a signal to reset the unity environment.
:return: AllBrainInfo : A Data structure corresponding to the initial reset state of the environment.

4
python/unitytrainers/trainer_controller.py


from tensorflow.python.tools import freeze_graph
from unitytrainers.ppo.trainer import PPOTrainer
from unitytrainers.bc.trainer import BehavioralCloningTrainer
from unitytrainers import Curriculum
from .curriculum import Curriculum
from unityagents.exception import UnityEnvironmentException, UnityActionException, UnityTimeOutException
from communicator_objects import UnityRLInitializationInput

10
python/curricula/push_curriculum.json


{
"measure" : "progress",
"thresholds" : [0.1],
"min_lesson_length" : 2,
"signal_smoothing" : true,
"parameters" :
{
"goal_size" : [25.0, 5.0]
}
}
正在加载...
取消
保存