浏览代码

added disc comms

/soccer-comms/disc
Andrew Cohen 4 年前
当前提交
cb37d0d1
共有 2 个文件被更改,包括 24 次插入20 次删除
  1. 32
      Project/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerFieldTwos.prefab
  2. 12
      Project/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs

32
Project/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerFieldTwos.prefab


m_Name:
m_EditorClassIdentifier:
m_BrainParameters:
VectorObservationSize: 3
VectorObservationSize: 10
m_NumContinuousActions: 3
BranchSizes: 030000000300000003000000
VectorActionSize:
m_NumContinuousActions: 0
BranchSizes: 0300000003000000030000000a000000
VectorActionSize: 0300000003000000030000000a000000
VectorActionDescriptions: []
VectorActionSpaceType: 0
hasUpgradedBrainParametersWithActionSpec: 1

m_Name:
m_EditorClassIdentifier:
m_BrainParameters:
VectorObservationSize: 3
VectorObservationSize: 10
m_NumContinuousActions: 3
BranchSizes: 030000000300000003000000
VectorActionSize:
m_NumContinuousActions: 0
BranchSizes: 0300000003000000030000000a000000
VectorActionSize: 0300000003000000030000000a000000
VectorActionDescriptions: []
VectorActionSpaceType: 0
hasUpgradedBrainParametersWithActionSpec: 1

m_Name:
m_EditorClassIdentifier:
m_BrainParameters:
VectorObservationSize: 3
VectorObservationSize: 10
m_NumContinuousActions: 3
BranchSizes: 030000000300000003000000
VectorActionSize:
m_NumContinuousActions: 0
BranchSizes: 0300000003000000030000000a000000
VectorActionSize: 0300000003000000030000000a000000
VectorActionDescriptions: []
VectorActionSpaceType: 0
hasUpgradedBrainParametersWithActionSpec: 1

m_Name:
m_EditorClassIdentifier:
m_BrainParameters:
VectorObservationSize: 3
VectorObservationSize: 10
m_NumContinuousActions: 3
BranchSizes: 030000000300000003000000
VectorActionSize:
m_NumContinuousActions: 0
BranchSizes: 0300000003000000030000000a000000
VectorActionSize: 0300000003000000030000000a000000
VectorActionDescriptions: []
VectorActionSpaceType: 0
hasUpgradedBrainParametersWithActionSpec: 1

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


public Team team;
float m_KickPower;
int m_PlayerIndex;
int m_Previous = 0;
public SoccerFieldArea area;
// The coefficient for the reward for colliding with a ball. Set using curriculum.

float m_Existential;
float m_LateralSpeed;
float m_ForwardSpeed;
float[] m_Message = new float[3];
float[] m_Message = new float[10];
public GameObject teammate_gb;
AgentSoccer teammate;

timePenalty -= m_Existential;
}
MoveAgent(actionBuffers.DiscreteActions);
teammate.tellAgent(actionBuffers.ContinuousActions.Array);
teammate.tellAgent(actionBuffers.DiscreteActions[3]);
public void tellAgent(float[] message)
public void tellAgent(int message)
m_Message = message;
m_Message[m_Previous] = 0f;
m_Message[message] = 1f;
m_Previous = message;
}
public override void Heuristic(in ActionBuffers actionsOut)

正在加载...
取消
保存