我一直在研究一种自平衡代理,它努力将腰部保持在一定的高度。最近,我升级了“大腿”,允许 3 轴旋转,而不是之前的 2 轴。完成此操作并修改机器学习代理代码以允许使用子传感器后,代理现在似乎不再与多个代理/区域一起工作。我不知道为什么会发生这种情况。需要明确的是,唯一的工作特工表现得比平时更加“爆炸”。当它独自一人时,它在尝试平衡时会更加平静。也许我在这个过程中搞砸了其他事情?如果有人有任何想法,我都愿意。谢谢你!
代理脚本:
using MLAgents;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using MLAgents.Sensor;
using Random = UnityEngine.Random;
public class BalanceAgent : Agent
{
private BalancingArea area;
public GameObject floor;
public GameObject sensor;
public GameObject waist;
public GameObject wFront; //Used to check balance of waist.
public GameObject wBack; //Used to check balance of waist.
public GameObject hipR;
public GameObject hipL;
public GameObject buttR;
public GameObject buttL;
public GameObject thighR;
public …
Run Code Online (Sandbox Code Playgroud) c# artificial-intelligence machine-learning unity-game-engine ml-agent
我有一个在 pytorch 中训练的神经网络,我想将其部署到 Unity 应用程序中。最好的方法是什么?我也有兴趣允许用户在 Unity 应用程序中进一步训练神经网络,我想这需要将 pytorch 的某些部分集成到 Unity 中(也许有一种方法可以将 pytorch 的 C++/torchscript API 与 Unity 集成?)。如果有人有这方面的经验,我想知道最好的选择是什么。
我有Unity 2018.1.9f2,我下载了Unity ml代理并将文件夹添加到我的unity项目中。但是,当我尝试运行“ 3DBall”场景时,在控制台中出现此错误:
资产/ ml-agents-master / UnitySDK /资产/ML-Agents/Scripts/Brain.cs(79,25):错误CS1644:无法使用功能为null的传播运算符,因为它不属于C#4.0语言规范。当我双击它时,它将打开VS并brainBatcher?.SendBrainInfo(name, agentInfos);
带有下划线。当我将鼠标悬停在代码上时Feature 'null propagating operator' is not available in C# 4. Please use language version 6 or greater.
我试图遵循另一个类似问题的答案:Unity Visual Studio C#版本同步。因此,我使用unity-c-5.0-and-6.0-integration,但未显示该错误,但出现了150多个其他错误。
任何帮助都感激不尽。