浏览代码

fixed side channels -> float prop

/asymm-envs
Andrew Cohen 5 年前
当前提交
b1f01bb5
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 3
      Project/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs

3
Project/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs


using UnityEngine;
using MLAgents;
using MLAgents.Policies;
using MLAgents.SideChannels;
public class AgentSoccer : Agent
{

public override void OnEpisodeBegin()
{
m_BallTouch = Academy.Instance.FloatProperties.GetPropertyWithDefault("ball_touch", 0);
m_BallTouch = SideChannelUtils.GetSideChannel<FloatPropertiesChannel>().GetPropertyWithDefault("ball_touch", 0);
if (team == Team.Purple)
{
transform.rotation = Quaternion.Euler(0f, -90f, 0f);

正在加载...
取消
保存