Exemple #1
0
    public override void AgentAction(float[] vectorAction, string textAction)
    {
        AddReward(-0.001f);
        float v = 1.0f;
        float h = vectorAction[0];
        float j = vectorAction[1];

        if (Math.Abs(this.transform.position.y - target.transform.position.y) < 6.0f)
        {
            player.Move(v, h, j);
        }

        if (player.zombieState == ZombieControl.ZombieState.Death)
        {
            Debug.Log("보상 : 사망");
            AddReward(-1.0f);
            zombieSpawner.RemoveTarget(gameObject);
        }
        //Monitor.Log(name, GetCumulativeReward(), transform);
    }