From 34a7c1577c90837174a8116ea64d571732433b47 Mon Sep 17 00:00:00 2001 From: axiomlogicnexus Date: Thu, 30 Apr 2026 00:44:07 +0200 Subject: [PATCH] Shape plan defaults by accepted packet trust --- .../HyperTwistTrainingRepositoryLibrary.cpp | 63 +++++++++++++------ 1 file changed, 43 insertions(+), 20 deletions(-) diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp index 7e6734a..aab165c 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp @@ -14062,6 +14062,48 @@ FHyperTwistTrainingCoachRecommendationHistorySummary UHyperTwistTrainingReposito AcceptedAlignedBroadRecommendedPacketOutcomeAccumulator / static_cast(Summary.AcceptedAlignedBroadRecommendedPacketOutcomeHistoryCount); } + const int32 AcceptedAlignedTightPacketOutcomeLaneSignal = + (Summary.AcceptedAlignedTightFollowUpPacketOutcomeHistoryCount >= 2 + && Summary.AcceptedAlignedTightFollowUpPacketOutcomeAverageScore >= 60.0f) + ? FMath::Clamp( + Summary.AcceptedAlignedTightFollowUpPacketOutcomeHistoryCount + - Summary.AcceptedAlignedBroadRecommendedPacketOutcomeHistoryCount + + (Summary.AcceptedAlignedTightFollowUpPacketOutcomeAverageScore >= 80.0f ? 1 : 0), + 1, + 4) + : 0; + const int32 AcceptedAlignedBroadPacketOutcomeLaneSignal = + (Summary.AcceptedAlignedBroadRecommendedPacketOutcomeHistoryCount >= 2 + && Summary.AcceptedAlignedBroadRecommendedPacketOutcomeAverageScore >= 58.0f) + ? FMath::Clamp( + Summary.AcceptedAlignedBroadRecommendedPacketOutcomeHistoryCount + - Summary.AcceptedAlignedTightFollowUpPacketOutcomeHistoryCount + + (Summary.AcceptedAlignedBroadRecommendedPacketOutcomeAverageScore >= 78.0f ? 1 : 0), + 1, + 4) + : 0; + if (AcceptedAlignedTightPacketOutcomeLaneSignal > AcceptedAlignedBroadPacketOutcomeLaneSignal) + { + if (Summary.DominantSuggestedMode == EHyperTwistTrainingDeliveryMode::Timer + || Summary.DominantSuggestedMode == EHyperTwistTrainingDeliveryMode::VirtualCube) + { + Summary.DominantSuggestedMode = EHyperTwistTrainingDeliveryMode::CoachReviewed; + } + Summary.DominantSelectionPolicy = EHyperTwistTrainingSelectionPolicy::Scripted; + } + else if (AcceptedAlignedBroadPacketOutcomeLaneSignal > AcceptedAlignedTightPacketOutcomeLaneSignal) + { + if (Summary.DominantSuggestedMode == EHyperTwistTrainingDeliveryMode::CoachReviewed + && Summary.EscalatedSequenceCount == 0 + && Summary.FollowUpReadySequenceCount == 0) + { + Summary.DominantSuggestedMode = EHyperTwistTrainingDeliveryMode::Timer; + } + if (Summary.DominantSelectionPolicy == EHyperTwistTrainingSelectionPolicy::Scripted) + { + Summary.DominantSelectionPolicy = EHyperTwistTrainingSelectionPolicy::Weighted; + } + } Summary.bHasRepeatRecommendationPressure = Summary.RepeatRecommendationSequenceCount > 0 && (Summary.RecurringCaseCount > 0 @@ -14070,6 +14112,7 @@ FHyperTwistTrainingCoachRecommendationHistorySummary UHyperTwistTrainingReposito Summary.bShouldBiasCoachReviewed = Summary.EscalatedSequenceCount > 0 || Summary.RepeatRecommendationSequenceCount >= 2 + || AcceptedAlignedTightPacketOutcomeLaneSignal > AcceptedAlignedBroadPacketOutcomeLaneSignal || (Summary.bHasRepeatRecommendationPressure && Summary.DominantSuggestedMode == EHyperTwistTrainingDeliveryMode::CoachReviewed); @@ -14134,26 +14177,6 @@ FHyperTwistTrainingCoachRecommendationHistorySummary UHyperTwistTrainingReposito 1, 4) : 0; - const int32 AcceptedAlignedTightPacketOutcomeLaneSignal = - (Summary.AcceptedAlignedTightFollowUpPacketOutcomeHistoryCount >= 2 - && Summary.AcceptedAlignedTightFollowUpPacketOutcomeAverageScore >= 60.0f) - ? FMath::Clamp( - Summary.AcceptedAlignedTightFollowUpPacketOutcomeHistoryCount - - Summary.AcceptedAlignedBroadRecommendedPacketOutcomeHistoryCount - + (Summary.AcceptedAlignedTightFollowUpPacketOutcomeAverageScore >= 80.0f ? 1 : 0), - 1, - 4) - : 0; - const int32 AcceptedAlignedBroadPacketOutcomeLaneSignal = - (Summary.AcceptedAlignedBroadRecommendedPacketOutcomeHistoryCount >= 2 - && Summary.AcceptedAlignedBroadRecommendedPacketOutcomeAverageScore >= 58.0f) - ? FMath::Clamp( - Summary.AcceptedAlignedBroadRecommendedPacketOutcomeHistoryCount - - Summary.AcceptedAlignedTightFollowUpPacketOutcomeHistoryCount - + (Summary.AcceptedAlignedBroadRecommendedPacketOutcomeAverageScore >= 78.0f ? 1 : 0), - 1, - 4) - : 0; Summary.PreferredGuidanceLane = bHasFollowUpLaneSignal && (FollowUpLaneScore