Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,4 @@ public float GetMatchingVelocityReward(Vector3 velocityGoal, Vector3 actualVeloc
//This reward will approach 1 if it matches perfectly and approach zero as it deviates
return Mathf.Pow(1 - Mathf.Pow(velDeltaMagnitude / TargetWalkingSpeed, 2), 2);
}

/// <summary>
/// Agent touched the target
/// </summary>
public void TouchedTarget()
{
AddReward(1f);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,6 @@ public float GetMatchingVelocityReward(Vector3 velocityGoal, Vector3 actualVeloc
return Mathf.Pow(1 - Mathf.Pow(velDeltaMagnitude / MTargetWalkingSpeed, 2), 2);
}

/// <summary>
/// Agent touched the target
/// </summary>
public void TouchedTarget()
{
AddReward(1f);
}

public void SetTorsoMass()
{
m_JdController.bodyPartsDict[chest].rb.mass = m_ResetParams.GetWithDefault("chest_mass", 8);
Expand Down
8 changes: 0 additions & 8 deletions Project/Assets/ML-Agents/Examples/Worm/Scripts/WormAgent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,6 @@ public override void CollectObservations(VectorSensor sensor)
}
}

/// <summary>
/// Agent touched the target
/// </summary>
public void TouchedTarget()
{
AddReward(1f);
}

public override void OnActionReceived(ActionBuffers actionBuffers)
{
// The dictionary with all the body parts in it are in the jdController
Expand Down