looping of text & audio, statistics/model info text added
This commit is contained in:
@@ -11,6 +11,7 @@ public class DReConRewards : MonoBehaviour
|
||||
[Header("Reward")]
|
||||
public float SumOfSubRewards;
|
||||
public float Reward;
|
||||
public float m_CumulativeReward;
|
||||
|
||||
[Header("Position Reward")]
|
||||
public float SumOfDistances;
|
||||
@@ -72,6 +73,10 @@ public class DReConRewards : MonoBehaviour
|
||||
|
||||
public string targetedRootName = "articulation:Hips";
|
||||
|
||||
// Unity Events //
|
||||
public delegate void onUpdateStatDelegate(float value, int statIndex);
|
||||
public static onUpdateStatDelegate m_UpdateStat;
|
||||
|
||||
|
||||
public void OnAgentInitialize()
|
||||
{
|
||||
@@ -189,10 +194,17 @@ public class DReConRewards : MonoBehaviour
|
||||
// reward
|
||||
SumOfSubRewards = PositionReward+ComReward+PointsVelocityReward+LocalPoseReward;
|
||||
Reward = DistanceFactor*SumOfSubRewards;
|
||||
|
||||
m_CumulativeReward += Reward;
|
||||
m_UpdateStat?.Invoke(m_CumulativeReward/10f, 0);
|
||||
//m_UpdateStat?.Invoke(LocalPoseReward, 1);
|
||||
//m_UpdateStat?.Invoke(PointsVelocityReward, 2);
|
||||
//m_UpdateStat?.Invoke(PositionReward, 3);
|
||||
// Reward = (DirectionFactor*SumOfSubRewards) * DistanceFactor;
|
||||
}
|
||||
public void OnReset()
|
||||
{
|
||||
m_CumulativeReward = 0f;
|
||||
Assert.IsTrue(_hasLazyInitialized);
|
||||
|
||||
_mocapBodyStats.OnReset();
|
||||
|
||||
Reference in New Issue
Block a user