需要帮助!获得额外的观察。任何修复?

问题描述 投票:0回答:0

我在收集观察方法中有 21 个观察,但在神经网络中我得到 10 组观察,每个观察数量不同

    public override void CollectObservations(VectorSensor sensor)
    {
        // Localization
        sensor.AddObservation(transform.localPosition.x);
        sensor.AddObservation(transform.localPosition.y);
        sensor.AddObservation(transform.localPosition.z);

        sensor.AddObservation(transform.rotation.x);
        sensor.AddObservation(transform.rotation.y);
        sensor.AddObservation(transform.rotation.z);

        sensor.AddObservation(Target.transform.localPosition.x);
        sensor.AddObservation(Target.transform.localPosition.y);
        sensor.AddObservation(Target.transform.localPosition.z);

        // Sensors
        sensor.AddObservation(UltraSonicDistances[0]);
        sensor.AddObservation(UltraSonicDistances[1]);
        sensor.AddObservation(UltraSonicDistances[2]);
        sensor.AddObservation(UltraSonicDistances[3]);
        sensor.AddObservation(UltraSonicDistances[4]);
        sensor.AddObservation(UltraSonicDistances[5]);

        sensor.AddObservation(IRDistances[0] < 1.0f ? true: false);
        sensor.AddObservation(IRDistances[1] < 1.0f ? true : false);
        sensor.AddObservation(IRDistances[2] < 1.0f ? true : false);
        sensor.AddObservation(IRDistances[3] < 1.0f ? true : false);
        sensor.AddObservation(IRDistances[4] < 1.0f ? true : false);
        sensor.AddObservation(IRDistances[5] < 1.0f ? true : false);
    }

我只想要obs-8,其他的都不需要。这是神经网络可视化工具

c# unity-game-engine machine-learning neural-network ml-agent
© www.soinside.com 2019 - 2024. All rights reserved.