Пример #1
0
        internal AI_Output RunAI(AI_InputRequest inputRequest)
        {
            var executer = new NeuralNetworkExecutor(_neuralNetwork);

            var output = executer.Run(AiHelper.AiInputToDoubleArray(inputRequest.Input));

            var aiOutput = AiHelper.DoubleArrayToAiOutput(output);

            return(aiOutput);
        }
Пример #2
0
    private static byte[] GetRunAIRequestBody(float time, float deltaTime, AI_Input input)
    {
        var request = new AI_InputRequest {
            Time      = time,
            DeltaTime = deltaTime,
            Input     = input
        };

        var json = JsonUtility.ToJson(request);

        return(System.Text.Encoding.UTF8.GetBytes(json));
    }
Пример #3
0
 private void FormMain_InputUpdateEvent(AI_InputRequest inputRequest)
 {
     this.InvokeIfRequired(() => {
         textBoxSensor1.Text = inputRequest.Input.sensor1.ToString();
         textBoxSensor2.Text = inputRequest.Input.sensor2.ToString();
         textBoxSensor3.Text = inputRequest.Input.sensor3.ToString();
         textBoxSensor4.Text = inputRequest.Input.sensor4.ToString();
         textBoxSensor5.Text = inputRequest.Input.sensor5.ToString();
         textBoxSensor6.Text = inputRequest.Input.sensor6.ToString();
         textBoxSensor7.Text = inputRequest.Input.sensor7.ToString();
     });
 }