浏览代码

Update API version in anticipation of v0.3 release (#437)

* Update API version in anticipation of v0.3 release
* Use _version_ across both Unity/Python
/develop-generalizationTraining-TrainerController
GitHub 7 年前
当前提交
f19739cb
共有 2 个文件被更改,包括 7 次插入7 次删除
  1. 10
      python/unityagents/environment.py
  2. 4
      unity-environment/Assets/ML-Agents/Scripts/ExternalCommunicator.cs

10
python/unityagents/environment.py


atexit.register(self.close)
self.port = base_port + worker_id
self._buffer_size = 12000
self._python_api = "API-2"
self._version_ = "API-3"
self._loaded = False
self._open_socket = False

.format(str(file_name)))
if "apiNumber" not in p:
self._unity_api = "API-1"
self._unity_version = "API-1"
self._unity_api = p["apiNumber"]
if self._unity_api != self._python_api:
self._unity_version = p["apiNumber"]
if self._unity_version != self._version_:
"of ML-Agents.".format(self._python_api, self._unity_api))
"of ML-Agents.".format(self._version_, self._unity_version))
self._data = {}
self._global_done = None
self._academy_name = p["AcademyName"]

4
unity-environment/Assets/ML-Agents/Scripts/ExternalCommunicator.cs


StreamWriter logWriter;
string logPath;
const string api = "API-2";
const string _version_ = "API-3";
/// Placeholder for state information to send.
[System.Serializable]

accParamerters.brainParameters = new List<BrainParameters>();
accParamerters.brainNames = new List<string>();
accParamerters.externalBrainNames = new List<string>();
accParamerters.apiNumber = api;
accParamerters.apiNumber = _version_;
accParamerters.logPath = logPath;
foreach (Brain b in brains)
{

正在加载...
取消
保存