Search Unity

I have a question about my learning.

Discussion in 'ML-Agents' started by vfgtr8746, May 7, 2020.

  1. vfgtr8746

    vfgtr8746

    Joined:
    Jul 16, 2019
    Posts:
    6
    I am doing the following learning.

    If the square object is below, the agent is judged to be below, and if it is above, the agent is judged to be above.


    I wrote the code like this:
    public override void CollectObservations(VectorSensor sensor)
    {
    sensor.AddObservation(moveObject.getYpos());
    sensor.AddObservation(actionY);
    }

    public override void OnActionReceived(float[] vectorAction)
    {
    actionY = Mathf.FloorToInt(vectorAction[0]);
    float yPos = moveObject.getYpos();
    gameObject.transform.position = new Vector3(gameObject.transform.position.x,
    actionY + 1f, gameObject.transform.position.z);
    if (actionY == 0)
    {
    if(yPos >= 1f)
    {
    AddReward(-1f);
    }
    else
    {
    AddReward(1f);
    }
    }
    else if(actionY == 1)
    {
    if(yPos >= 1f)
    {
    AddReward(1f);
    }
    else
    {
    AddReward(-1f);
    }
    }
    }


    After that I tried to see the tensorboard, but the tensorboard did not turn on. Maybe tensorboard is not connected when connected by wifi? Should I connect only with LAN lines?

    Since tensorboard does not work, I tried to create a graph directly from the csv file, but the result is normally returned except for Policy Loss.

    Policy Loss is a form of continuous vibration.

    noname01.png
    Why is this appearance? Please answer.