UnitySDK/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs
/// <summary>
/// Loop over body parts to add them to observation.
/// </summary>
Loop over body parts to add them to observation.
Loop over body parts to add them to observation .
public override void CollectObservations()
    {
        m_JdController.GetCurrentJointForces();
        AddVectorObs(m_DirToTarget.normalized);
        AddVectorObs(m_JdController.bodyPartsDict[hips].rb.position);
        AddVectorObs(hips.forward);
        AddVectorObs(hips.up);
        foreach (var bodyPart in m_JdController.bodyPartsDict.Values)
        {
            CollectObservationBodyPart(bodyPart);
        }
    }
public override void CollectObservations ( ) { m_JdController . GetCurrentJointForces ( ) ; AddVectorObs ( m_DirToTarget . normalized ) ; AddVectorObs ( m_JdController . bodyPartsDict [ hips ] . rb . position ) ; AddVectorObs ( hips . forward ) ; AddVectorObs ( hips . up ) ; foreach ( var bodyPart in m_JdController . bodyPartsDict . Values ) { CollectObservationBodyPart ( bodyPart ) ; } }
Loop over body parts to add them to observation.
Loop over body parts to add them to observation .