浏览代码

add bpVel pen

/active-variablespeed
HH 4 年前
当前提交
3a2c2605
共有 5 个文件被更改,包括 1033 次插入9 次删除
  1. 17
      Project/Assets/ML-Agents/Examples/Walker/Prefabs/DynamicPlatformWalker.prefab
  2. 4
      Project/Assets/ML-Agents/Examples/Walker/Scenes/WalkerDynamic.unity
  3. 9
      Project/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs
  4. 1001
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamic Max Speed 10 small hh.nn
  5. 11
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamic Max Speed 10 small hh.nn.meta

17
Project/Assets/ML-Agents/Examples/Walker/Prefabs/DynamicPlatformWalker.prefab


rewardThisStep: 0
cumulativeThisEpisode: 0
cumulativeThisSession: 0
maxRewardThisSession: 0
lastNaNStep: 0
- rewardKey: lookAtTarget
rawVal: 0
rewardScalar: 0.01

maxRewardThisSession: 0
lastNaNStep: 0
- rewardKey: headHeightOverFeet
rawVal: 0
rewardScalar: 0.001

maxRewardThisSession: 0
lastNaNStep: 0
- rewardKey: hurryUp
rawVal: 0
rewardScalar: 0

maxRewardThisSession: 0
lastNaNStep: 0
- rewardKey: bpVel
rawVal: 0
rewardScalar: -0.001
rewardThisStep: 0
cumulativeThisEpisode: 0
cumulativeThisSession: 0
lastNaNStep: 0
maxSteps: 0
--- !u!1001 &6359877978260855390
PrefabInstance:

type: 3}
propertyPath: m_Model
value:
objectReference: {fileID: 11400000, guid: 64eac2876e94e44d2b7905bd6e361343,
objectReference: {fileID: 11400000, guid: 9cdb96bd3846b477cbf9c5ad7ac2d87e,
type: 3}
- target: {fileID: 895268871377934297, guid: 765582efd9dda46ed98564603316353f,
type: 3}

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


m_Modifications:
- target: {fileID: 758428434940870733, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}
propertyPath: rewardsList.Array.data[2].rewardScalar
value: 0.001
propertyPath: rewardsList.Array.data[4].rewardScalar
value: -0.001
objectReference: {fileID: 0}
- target: {fileID: 4712600297668500197, guid: f51e8260728fd4c8fa87bcda9d0e2027,
type: 3}

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


using System;
using MLAgentsExamples;
using UnityEngine;
using Unity.MLAgents;

using Random = UnityEngine.Random;
public class WalkerAgent : Agent
{

rewardManager.ResetEpisodeRewards();
walkingSpeed = Random.Range(0.0f, 10.0f); //Random Walk Speed
walkingSpeed = Random.Range(0.0f, 15f); //Random Walk Speed
SetResetParameters();
}

bpVelPenaltyThisStep = 0;
foreach (var item in m_JdController.bodyPartsList)
{
bpVelPenaltyThisStep += item.rb.velocity.magnitude;
var velDelta = Mathf.Clamp(item.rb.velocity.magnitude - walkingSpeed, 0, 1);
bpVelPenaltyThisStep += velDelta;
rewardManager.UpdateReward("bpVel", bpVelPenaltyThisStep);
}
// void FixedUpdate()

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

11
Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamic Max Speed 10 small hh.nn.meta


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