浏览代码

rays and disc

/soccer-comms
Andrew Cohen 4 年前
当前提交
8a95b0bb
共有 3 个文件被更改,包括 28 次插入22 次删除
  1. 32
      Project/Assets/ML-Agents/Examples/Soccer/Prefabs/SoccerFieldTwos.prefab
  2. 12
      Project/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs
  3. 6
      config/ppo/SoccerTwos.yaml

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)

6
config/ppo/SoccerTwos.yaml


network_settings:
normalize: false
hidden_units: 512
num_layers: 2
num_layers: 3
vis_encode_type: simple
reward_signals:
extrinsic:

max_steps: 50000000
max_steps: 100000000
time_horizon: 1000
summary_freq: 10000
threaded: false

window: 10
play_against_latest_model_ratio: 0.5
initial_elo: 1200.0
env_settings:
num_envs: 4
正在加载...
取消
保存