/// <summary> /// Returns <c>(float, float)</c> tuple representing <see cref="FuzzyCartController.fuzzySystem"/>'s confidence that actions (drive, turn) should be taken, and the polarity of those actions. /// Based off the current values from <see cref="FuzzyCartController.sensor"/> /// </summary> /// <returns>A <c>(float, float)</c> tuple representing the actions (drive, turn)</returns> public (float, float) GetInstructions() { CrispInput input = GenerateInputFromSensors(); CrispOutput output = fuzzySystem.EvaluateFuzzyLogic(input); if (!Input.GetKey(KeyCode.Space)) { DebugOutLight(output); } else if (debug) { DebugOutLots(input, output); } output = ValidateOutput(output); return(output[CrispOutput.Outputs.ForwardBackwards], output[CrispOutput.Outputs.LeftRight]); }