diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingCoachLibrary.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingCoachLibrary.cpp index 0a2865d..23f5899 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingCoachLibrary.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingCoachLibrary.cpp @@ -335,6 +335,8 @@ namespace HyperTwistTrainingCoachLibraryInternal return SourceLabel == TEXT("recommendation-history-aligned-tight-follow-up-outcome") || SourceLabel == TEXT("recommendation-history-accepted-aligned-tight-follow-up-packet-outcome") + || SourceLabel + == TEXT("recommendation-history-accepted-aligned-tight-follow-up-packet-reliable-exact-branch-dependability") || SourceLabel == TEXT("coach-memory-aligned-follow-up-packet-structure-tight-follow-up") || SourceLabel.StartsWith(TEXT("coach-memory-dashboard-aligned-follow-up-packet-tight-")) || SourceLabel.StartsWith( @@ -351,6 +353,8 @@ namespace HyperTwistTrainingCoachLibraryInternal return SourceLabel == TEXT("recommendation-history-aligned-broad-recommended-outcome") || SourceLabel == TEXT("recommendation-history-accepted-aligned-broad-recommended-packet-outcome") + || SourceLabel + == TEXT("recommendation-history-accepted-aligned-broad-recommended-packet-reliable-exact-branch-dependability") || SourceLabel == TEXT("coach-memory-aligned-follow-up-packet-structure-broad-recommended") || SourceLabel.StartsWith(TEXT("coach-memory-dashboard-aligned-follow-up-packet-broad-")) @@ -415,6 +419,11 @@ namespace HyperTwistTrainingCoachLibraryInternal } if (IsAlignedTightFollowUpGuidanceSourceLabel(SourceLabel)) { + if (SourceLabel + == TEXT("recommendation-history-accepted-aligned-tight-follow-up-packet-reliable-exact-branch-dependability")) + { + return TEXT("reliable exact accepted aligned tight follow-up-packet branch dependability history"); + } if (SourceLabel.StartsWith( TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-reliable-outcome-reliable-outcome-reliable-reliable-")) || SourceLabel.StartsWith( @@ -483,6 +492,11 @@ namespace HyperTwistTrainingCoachLibraryInternal } if (IsAlignedBroadRecommendedGuidanceSourceLabel(SourceLabel)) { + if (SourceLabel + == TEXT("recommendation-history-accepted-aligned-broad-recommended-packet-reliable-exact-branch-dependability")) + { + return TEXT("reliable exact accepted aligned broad recommended-packet branch dependability history"); + } if (SourceLabel.StartsWith( TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-reliable-outcome-reliable-outcome-reliable-reliable-")) || SourceLabel.StartsWith( diff --git a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp index 9580ee6..408236d 100644 --- a/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp +++ b/UnrealHyperTwist/Source/UnrealHyperTwist/Private/HyperTwistTraining/HyperTwistTrainingRepositoryLibrary.cpp @@ -464,6 +464,8 @@ namespace HyperTwistTrainingRepositoryLibraryInternal { return SourceLabel == TEXT("recommendation-history-accepted-aligned-tight-follow-up-packet-outcome") + || SourceLabel + == TEXT("recommendation-history-accepted-aligned-tight-follow-up-packet-reliable-exact-branch-dependability") || SourceLabel.StartsWith(TEXT("coach-memory-dashboard-aligned-follow-up-packet-tight-")) || SourceLabel.StartsWith( TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-tight-")) @@ -478,6 +480,8 @@ namespace HyperTwistTrainingRepositoryLibraryInternal { return SourceLabel == TEXT("recommendation-history-accepted-aligned-broad-recommended-packet-outcome") + || SourceLabel + == TEXT("recommendation-history-accepted-aligned-broad-recommended-packet-reliable-exact-branch-dependability") || SourceLabel.StartsWith(TEXT("coach-memory-dashboard-aligned-follow-up-packet-broad-")) || SourceLabel.StartsWith( TEXT("coach-memory-dashboard-accepted-aligned-follow-up-packet-broad-")) @@ -2661,12 +2665,16 @@ namespace HyperTwistTrainingRepositoryLibraryInternal == TEXT("recommendation-history-aligned-tight-follow-up-outcome") || CoachMemorySnapshot.PreferredGuidanceSourceLabel == TEXT("recommendation-history-accepted-aligned-tight-follow-up-packet-outcome") + || CoachMemorySnapshot.PreferredGuidanceSourceLabel + == TEXT("recommendation-history-accepted-aligned-tight-follow-up-packet-reliable-exact-branch-dependability") || CoachMemorySnapshot.PreferredGuidanceSourceLabel == TEXT("coach-memory-aligned-follow-up-packet-structure-tight-follow-up") || CoachMemorySnapshot.PreferredCoachHandoffSourceLabel == TEXT("recommendation-history-aligned-tight-follow-up-outcome") || CoachMemorySnapshot.PreferredCoachHandoffSourceLabel == TEXT("recommendation-history-accepted-aligned-tight-follow-up-packet-outcome") + || CoachMemorySnapshot.PreferredCoachHandoffSourceLabel + == TEXT("recommendation-history-accepted-aligned-tight-follow-up-packet-reliable-exact-branch-dependability") || CoachMemorySnapshot.PreferredCoachHandoffSourceLabel == TEXT("coach-memory-aligned-follow-up-packet-structure-tight-follow-up") || (CoachMemorySnapshot.PreferredGuidanceLane @@ -2683,12 +2691,16 @@ namespace HyperTwistTrainingRepositoryLibraryInternal == TEXT("recommendation-history-aligned-broad-recommended-outcome") || CoachMemorySnapshot.PreferredGuidanceSourceLabel == TEXT("recommendation-history-accepted-aligned-broad-recommended-packet-outcome") + || CoachMemorySnapshot.PreferredGuidanceSourceLabel + == TEXT("recommendation-history-accepted-aligned-broad-recommended-packet-reliable-exact-branch-dependability") || CoachMemorySnapshot.PreferredGuidanceSourceLabel == TEXT("coach-memory-aligned-follow-up-packet-structure-broad-recommended") || CoachMemorySnapshot.PreferredCoachHandoffSourceLabel == TEXT("recommendation-history-aligned-broad-recommended-outcome") || CoachMemorySnapshot.PreferredCoachHandoffSourceLabel == TEXT("recommendation-history-accepted-aligned-broad-recommended-packet-outcome") + || CoachMemorySnapshot.PreferredCoachHandoffSourceLabel + == TEXT("recommendation-history-accepted-aligned-broad-recommended-packet-reliable-exact-branch-dependability") || CoachMemorySnapshot.PreferredCoachHandoffSourceLabel == TEXT("coach-memory-aligned-follow-up-packet-structure-broad-recommended") || (CoachMemorySnapshot.PreferredGuidanceLane @@ -8567,6 +8579,44 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der 1, 4) : 0; + const int32 AcceptedAlignedTightPacketReliableExactOutcomeReliableBias = + (RecommendationHistory.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeReliableHistoryCount + >= 2 + && RecommendationHistory.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeReliableAverageScore + >= 70.0f) + ? FMath::Clamp( + RecommendationHistory + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeReliableHistoryCount + - RecommendationHistory + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeReliableHistoryCount + + (RecommendationHistory + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeReliableAverageScore + >= 86.0f + ? 1 + : 0), + 1, + 6) + : 0; + const int32 AcceptedAlignedBroadPacketReliableExactOutcomeReliableBias = + (RecommendationHistory + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeReliableHistoryCount + >= 2 + && RecommendationHistory + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeReliableAverageScore + >= 68.0f) + ? FMath::Clamp( + RecommendationHistory + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeReliableHistoryCount + - RecommendationHistory + .AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeReliableHistoryCount + + (RecommendationHistory + .AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeReliableAverageScore + >= 84.0f + ? 1 + : 0), + 1, + 6) + : 0; if (AcceptedAlignedTightPacketOutcomeBias > AcceptedAlignedBroadPacketOutcomeBias) { Snapshot.FollowUpGuidanceContinueBias += AcceptedAlignedTightPacketOutcomeBias; @@ -8639,6 +8689,75 @@ FHyperTwistTrainingCoachMemorySnapshot UHyperTwistTrainingRepositoryLibrary::Der TEXT("recommendation-history-accepted-aligned-broad-recommended-packet-outcome"); } } + if (AcceptedAlignedTightPacketReliableExactOutcomeReliableBias + > AcceptedAlignedBroadPacketReliableExactOutcomeReliableBias) + { + Snapshot.FollowUpGuidanceContinueBias += + AcceptedAlignedTightPacketReliableExactOutcomeReliableBias; + Snapshot.SuppressedPrimaryQueuePressureCount += FMath::Max( + 1, + AcceptedAlignedTightPacketReliableExactOutcomeReliableBias - 1 + ); + if (Snapshot.PreferredGuidanceLane == EHyperTwistTrainingCoachGuidanceLane::None + || Snapshot.PreferredGuidanceLane == EHyperTwistTrainingCoachGuidanceLane::Recommended + || Snapshot.PreferredGuidanceSourceLabel.StartsWith(TEXT("recommendation-history")) + || HyperTwistTrainingRepositoryLibraryInternal::IsAcceptedAlignedTightFollowUpPacketOutcomeSource( + Snapshot.PreferredGuidanceSourceLabel) + || HyperTwistTrainingRepositoryLibraryInternal::IsAcceptedAlignedBroadRecommendedPacketOutcomeSource( + Snapshot.PreferredGuidanceSourceLabel)) + { + Snapshot.PreferredGuidanceLane = EHyperTwistTrainingCoachGuidanceLane::FollowUp; + Snapshot.PreferredGuidanceSourceLabel = + TEXT("recommendation-history-accepted-aligned-tight-follow-up-packet-reliable-exact-branch-dependability"); + } + if (Snapshot.PreferredCoachHandoffKind == EHyperTwistTrainingCoachHandoffKind::None + || Snapshot.PreferredCoachHandoffKind == EHyperTwistTrainingCoachHandoffKind::Recommended + || Snapshot.PreferredCoachHandoffSourceLabel.IsEmpty() + || Snapshot.PreferredCoachHandoffSourceLabel.StartsWith(TEXT("recommendation-history")) + || HyperTwistTrainingRepositoryLibraryInternal::IsAcceptedAlignedTightFollowUpPacketOutcomeSource( + Snapshot.PreferredCoachHandoffSourceLabel) + || HyperTwistTrainingRepositoryLibraryInternal::IsAcceptedAlignedBroadRecommendedPacketOutcomeSource( + Snapshot.PreferredCoachHandoffSourceLabel)) + { + Snapshot.PreferredCoachHandoffKind = EHyperTwistTrainingCoachHandoffKind::FollowUp; + Snapshot.PreferredCoachHandoffSourceLabel = + TEXT("recommendation-history-accepted-aligned-tight-follow-up-packet-reliable-exact-branch-dependability"); + } + } + else if (AcceptedAlignedBroadPacketReliableExactOutcomeReliableBias + > AcceptedAlignedTightPacketReliableExactOutcomeReliableBias) + { + Snapshot.RecommendedGuidanceContinueBias += + AcceptedAlignedBroadPacketReliableExactOutcomeReliableBias; + Snapshot.SuppressedFollowUpQueuePressureCount += + AcceptedAlignedBroadPacketReliableExactOutcomeReliableBias; + if (Snapshot.PreferredGuidanceLane == EHyperTwistTrainingCoachGuidanceLane::None + || Snapshot.PreferredGuidanceLane == EHyperTwistTrainingCoachGuidanceLane::FollowUp + || Snapshot.PreferredGuidanceSourceLabel.StartsWith(TEXT("recommendation-history")) + || HyperTwistTrainingRepositoryLibraryInternal::IsAcceptedAlignedTightFollowUpPacketOutcomeSource( + Snapshot.PreferredGuidanceSourceLabel) + || HyperTwistTrainingRepositoryLibraryInternal::IsAcceptedAlignedBroadRecommendedPacketOutcomeSource( + Snapshot.PreferredGuidanceSourceLabel)) + { + Snapshot.PreferredGuidanceLane = EHyperTwistTrainingCoachGuidanceLane::Recommended; + Snapshot.PreferredGuidanceSourceLabel = + TEXT("recommendation-history-accepted-aligned-broad-recommended-packet-reliable-exact-branch-dependability"); + } + if (Snapshot.PreferredCoachHandoffKind == EHyperTwistTrainingCoachHandoffKind::None + || Snapshot.PreferredCoachHandoffKind == EHyperTwistTrainingCoachHandoffKind::FollowUp + || Snapshot.PreferredCoachHandoffSourceLabel.IsEmpty() + || Snapshot.PreferredCoachHandoffSourceLabel.StartsWith(TEXT("recommendation-history")) + || HyperTwistTrainingRepositoryLibraryInternal::IsAcceptedAlignedTightFollowUpPacketOutcomeSource( + Snapshot.PreferredCoachHandoffSourceLabel) + || HyperTwistTrainingRepositoryLibraryInternal::IsAcceptedAlignedBroadRecommendedPacketOutcomeSource( + Snapshot.PreferredCoachHandoffSourceLabel)) + { + Snapshot.PreferredCoachHandoffKind = + EHyperTwistTrainingCoachHandoffKind::Recommended; + Snapshot.PreferredCoachHandoffSourceLabel = + TEXT("recommendation-history-accepted-aligned-broad-recommended-packet-reliable-exact-branch-dependability"); + } + } if (!RecommendationHistory.FocusDeckId.IsEmpty() && (Snapshot.FocusDeckId.IsEmpty() @@ -15197,6 +15316,8 @@ FHyperTwistTrainingCoachRecommendationHistorySummary UHyperTwistTrainingReposito float AcceptedAlignedBroadRecommendedPacketTrustReliableLaneOutcomeAccumulator = 0.0f; float AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeAccumulator = 0.0f; float AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAccumulator = 0.0f; + float AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeReliableAccumulator = 0.0f; + float AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeReliableAccumulator = 0.0f; FString LatestPlanSortUtc; for (const FHyperTwistTrainingCoachActionPlan& Plan : UserPlans) @@ -15489,6 +15610,20 @@ FHyperTwistTrainingCoachRecommendationHistorySummary UHyperTwistTrainingReposito AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeAccumulator += OutcomeSummary.OutcomeScore; } + if (HyperTwistTrainingRepositoryLibraryInternal::IsReliableAcceptedAlignedTightFollowUpPacketExactOutcomeReliableHistorySource( + OutcomeSummary.PreferredCoachHandoffSourceLabel)) + { + Summary.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeReliableHistoryCount += 1; + AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeReliableAccumulator += + OutcomeSummary.OutcomeScore; + } + if (HyperTwistTrainingRepositoryLibraryInternal::IsReliableAcceptedAlignedBroadRecommendedPacketExactOutcomeReliableHistorySource( + OutcomeSummary.PreferredCoachHandoffSourceLabel)) + { + Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeReliableHistoryCount += 1; + AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeReliableAccumulator += + OutcomeSummary.OutcomeScore; + } if (OutcomeSummary.PlannedLaunchCaseCount > 0) { PlannedLaunchCaseCountAccumulator += @@ -15741,6 +15876,20 @@ FHyperTwistTrainingCoachRecommendationHistorySummary UHyperTwistTrainingReposito / static_cast( Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeHistoryCount); } + if (Summary.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeReliableHistoryCount > 0) + { + Summary.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeReliableAverageScore = + AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeReliableAccumulator + / static_cast( + Summary.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeReliableHistoryCount); + } + if (Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeReliableHistoryCount > 0) + { + Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeReliableAverageScore = + AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeReliableAccumulator + / static_cast( + Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeReliableHistoryCount); + } const int32 AcceptedAlignedTightPacketOutcomeLaneSignal = (Summary.AcceptedAlignedTightFollowUpPacketOutcomeHistoryCount >= 2 && Summary.AcceptedAlignedTightFollowUpPacketOutcomeAverageScore >= 60.0f) @@ -15867,6 +16016,35 @@ FHyperTwistTrainingCoachRecommendationHistorySummary UHyperTwistTrainingReposito 1, 5) : 0; + const int32 AcceptedAlignedTightPacketReliableExactOutcomeReliableSignal = + (Summary.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeReliableHistoryCount >= 2 + && Summary.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeReliableAverageScore + >= 70.0f) + ? FMath::Clamp( + Summary.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeReliableHistoryCount + - Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeReliableHistoryCount + + (Summary.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeReliableAverageScore + >= 86.0f + ? 1 + : 0), + 1, + 6) + : 0; + const int32 AcceptedAlignedBroadPacketReliableExactOutcomeReliableSignal = + (Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeReliableHistoryCount + >= 2 + && Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeReliableAverageScore + >= 68.0f) + ? FMath::Clamp( + Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeReliableHistoryCount + - Summary.AcceptedAlignedTightFollowUpPacketTrustReliableExactOutcomeReliableHistoryCount + + (Summary.AcceptedAlignedBroadRecommendedPacketTrustReliableExactOutcomeReliableAverageScore + >= 84.0f + ? 1 + : 0), + 1, + 6) + : 0; if (AcceptedAlignedTightPacketOutcomeLaneSignal > AcceptedAlignedBroadPacketOutcomeLaneSignal) { if (Summary.DominantSuggestedMode == EHyperTwistTrainingDeliveryMode::Timer @@ -15994,6 +16172,34 @@ FHyperTwistTrainingCoachRecommendationHistorySummary UHyperTwistTrainingReposito Summary.RecommendedLaneContinueBias += AcceptedAlignedBroadPacketReliableExactOutcomeHistorySignal; } + if (AcceptedAlignedTightPacketReliableExactOutcomeReliableSignal + > AcceptedAlignedBroadPacketReliableExactOutcomeReliableSignal) + { + if (Summary.DominantSuggestedMode == EHyperTwistTrainingDeliveryMode::Timer + || Summary.DominantSuggestedMode == EHyperTwistTrainingDeliveryMode::VirtualCube) + { + Summary.DominantSuggestedMode = EHyperTwistTrainingDeliveryMode::CoachReviewed; + } + Summary.DominantSelectionPolicy = EHyperTwistTrainingSelectionPolicy::Scripted; + Summary.FollowUpLaneContinueBias += + AcceptedAlignedTightPacketReliableExactOutcomeReliableSignal; + } + else if (AcceptedAlignedBroadPacketReliableExactOutcomeReliableSignal + > AcceptedAlignedTightPacketReliableExactOutcomeReliableSignal) + { + 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.RecommendedLaneContinueBias += + AcceptedAlignedBroadPacketReliableExactOutcomeReliableSignal; + } Summary.bHasRepeatRecommendationPressure = Summary.RepeatRecommendationSequenceCount > 0 && (Summary.RecurringCaseCount > 0 @@ -16003,6 +16209,8 @@ FHyperTwistTrainingCoachRecommendationHistorySummary UHyperTwistTrainingReposito Summary.EscalatedSequenceCount > 0 || Summary.RepeatRecommendationSequenceCount >= 2 || AcceptedAlignedTightPacketOutcomeLaneSignal > AcceptedAlignedBroadPacketOutcomeLaneSignal + || AcceptedAlignedTightPacketReliableExactOutcomeReliableSignal + > AcceptedAlignedBroadPacketReliableExactOutcomeReliableSignal || (Summary.bHasRepeatRecommendationPressure && Summary.DominantSuggestedMode == EHyperTwistTrainingDeliveryMode::CoachReviewed);