Unity 机器学习代理工具包 (ML-Agents) 是一个开源项目,它使游戏和模拟能够作为训练智能代理的环境。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 

39 行
1.1 KiB

import os
import sys
import argparse
from .yamato_utils import get_base_path, run_standalone_build
def main(scene_path, build_target):
base_path = get_base_path()
print(f"Running in base path {base_path}")
executable_name = "testPlayer"
if scene_path is not None:
executable_name = os.path.splitext(scene_path)[0] # Remove extension
executable_name = executable_name.split("/")[-1]
executable_name = "testPlayer-" + executable_name
print(f"Executable name {executable_name}")
returncode = run_standalone_build(
base_path,
output_path=executable_name,
scene_path=scene_path,
build_target=build_target,
)
if returncode == 0:
print("Test run SUCCEEDED!")
else:
print("Test run FAILED!")
sys.exit(returncode)
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--scene", default=None)
parser.add_argument("--build-target", default="mac", choices=["mac", "linux"])
args = parser.parse_args()
main(args.scene, args.build_target)