浏览代码

fix hurry reward/ add awful first training

/active-variablespeed
HH 4 年前
当前提交
51969c6f
共有 5 个文件被更改,包括 1020 次插入2 次删除
  1. 2
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/RewardManager.cs
  2. 6
      Project/Assets/ML-Agents/Examples/Walker/Scenes/WalkerDynamic.unity
  3. 2
      Project/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs
  4. 1001
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamic 1.nn
  5. 11
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamic 1.nn.meta

2
Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/RewardManager.cs


public void UpdateReward(string key, float rawVal)
{
float val = rawVal * rewardsDict[key].rewardScalar;
rewardsDict[key].maxRewardThisSession =1/maxSteps;
rewardsDict[key].maxRewardThisSession = val * maxSteps;
rewardsDict[key].rewardThisStep = val;
rewardsDict[key].cumulativeThisEpisode += val;
rewardsDict[key].cumulativeThisSession += val;

6
Project/Assets/ML-Agents/Examples/Walker/Scenes/WalkerDynamic.unity


propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6065910098925129095, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: m_Model
value:
objectReference: {fileID: 11400000, guid: c85becd32a14a4c048895b4eafc718ce,
type: 3}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f51e8260728fd4c8fa87bcda9d0e2027, type: 3}
--- !u!4 &6065910099080495282 stripped

2
Project/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs


rewardManager.UpdateReward("matchSpeed", matchSpeedReward);
rewardManager.UpdateReward("lookAtTarget", lookAtTargetReward);
rewardManager.UpdateReward("headHeightOverFeet", headHeightOverFeetReward);
rewardManager.UpdateReward("hurryUp", hurryUpReward);
rewardManager.UpdateReward("hurryUp", hurryUpReward/MaxStep);
}
// void FixedUpdate()

1001
Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamic 1.nn
文件差异内容过多而无法显示
查看文件

11
Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamic 1.nn.meta


fileFormatVersion: 2
guid: c85becd32a14a4c048895b4eafc718ce
ScriptedImporter:
fileIDToRecycleName:
11400000: main obj
11400002: model data
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 19ed1486aa27d4903b34839f37b8f69f, type: 3}
正在加载...
取消
保存