Beispiel #1
0
    public override void AgentAction(float[] vectorAction, string textAction)
    {
        // Time penalty
        AddReward(-0.05f);

        // Add all other rewards
        float reward = m_Rewards.Reward;

        AddReward(reward);

        // Actions, size = 1
        float direction = Mathf.Clamp(vectorAction[0], -1, 1);

        m_InputParser.AddInput(direction);
        m_Movement.Move(direction);
    }